impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Casey Ching (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) Refactor CREATE TABLE grammar rules in prep for PRIMARY KEY
Date Mon, 09 May 2016 20:37:26 GMT
Casey Ching has uploaded a new patch set (#7).

Change subject: Refactor CREATE TABLE grammar rules in prep for PRIMARY KEY
......................................................................

Refactor CREATE TABLE grammar rules in prep for PRIMARY KEY

I tried adding PRIMARY KEY for Kudu tables but there was a reduce/reduce
error. Because the create table grammar rules are scattered and very
verbose it was difficult to figure out where the problem was. This
consolidates the various create table rules.

There are two changes to the grammar:
1) One or more versions of creating an external table didn't allow the
   DISTRIBUTE BY clause. DISTRIBUTE BY only make sense for managed Kudu
   tables. There was also a check for this in analysis so not much
   needed to be done.
2) DISTRIBUTE BY now comes before "STORED AS KUDU". "STORED AS KUDU"
   was never released so the change shouldn't matter.

There is still some messiness around EXTERNAL but I think fixing that
will require very verbose grammar rules. It's probably not worth the
trouble.

Change-Id: I9a2b9e380a0b90c0e2e6f10f6905cab5164cb3c4
---
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableDataSrcStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableLikeFileStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableLikeStmt.java
M fe/src/main/java/com/cloudera/impala/analysis/CreateTableStmt.java
A fe/src/main/java/com/cloudera/impala/analysis/TableDataLayout.java
A fe/src/main/java/com/cloudera/impala/analysis/TableDef.java
A fe/src/main/java/com/cloudera/impala/analysis/TableDefOptions.java
M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/com/cloudera/impala/analysis/ParserTest.java
M testdata/workloads/functional-query/queries/QueryTest/kudu-scan-node.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
14 files changed, 556 insertions(+), 485 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/65/2865/7
-- 
To view, visit http://gerrit.cloudera.org:8080/2865
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9a2b9e380a0b90c0e2e6f10f6905cab5164cb3c4
Gerrit-PatchSet: 7
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Casey Ching <casey@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Casey Ching <casey@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>

Mime
View raw message