-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Failing SQL Feature:
In JSQLParser 5.x.
If run run with disabled complex parsing it fails on trivial queries if they contain func(*)
.
(we cannot enable complex parsing because parser still hangs on queries with big number of brackets).
Java snippet:
public static void main(String[] args) throws Exception {
CCJSqlParser parser = new CCJSqlParser(new StringProvider("select count(*) from zzz"));
parser.withAllowComplexParsing(false);
parser.Statement();
}
Fails with error
Exception in thread "main" net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 1, column 13.
Was expecting one of:
"."
"::"
"^"
<EOF>
<ST_SEMICOLON>
at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:42285)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:42106)
at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:341)
SQL Example:
Parser fails if query contains any functions call with asterisk (e.g. count(*)
or func_name(*)
)
Looks like a quite serious issue.
Metadata
Metadata
Assignees
Labels
No labels