GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/10689

    [SPARK-12745] [SQL] Hive Parser: Limit is not supported inside Set Operation

    The current SQLContext allows the following query, which is copied from a 
test case in SQLQuerySuite:
    ```
         checkAnswer(sql(
           """
             |select key from ((select * from testData limit 1)
             |  union all (select * from testData limit 1)) x limit 1
           """.stripMargin),
           Row(1)
         )
    ```
    However, it is rejected in the Hive parser. 
    
    This PR is to make Hive parser support the Limit Clause inside Set 
Operator. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark limitInUnion

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/10689.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10689
    
----
commit 428160fd824309f83127ad68efabd0595d614abd
Author: gatorsmile <gatorsm...@gmail.com>
Date:   2016-01-11T01:12:48Z

    The Limit Clause can be applied inside the set operation

commit 310cb323ae969792dee32cbe320448a06c9c1cca
Author: gatorsmile <gatorsm...@gmail.com>
Date:   2016-01-11T01:14:13Z

    Merge remote-tracking branch 'upstream/master' into limitInUnion

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to