Baike Xia has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19055
Change subject: IMPALA-3119: DDL support for bucketed tables ...................................................................... IMPALA-3119: DDL support for bucketed tables Add syntactic support for creating bucketed table. The specific syntax is as follows: CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name( col_name data_type [constraint_specification] [COMMENT 'col_comment'] [, ...] ) [PARTITIONED BY (col_name data_type [COMMENT 'col_comment'], ...)] [BUCKETED BY HASH([column [, column ...]])|RANDOM INTO 24 BUCKETS [SORT BY ([column [, column ...]])] [COMMENT 'table_comment'] [ROW FORMAT row_format] [WITH SERDEPROPERTIES ('key1'='value1', 'key2'='value2', ...)] [STORED AS file_format] [LOCATION 'hdfs_path'] [CACHED IN 'pool_name' [WITH REPLICATION = integer] | UNCACHED] [TBLPROPERTIES ('key1'='value1', 'key2'='value2', ...)] Instructions: 1. CLUSTERED BY of Hive is not supported, because HINT has the keyword; 2. The bucket partitioning algorithm contains HASH, RANDOM, KUDU_HASH. The default value is HASH; 3. INTO 24 BUCKETS, specifies the number of buckets, the default value is 16; 4. Create Bucketed Table statements that do not support Kudu and Iceberg tables, but for a Kudu table, the hash partition is equivalent to a bucket, and the optimization rule applies to join query; 5. In the current version, alter operations(add/drop/change/replace columns) on bucketed tables are not supported; This COMMIT is the first subtask of IMPALA-3118. Change-Id: I919b4d4139bc3a7784fa6fdb6f064e25666d548e --- M common/thrift/CatalogObjects.thrift M common/thrift/JniCatalog.thrift M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/CreateTableLikeFileStmt.java M fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java M fe/src/main/java/org/apache/impala/analysis/TableDef.java M fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java M fe/src/main/java/org/apache/impala/catalog/HdfsTable.java M fe/src/main/java/org/apache/impala/catalog/Table.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java A fe/src/main/java/org/apache/impala/util/BucketUtils.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/org/apache/impala/analysis/ParserTest.java M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java M testdata/workloads/functional-query/queries/QueryTest/create-table.test 16 files changed, 411 insertions(+), 21 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/55/19055/4 -- To view, visit http://gerrit.cloudera.org:8080/19055 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I919b4d4139bc3a7784fa6fdb6f064e25666d548e Gerrit-Change-Number: 19055 Gerrit-PatchSet: 4 Gerrit-Owner: Baike Xia <xiaba...@163.com>