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 3E437200B8B for ; Tue, 4 Oct 2016 22:10:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3CBBD160ACC; Tue, 4 Oct 2016 20:10:47 +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 78FC0160AC7 for ; Tue, 4 Oct 2016 22:10:46 +0200 (CEST) Received: (qmail 59241 invoked by uid 500); 4 Oct 2016 20:10:45 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 59225 invoked by uid 99); 4 Oct 2016 20:10:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2016 20:10:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id F3EE218059B for ; Tue, 4 Oct 2016 20:10:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id DJ63SnrYrRe0 for ; Tue, 4 Oct 2016 20:10:43 +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 mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DA4675F4EC for ; Tue, 4 Oct 2016 20:10:42 +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 u94KAgIA030048; Tue, 4 Oct 2016 20:10:42 GMT Message-Id: <201610042010.u94KAgIA030048@ip-10-146-233-104.ec2.internal> Date: Tue, 4 Oct 2016 20:10:42 +0000 From: "Michael Ho (Code Review)" To: Attila Jeges , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dimitris Tsirogiannis , Bharath Vissapragada , Lars Volker Reply-To: kwho@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-1670=2CIMPALA-4141=3A_Support_multiple_partitions_in_ALTER_TABLE_ADD_PARTITION=0A?= X-Gerrit-Change-Id: Iddbc951f2931f488f7048c9780260f6b49100750 X-Gerrit-ChangeURL: X-Gerrit-Commit: 4ba5f4977c3fb711b1c613eecfe40c0efbbd8991 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.12.2 archived-at: Tue, 04 Oct 2016 20:10:47 -0000 Michael Ho has posted comments on this change. Change subject: IMPALA-1670,IMPALA-4141: Support multiple partitions in ALTER TABLE ADD PARTITION ...................................................................... Patch Set 14: (11 comments) http://gerrit.cloudera.org:8080/#/c/4144/14/fe/src/main/java/com/cloudera/impala/analysis/PartitionParams.java File fe/src/main/java/com/cloudera/impala/analysis/PartitionParams.java: PS14, Line 89: = false; No need for the assignment as this variable is assigned in all paths to line 96. http://gerrit.cloudera.org:8080/#/c/4144/14/fe/src/main/java/com/cloudera/impala/analysis/PartitionSpec.java File fe/src/main/java/com/cloudera/impala/analysis/PartitionSpec.java: PS14, Line 211: new Comparator() { : @Override : public int compare(PartitionKeyValue t, PartitionKeyValue o) { : return t.getColName().compareTo(o.getColName()); : } What do you think about implementing the Comparable interface for PartitionKeyValue ? That would make the comparator reusable else where too and it would be consistent across all callsites. http://gerrit.cloudera.org:8080/#/c/4144/13/fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java File fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java: PS13, Line 1634: IF NOT EXISTS is used, conflicts are hand Same comment as above. I suppose this one is "IF NOT EXISTS is used" and the one above "IF NOT EXISTS is not used". PS13, Line 1720: nit: long line http://gerrit.cloudera.org:8080/#/c/4144/14/fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java File fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java: Line 1630: * If IF NOT EXISTS is not used and there is a conflict with the nit: this line seems to wrap a bit early. We allow up to 90 chars per line. PS14, Line 1658: and ifNotExists is true. Is this needed ? If so, will "IF NOT EXISTS was specified" be more appropriate ? PS14, Line 1694: 'ifNotExists' is true Does the HMS call throw an exception if "ifNotExits" is false and some partitions already exist in HMS ? PS14, Line 1694: if nit: "If" PS14, Line 1706: addHdfsPartition(tbl, partition); Do you know how this function synchronizes against concurrent query adding the same set of partitions ? PS14, Line 1724: if (!bSet.contains(a.getValues())) { : diffList.add(a); nit: one line PS14, Line 1800: try { : msClient.getHiveClient().alter_partitions(tableName.getDb(), tableName.getTbl(), : hmsPartitionsToCache); : } catch (TException e) { : throw new ImpalaRuntimeException( : String.format(HMS_RPC_ERROR_FORMAT_STR, "alter_partitions"), e); : } Should this be factored out to a function similar to applyAlterPartition() ? In fact, is it possible to somehow combine this with applyAlterPartition() by passing a list with single entry ? -- To view, visit http://gerrit.cloudera.org:8080/4144 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iddbc951f2931f488f7048c9780260f6b49100750 Gerrit-PatchSet: 14 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Attila Jeges Gerrit-Reviewer: Attila Jeges Gerrit-Reviewer: Bharath Vissapragada Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Lars Volker Gerrit-Reviewer: Michael Ho Gerrit-HasComments: Yes