JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern
Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SETTINGS"
at line 20, column 9.
Was expecting one of:
"::"
"["
"^"
<EOF>
<ST_SEMICOLON>
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:343)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:123)
at com.baomidou.mybatisplus.extension.parser.JsqlParserGlobal.lambda$static$1(JsqlParserGlobal.java:58)
at com.baomidou.mybatisplus.extension.parser.JsqlParserGlobal.parse(JsqlParserGlobal.java:68)
at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserSingle(JsqlParserSupport.java:48)
... 89 more
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SETTINGS" <S_IDENTIFIER>
at line 20, column 9.
Was expecting one of:
"::"
"["
"^"
<EOF>
<ST_SEMICOLON>
at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:39603)
at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:39427)
at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:317)
at net.sf.jsqlparser.parser.CCJSqlParserUtil$1.call(CCJSqlParserUtil.java:339)
at net.sf.jsqlparser.parser.CCJSqlParserUtil$1.call(CCJSqlParserUtil.java:336)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
SQL Example:
Simplified Query Example, focusing on the failing feature
SELECT
tenant_uuid as tenantUuid,
device_id as deviceId,
max(update_time) as updateTime
FROM t1
WHERE device_id = '111'
GROUP BY tenant_uuid,
device_id
HAVING sum(sign) > 0
SETTINGS max_threads=1
Software Information:
JSqlParser version 4.9
Database Clickhouse
Tips:
Please write in English and avoid Screenshots (as we can't copy and paste content from it).
Try your example online with the latest JSQLParser and share the link in the error report.
Do provide Links or References to the specific Grammar and Syntax you are trying to use.
Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram
Failing SQL Feature:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "SETTINGS"
at line 20, column 9.
SQL Example:
Software Information:
Tips:
Please write in English and avoid Screenshots (as we can't copy and paste content from it). Try your example online with the latest JSQLParser and share the link in the error report. Do provide Links or References to the specific Grammar and Syntax you are trying to use.