mirror of
https://github.com/apache/impala.git
synced 2026-02-01 21:00:29 -05:00
Add syntactic support for creating bucketed table.
The specific syntax in the create table statement is as follows:
[CLUSTERED BY (column[, column ...]) [SORT BY (column[, column ...])]
INTO 24 BUCKETS]
Example:
CREATE TABLE tbl (i int COMMENT 'hello', s string)
CLUSTERED BY (i) INTO 24 BUCKETS;
CREATE TABLE tbl (i int COMMENT 'hello', s string)
CLUSTERED BY (i) SORT BY (s) INTO 24 BUCKETS;
Instructions:
1. The bucket partitioning algorithm is the hash function used
in Hive's bucketed tables;
2. Create Bucketed Table statements currently don't support Kudu and
Iceberg tables;
3. In the current version, alter operations(add/drop/change/replace
columns) on bucketed tables are not supported;
4. Support dropping bucketed table;
This COMMIT is the first subtask of IMPALA-3118.
Change-Id: I919b4d4139bc3a7784fa6fdb6f064e25666d548e
Reviewed-on: http://gerrit.cloudera.org:8080/19055
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
17 KiB
17 KiB