impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-1670,IMPALA-4141: Support multiple partitions in ALTER TABLE ADD PARTITION
Date Tue, 04 Oct 2016 20:10:42 GMT
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<PartitionKeyValue>() {
              :       @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 <attilaj@cloudera.com>
Gerrit-Reviewer: Attila Jeges <attilaj@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message