GitHub user cloud-fan opened a pull request:

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

    [SPARK-15718][SQL] better error message for writing bucketed data

    ## What changes were proposed in this pull request?
    
    Currently we don't support bucketing for `save` and `insertInto`.
    
    For `save`, we just write the data out into a directory users specified, 
and it's not a table, we don't keep its metadata. When we read it back, we have 
no idea if the data is bucketed or not, so it doesn't make sense to use `save` 
to write bucketed data, as we can't use the bucket information anyway.
    
    We can support it in the future, once we have features like bucket 
discovery, or we save bucket information in the data directory too, so that we 
don't need to rely on a metastore.
    
    For `insertInto`, it inserts data into an existing table, so it doesn't 
make sense to specify bucket information, as we should get the bucket 
information from the existing table.
    
    This PR improves the error message for the above 2  cases.
    ## How was this patch tested?
    
    new test in `BukctedWriteSuite`

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

    $ git pull https://github.com/cloud-fan/spark error-msg

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

    https://github.com/apache/spark/pull/13452.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 #13452
    
----
commit 814ccf618a6bf6a2423019a9a3319a3986e2789b
Author: Wenchen Fan <[email protected]>
Date:   2016-06-01T21:40:35Z

    better error message for writing bucketed data

----


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