You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "chenyukang (JIRA)" <ji...@apache.org> on 2018/01/26 04:44:00 UTC

[jira] [Created] (SPARK-23224) union all will throw gramma exception

chenyukang created SPARK-23224:
----------------------------------

             Summary: 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


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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org