GitHub user cloud-fan opened a pull request:

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

    [SPARK-13924][SQL] officially support multi-insert

    ## What changes were proposed in this pull request?
    
    There is a feature of hive SQL called multi-insert. For example:
    ```
    FROM src
    INSERT OVERWRITE TABLE dest1
    SELECT key + 1
    INSERT OVERWRITE TABLE dest2
    SELECT key WHERE key > 2
    INSERT OVERWRITE TABLE dest3
    SELECT col EXPLODE(arr) exp AS col
    ...
    ```
    
    We partially support it currently, with some limitations: 1) WHERE can't 
reference columns produced by LATERAL VIEW. 2) It's not executed eagerly, i.e. 
`sql("...multi-insert clause...")` won't take place right away like other 
commands, e.g. CREATE TABLE.
    
    This PR removes these limitations and make us fully support multi-insert.
    
    ## How was this patch tested?
    
    new tests in `SQLQuerySuite`
    


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

    $ git pull https://github.com/cloud-fan/spark lateral-view

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

    https://github.com/apache/spark/pull/11754.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 #11754
    
----
commit 1ff3dec5f73e53aa5a4fb5ab86a9d55e62edc202
Author: Wenchen Fan <[email protected]>
Date:   2016-03-16T04:35:10Z

    officially support multi-insert

----


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