[
https://issues.apache.org/jira/browse/SPARK-23224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Liang-Chi Hsieh resolved SPARK-23224.
-------------------------------------
Resolution: Not A Problem
> union all will throw gramma exception
> -------------------------------------
>
> Key: SPARK-23224
> URL: https://issues.apache.org/jira/browse/SPARK-23224
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.2.0
> Reporter: chenyukang
> Priority: Major
>
> when keyword "limit " in first sub query , this query will fail with gramma
> exception
> {code:java}
> spark-sql>
> >
> > insert overwrite table tmp_wjmdb.tmp_cyk_test1
> > select * from tmp_wjmdb.abctest limit 10
> > union all
> > select * from tmp_wjmdb.abctest limit 20;
> 18/01/26 12:18:58 INFO SparkSqlParser: Parsing command: insert overwrite
> table tmp_wjmdb.tmp_cyk_test1
> select * from tmp_wjmdb.abctest limit 10
> union all
> select * from tmp_wjmdb.abctest limit 20
> Error in query:
> mismatched input 'union' expecting {<EOF>, '.', '[', 'OR', 'AND', 'IN', NOT,
> 'BETWEEN', 'LIKE', RLIKE, 'IS', EQ, '<=>', '<>', '!=', '<', LTE, '>', GTE,
> '+', '-', '*', '/', '%', 'DIV', '&', '|', '^'}(line 3, pos 0)
> == SQL ==
> insert overwrite table tmp_wjmdb.tmp_cyk_test1
> select * from tmp_wjmdb.abctest limit 10
> union all
> ^^^
> select * from tmp_wjmdb.abctest limit 20
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]