GitHub user hvanhovell opened a pull request:

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

    [SPARK-15824][SQL] Execute WITH .... INSERT ... statements immediately

    ## What changes were proposed in this pull request?
    We currently immediately execute `INSERT` commands when they are issued. 
This is not the case as soon as we use a `WITH` to define common table 
expressions, for example:
    ```sql
    WITH
    tbl AS (SELECT * FROM x WHERE id = 10)
    INSERT INTO y
    SELECT *
    FROM   tbl
    ```
    
    This PR fixes this problem. This PR closes 
https://github.com/apache/spark/pull/13561 (which fixes the a instance of this 
problem in the ThriftSever).
    
    ## How was this patch tested?
    Added a test to `InsertSuite`
    


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

    $ git pull https://github.com/hvanhovell/spark SPARK-15824

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

    https://github.com/apache/spark/pull/13678.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 #13678
    
----
commit 2639bc4e3f468678b089e40d36ea3e6d60cdc0db
Author: Herman van Hovell <[email protected]>
Date:   2016-06-15T02:40:25Z

    Check the analyzed plan for side effects instead of the logical plan.

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to