-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Failing SQL Feature:
Several successive, empty lines causes the query to fail parsing.
SQL Example:
- Simplified Query Example, focusing on the failing feature
WITH LatestSalary AS ( SELECT employee, salary, ROW_NUMBER() OVER ( PARTITION BY employee ORDER BY change_date DESC, id DESC ) as rn FROM salary ) SELECT e.*, ls.salary FROM employees e JOIN LatestSalary ls ON e.id = ls.employee WHERE ls.rn = 1;
Software Information:
- JSqlParser version 5.3
- Database any
Error details:
net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "," ","
at line 4, column 11.
Was expecting:
")"
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:352)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:125)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:91)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:64)
at jsqlparser.ParsingTest.testParseStatementIssue2352WithoutComment(ParsingTest.java:46)
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "," ","
at line 4, column 11.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels