GitHub user gatorsmile opened a pull request:

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

    [SPARK-16556] [SQL] Fix Silent Ignorance of Bucket Specification When 
Creating Table Using Schema Inference

    #### What changes were proposed in this pull request?
    When creating a data source table without explicit specification of schema 
or SELECT clause, we silently ignore the bucket specification (CLUSTERED BY... 
SORTED BY...). For example,
    ```SQL
    CREATE TABLE jsonTable
    USING org.apache.spark.sql.json
    OPTIONS (
      path '${tempDir.getCanonicalPath}'
    )
    CLUSTERED BY (inexistentColumnA) SORTED BY (inexistentColumnB) INTO 2 
BUCKETS
    ```
    
    This PR captures it and issues an error message.
    
    #### How was this patch tested?
    Added a test case in DDLSuite

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

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

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

    https://github.com/apache/spark/pull/14210.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 #14210
    
----
commit 680b6f0faa835eecb4cd7b9e6add4700fdfa809c
Author: gatorsmile <gatorsm...@gmail.com>
Date:   2016-07-14T22:51:28Z

    fix.

----


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