Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65E242004C8 for ; Mon, 9 May 2016 22:37:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6440A1609A8; Mon, 9 May 2016 20:37:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AD70F16099C for ; Mon, 9 May 2016 22:37:34 +0200 (CEST) Received: (qmail 65419 invoked by uid 500); 9 May 2016 20:37:34 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 65408 invoked by uid 99); 9 May 2016 20:37:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 20:37:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 31039C0BC5 for ; Mon, 9 May 2016 20:37:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id L3aR1k-hvUdV for ; Mon, 9 May 2016 20:37:32 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 085395F231 for ; Mon, 9 May 2016 20:37:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u49KbVHJ017553; Mon, 9 May 2016 20:37:31 GMT Message-Id: <201605092037.u49KbVHJ017553@ip-10-146-233-104.ec2.internal> Date: Mon, 9 May 2016 20:37:26 +0000 From: "Casey Ching (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Matthew Jacobs , Alex Behm Reply-To: casey@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_Refactor_CREATE_TABLE_grammar_rules_in_prep_for_PRIMARY_KEY=0A?= X-Gerrit-Change-Id: I9a2b9e380a0b90c0e2e6f10f6905cab5164cb3c4 X-Gerrit-ChangeURL: X-Gerrit-Commit: a54a24b3a55f2f44ef773cbcf5a7012bca268254 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 archived-at: Mon, 09 May 2016 20:37:35 -0000 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 Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Casey Ching Gerrit-Reviewer: Matthew Jacobs