-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
invalidInvalid SQL or Syntax ErrorInvalid SQL or Syntax Error
Description
Perhaps it's normal, but can't (due to maven) check with 5.4 version.
This query is not really complicated, and we've got a lot of more complex query to handle. I don't found in the doc/sample any limitation regarding the + or *. You can of course replace the + dd.AAAA by * dd.AAAA it will throw the same king of error.
The actual site with the demo actually end the session and i could not try.
Failing SQL Feature:
Set tableNames = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "+" "+"
at line 8, column 23.
SQL Example:
- Simplified Query Example, focusing on the failing feature
SELECT ee."CCCC"
FROM
(SELECT nvl((
(SELECT A B
FROM DUAL
WHERE A = dd."AA"
AND AA = dd.AA
) + dd.AAAAA) * - 1, 0) CCCC,
"AAAAA"
FROM
(SELECT
NULL A,
NULL AA,
NULL AAA,
NULL AAAA,
NULL AAAAA,
NULL AAAAAA
FROM dual) dd) ee
Software Information:
- JSqlParser version 5.3
A simple Set tableNames = TablesNamesFinder.findTablesOrOtherSources(sqlStr);
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "+" "+"
at line 8, column 23.
Was expecting one of:
")"
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 net.sf.jsqlparser.util.TablesNamesFinder.findTablesOrOtherSources(TablesNamesFinder.java:222)
at org.evidency.Main.main(Main.java:36)
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "+" "+"
at line 8, column 23.
Was expecting one of:
")"
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:345)
... 5 more
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "+" "+"
at line 8, column 23.
Was expecting one of:
")"
at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:53111)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:52929)
at net.sf.jsqlparser.parser.CCJSqlParser.ParenthesedSelect(CCJSqlParser.java:10915)
at net.sf.jsqlparser.parser.CCJSqlParser.PrimaryExpression(CCJSqlParser.java:18303)
at net.sf.jsqlparser.parser.CCJSqlParser.BitwiseXor(CCJSqlParser.java:17962)
at net.sf.jsqlparser.parser.CCJSqlParser.MultiplicativeExpression(CCJSqlParser.java:17915)
at net.sf.jsqlparser.parser.CCJSqlParser.AdditiveExpression(CCJSqlParser.java:17878)
at net.sf.jsqlparser.parser.CCJSqlParser.BitwiseAndOr(CCJSqlParser.java:17831)
Thanks a lot for your work
Metadata
Metadata
Assignees
Labels
invalidInvalid SQL or Syntax ErrorInvalid SQL or Syntax Error