You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Casey Ching (Code Review)" <ge...@cloudera.org> on 2016/05/06 19:00:16 UTC

[Impala-CR](cdh5-trunk) IMPALA-2848: Simplify creation of a new Kudu table

Casey Ching has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2984

Change subject: IMPALA-2848: Simplify creation of a new Kudu table
......................................................................

IMPALA-2848: Simplify creation of a new Kudu table

Changes:
1) Add PRIMARY KEY at the column and table level. This syntax is fairly
   standard. When used at the column level, only one column can be
   marked as a key. When used at the table level, multiple columns can
   be used as a key. Only Kudu tables are allowed to use PRIMARY KEY.
   The old "kudu.key_columns" table property is no longer accepted
   though it is still used internally. "PRIMARY" is now a key word.
   "KEY" is expected to be common enough that the ident style
   declaration is used instead to avoid conflicts.
2) Infer a Kudu table name if none was given. The table property
   "kudu.table_name" is now optional. If not given, the Kudu table name
   will be created based on the Hive Metastore database and table name.
   "CREATE TABLE foo.bar (i INT PRIMARY KEY) STORED AS KUDU" will create
   a table in Kudu named "foo.bar". If the database is "default" then
   the Kudu table name will not include the database.
3) Moved the kudu_master_addrs flag from catalogd to impalad. The flag
   was originally in catalogd so there would only be one definition of
   the value. Unfortunately the way CTAS is implemented, the complete
   to-be-created table definition needs to be available during analysis.
   The most practical thing to do is to move the flag to the impalad so
   it is easily accessible.
4) Remove throwing of TableLoadingExceptions for Kudu tables. This came
   up while working on #3. Throwing TableLoadingExceptions makes the
   tables unfixable by the user. (More testing needs to be done,
   particularly the case where all columns fail to load. If not using
   TableLoadingExceptions turns out to cause more problems, I'll revert
   this part.)

Change-Id: Iba5714941a81bad7a410c850e4037637cffaf8ab
---
M be/src/catalog/catalog.cc
M be/src/service/frontend.cc
M bin/start-impala-cluster.py
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/com/cloudera/impala/analysis/ColumnDef.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableAsSelectStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/DistributeParam.java
M fe/src/main/java/com/cloudera/impala/analysis/TableDefClause.java
M fe/src/main/java/com/cloudera/impala/analysis/TableName.java
M fe/src/main/java/com/cloudera/impala/catalog/Catalog.java
M fe/src/main/java/com/cloudera/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/com/cloudera/impala/catalog/ImpaladCatalog.java
M fe/src/main/java/com/cloudera/impala/catalog/KuduTable.java
M fe/src/main/java/com/cloudera/impala/catalog/delegates/KuduDdlDelegate.java
M fe/src/main/java/com/cloudera/impala/planner/HdfsPartitionFilter.java
M fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java
M fe/src/main/java/com/cloudera/impala/service/Frontend.java
M fe/src/main/java/com/cloudera/impala/service/JniCatalog.java
M fe/src/main/java/com/cloudera/impala/service/JniFrontend.java
M fe/src/main/java/com/cloudera/impala/util/KuduUtil.java
M fe/src/main/jflex/sql-scanner.flex
M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/com/cloudera/impala/analysis/ParserTest.java
M fe/src/test/java/com/cloudera/impala/service/JdbcTest.java
M fe/src/test/java/com/cloudera/impala/testutil/CatalogServiceTestCatalog.java
M fe/src/test/java/com/cloudera/impala/testutil/ImpaladTestCatalog.java
M testdata/workloads/functional-query/queries/QueryTest/kudu-scan-node.test
M testdata/workloads/functional-query/queries/QueryTest/kudu-show-create.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_alter.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_crud.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_partition_ddl.test
M testdata/workloads/functional-query/queries/QueryTest/kudu_stats.test
M tests/custom_cluster/test_kudu.py
M tests/query_test/test_kudu.py
35 files changed, 557 insertions(+), 531 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/84/2984/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2984
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba5714941a81bad7a410c850e4037637cffaf8ab
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Casey Ching <ca...@cloudera.com>