Actual Behavior
String query = "select { fn Substring('abc', 1, 3) }";
System.out.println(CCJSqlParserUtil.parse(query));
Throws error:
Exception in thread "main" net.sf.jsqlparser.parser.TokenMgrError: Lexical error at line 1, column 9. Encountered: " " (32), after : "{"
at net.sf.jsqlparser.parser.CCJSqlParserTokenManager.getNextToken(CCJSqlParserTokenManager.java:2267)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_scan_token(CCJSqlParser.java:13878)
Expected Behavior
I did not find any documentation regarding if whitespace chars are allowed after open curly brackets (or before close brackets) , but SQL support it.
If I remove whitespace, "{fn Substring('abc', 1, 3)}", jsqlparser will parse this query.
Steps to Reproduce the Problem
- Put two lines above in your Java code.
Specifications
- Version: jsqlparser-0.9.5.jar
- Platform: Win
- Subsystem: 10
Actual Behavior
Throws error:
Exception in thread "main" net.sf.jsqlparser.parser.TokenMgrError: Lexical error at line 1, column 9. Encountered: " " (32), after : "{"
at net.sf.jsqlparser.parser.CCJSqlParserTokenManager.getNextToken(CCJSqlParserTokenManager.java:2267)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_scan_token(CCJSqlParser.java:13878)
Expected Behavior
I did not find any documentation regarding if whitespace chars are allowed after open curly brackets (or before close brackets) , but SQL support it.
If I remove whitespace, "{fn Substring('abc', 1, 3)}", jsqlparser will parse this query.
Steps to Reproduce the Problem
Specifications