You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] JSQLParser Version : 5.0 RDBMS : Hive syntax is not supported INSERT OVERWRITE PARTITION (dtime = '20220403')CASE WHEN condition THEN END ELSE ... #2119
-Hive syntax is not supported: INSERT OVERWRITE And PARTITION (dtime = '20220403')
-Hive syntax is not supported: CASE WHEN condition THEN END ELSE ...
SQL Example
Simplified Query Example, focusing on the failing feature
Exception in thread "main" net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "dws_country_orders" <S_IDENTIFIER>
at line 1, column 24.
Was expecting one of:
"("
"OUTPUT"
"SET"
"VALUE"
"VALUES"
"WITH"
<K_SELECT>
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:350)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:123)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:89)
at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:62)
at com.ctsi.CCJSqlParserUtilTest.main(CCJSqlParserUtilTest.java:23)
Caused by: java.util.concurrent.ExecutionException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "dws_country_orders" <S_IDENTIFIER>
at line 1, column 24.
Was expecting one of:
"("
"OUTPUT"
"SET"
"VALUE"
"VALUES"
"WITH"
<K_SELECT>
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)
... 4 more
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "dws_country_orders" <S_IDENTIFIER>
at line 1, column 24.
Was expecting one of:
"("
"OUTPUT"
"SET"
"VALUE"
"VALUES"
"WITH"
<K_SELECT>
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.Insert(CCJSqlParser.java:4439)
at net.sf.jsqlparser.parser.CCJSqlParser.SingleStatement(CCJSqlParser.java:383)
at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:296)
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(FutureTask.java:266)
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)
HIVE has many exotic syntax and is not too well supported in JSQLParser right now. You will have to provide or sponsor an implementation for improving the Hive support.
What is you concern about the CASE ... expression?
Verified on current master (1e4e92b): the INSERT OVERWRITE TABLE sjzt.dws_country_orders PARTITION (dtime = '20220403') SELECT ... FROM fact_order_detail statement from this issue parses and round-trips. Multi-column partitions such as PARTITION (dtime = '20220403', hour = '10') work as well. Can this be closed?
Activity
manticore-projects commentedon Dec 6, 2024
Greetings!
HIVE has many exotic syntax and is not too well supported in JSQLParser right now. You will have to provide or sponsor an implementation for improving the Hive support.
What is you concern about the
CASE ...expression?JSQLParser#2119 add support INSERT OVERWRITE PARTITION
JSQLParser#2119 fix test case
JSQLParser#2119 add reserved keyword
#2119 add support INSERT OVERWRITE PARTITION (#2135)
fudianchn commentedon Aug 23, 2026
Verified on current master (
1e4e92b): theINSERT OVERWRITE TABLE sjzt.dws_country_orders PARTITION (dtime = '20220403') SELECT ... FROM fact_order_detailstatement from this issue parses and round-trips. Multi-column partitions such asPARTITION (dtime = '20220403', hour = '10')work as well. Can this be closed?