Hello Mahesh Reddy, Quanlong Huang, Alexey Serbin, Abhishek Chennaka, Michael
Smith, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/18676
to look at the new patch set (#12).
Change subject: IMPALA-11430: Support custom hash schema for Kudu range tables
......................................................................
IMPALA-11430: Support custom hash schema for Kudu range tables
KUDU-2671 added support for custom hash partition specification at the
range partition level. This patch adds CREATE TABLE and ALTER TABLE
syntax to allow Kudu custom hash schema to be specified through Impala.
In addition, a new SHOW HASH SCHEMA statement has been added to allow
display of the hash schema information for each partition.
HASH syntax within a partition is similar to the table-level syntax
except that HASH clauses must follow the PARTITION clause and commas are
not allowed within a partition. These differences were required to keep
the grammar unambiguous and due to limitations of the Java Cup Parser.
To make the grammar more consistent, commas in the table-level partion
spec and between PARTITION clauses are now optional but allowed for
backward compatibility.
Example:
CREATE TABLE t1 (id int, c2 int, PRIMARY KEY(id, c2))
PARTITION BY HASH(id) PARTITIONS 3 HASH(c2) PARTITIONS 4
RANGE (c2)
(
PARTITION 0 <= VALUES < 10
PARTITION 10 <= VALUES < 20
HASH(id) PARTITIONS 2 HASH(c2) PARTITIONS 3
PARTITION 20 <= VALUES < 30
)
STORED AS KUDU;
ALTER TABLE t1 ADD RANGE PARTITION 30 <= VALUES < 40
HASH(id) PARTITIONS 3 HASH(c2) PARTITIONS 4;
Testing:
Tests added to kudu_partition_ddl.test
Change-Id: I981056e0827f4957580706d6e73742e4e6743c1c
---
M common/thrift/CatalogObjects.thrift
M common/thrift/Frontend.thrift
M fe/pom.xml
M fe/src/main/cup/sql-parser.cup
M
fe/src/main/java/org/apache/impala/analysis/AlterTableAddDropRangePartitionStmt.java
M fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java
M fe/src/main/java/org/apache/impala/analysis/KuduPartitionParam.java
M fe/src/main/java/org/apache/impala/analysis/RangePartition.java
M fe/src/main/java/org/apache/impala/analysis/ShowStatsStmt.java
M fe/src/main/java/org/apache/impala/catalog/FeKuduTable.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/main/java/org/apache/impala/service/KuduCatalogOpExecutor.java
M testdata/cluster/node_templates/common/etc/kudu/master.conf.tmpl
M testdata/workloads/functional-query/queries/QueryTest/kudu_partition_ddl.test
14 files changed, 302 insertions(+), 30 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/76/18676/12
--
To view, visit http://gerrit.cloudera.org:8080/18676
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I981056e0827f4957580706d6e73742e4e6743c1c
Gerrit-Change-Number: 18676
Gerrit-PatchSet: 12
Gerrit-Owner: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>