Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 33C91D01E for ; Mon, 25 Jun 2012 05:04:33 +0000 (UTC) Received: (qmail 78426 invoked by uid 500); 25 Jun 2012 05:04:32 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 78384 invoked by uid 500); 25 Jun 2012 05:04:32 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 78372 invoked by uid 99); 25 Jun 2012 05:04:32 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2012 05:04:32 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 65AAB1C0A38; Mon, 25 Jun 2012 05:04:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6090663919832765729==" MIME-Version: 1.0 Subject: Re: Review Request: HIVE-3148 LOCATION clause is not honored when adding multiple partitions From: "Carl Steinbach" To: "ransom" , "Carl Steinbach" Cc: "hive" , "Shengsheng Huang" Date: Mon, 25 Jun 2012 05:04:30 -0000 Message-ID: <20120625050430.10352.4682@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Carl Steinbach" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/5476/ X-Sender: "Carl Steinbach" References: <20120625033831.10292.16191@reviews.apache.org> In-Reply-To: <20120625033831.10292.16191@reviews.apache.org> Reply-To: "Carl Steinbach" --===============6090663919832765729== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5476/#review8529 ----------------------------------------------------------- Code changes look good. Can you please add a q-file testcase? Directions ar= e located here: https://cwiki.apache.org/confluence/display/Hive/HowToContr= ibute#HowToContribute-AddaUnitTest - Carl Steinbach On June 25, 2012, 3:38 a.m., Shengsheng Huang wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5476/ > ----------------------------------------------------------- > = > (Updated June 25, 2012, 3:38 a.m.) > = > = > Review request for hive, Carl Steinbach and ransom. > = > = > Description > ------- > = > The patch passed the test case provided in the bug. It feed partition p= =3D2 with correct location. = > = > The bug came from the wrong node in the AST, shown as below: = > (TOK_ALTERTABLE_ADDPARTS t (TOK_PARTSPEC (TOK_PARTVAL p 1)) (TOK_PARTITIO= NLOCATION '/Users/carl/1') (TOK_PARTSPEC (TOK_PARTVAL p 2)) (TOK_PARTITIONL= OCATION '/Users/carl/1')) > = > In above AST, TOK_PARTSPEC (specification of partition) and TOK_PARTITION= LOCATION (partition location) nodes are all siblings, which does not make m= uch sense to me. In my patch I rearranged the AST a bit by attaching the TO= K_PARTITIONLOCATION to TOK_PARTSPEC node and it fixed the problem. The new = AST is shown below. DDLSemanticAnalyzer is changed accordingly. > = > (TOK_ALTERTABLE_ADDPARTS t (TOK_PARTSPEC (TOK_PARTVAL p 1) (TOK_PARTITION= LOCATION '/Users/carl/1')) (TOK_PARTSPEC (TOK_PARTVAL p 2) (TOK_PARTITIONLO= CATION '/Users/carl/2'))) > = > = > This addresses bug HIVE-3148. > https://issues.apache.org/jira/browse/HIVE-3148 > = > = > Diffs > ----- > = > http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoo= p/hive/ql/parse/DDLSemanticAnalyzer.java 1352422 = > http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoo= p/hive/ql/parse/Hive.g 1352422 = > = > Diff: https://reviews.apache.org/r/5476/diff/ > = > = > Testing > ------- > = > = > Thanks, > = > Shengsheng Huang > = > --===============6090663919832765729==--