diff options
author | Cheng Lian <lian@databricks.com> | 2016-04-27 13:55:07 -0700 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-04-27 13:55:13 -0700 |
commit | 24bea000476cdd0b43be5160a76bc5b170ef0b42 (patch) | |
tree | 5336028911f2db913d333bbfbf17b54e1b843f5c /python | |
parent | f405de87c878c49b17acb2c874be1084465384e9 (diff) | |
download | spark-24bea000476cdd0b43be5160a76bc5b170ef0b42.tar.gz spark-24bea000476cdd0b43be5160a76bc5b170ef0b42.tar.bz2 spark-24bea000476cdd0b43be5160a76bc5b170ef0b42.zip |
[SPARK-14954] [SQL] Add PARTITION BY and BUCKET BY clause for data source CTAS syntax
Currently, we can only create persisted partitioned and/or bucketed data source tables using the Dataset API but not using SQL DDL. This PR implements the following syntax to add partitioning and bucketing support to the SQL DDL:
```
CREATE TABLE <table-name>
USING <provider> [OPTIONS (<key1> <value1>, <key2> <value2>, ...)]
[PARTITIONED BY (col1, col2, ...)]
[CLUSTERED BY (col1, col2, ...) [SORTED BY (col1, col2, ...)] INTO <n> BUCKETS]
AS SELECT ...
```
Test cases are added in `MetastoreDataSourcesSuite` to check the newly added syntax.
Author: Cheng Lian <lian@databricks.com>
Author: Yin Huai <yhuai@databricks.com>
Closes #12734 from liancheng/spark-14954.
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions