GitHub user cloud-fan opened a pull request:

    [SPARK-17909][SQL] we should create table before writing out the data in 

    ## What changes were proposed in this pull request?
    In `CreateDataSourceTableAsSelectCommand`, we write out the data to the 
table location before create table, because we assume the data schema may 
change after it has been written out. However, we may only change the schema's 
nullability. We can still create table first, with regarding all columns are 
    ## How was this patch tested?
    existing tests.

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

    $ git pull nullable

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

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

    This closes #15465
commit 543f0143e65b561eb79f7c4f8783fa85d28fe2a1
Author: Wenchen Fan <>
Date:   2016-10-13T14:57:26Z

    we should create table before writing out the data in CTAS


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

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to