Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5615: Fix compute incremental stats for general 
partition exprs
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7379/1/fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java
File fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java:

Line 361:             Sets.newLinkedHashSet(partitionSet_.getPartitions());
> I added this for having O(1) lookups on L374. Given the partitionSet_ can n
Ah I see.

Yeah I was thinking that you were using the HashSet to de-duplicate the 
partitions for some reason, but that wasn't the intention.

This is a little subtle. How about just iterating over 
partitionSet_.getPartitions() for this loop, then creating the HashSet on line 
371 closer to where it is used. Maybe add a short comment as well to explain 
that HashSet is needed for O(1) lookup.


-- 
To view, visit http://gerrit.cloudera.org:8080/7379
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I227fc06f580eb9174f60ad0f515a3641cec19268
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to