Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] JSQLParser Version 4.9 : Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token #2145

Closed
zhoujun001 opened this issue Jan 16, 2025 · 1 comment

Comments

@zhoujun001
Copy link

Failing SQL Feature:

  • If sql uses multiple newline symbols continuously, an error will be reported.

  • Example: SELECT * FROM

default.test
-error info:
net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "FROM" "FROM"
at line 1, column 10.

Was expecting one of:

<EOF>
<ST_SEMICOLON>

at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:350)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:123)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:89)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:62)
  • If there is only one newline symbol, it can be parsed correctly
  • Example: SELECT * FROM
    default.test
@manticore-projects
Copy link
Contributor

\n\n terminates a statement.
Duplicate #1988

@manticore-projects manticore-projects closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants