impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <>
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:

File fe/src/main/java/com/cloudera/impala/analysis/

PS14, Line 89:  = false;
No need for the assignment as this variable is assigned in all paths to line 96.
File fe/src/main/java/com/cloudera/impala/analysis/

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.
File fe/src/main/java/com/cloudera/impala/service/

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
File fe/src/main/java/com/cloudera/impala/service/

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"),
               :       }
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
To unsubscribe, visit

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

View raw message