Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15371 )

Change subject: IMPALA-9429: Unioned partition columns break partition pruning
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/15371/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/15371/2//COMMIT_MSG@16
PS2, Line 16: This fix adds constant a folding call after union substitutions 
occur
Need to update this


http://gerrit.cloudera.org:8080/#/c/15371/2/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
File fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java:

http://gerrit.cloudera.org:8080/#/c/15371/2/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java@98
PS2, Line 98:   private final ExprRewriter constantFolder_ =
unused var


http://gerrit.cloudera.org:8080/#/c/15371/2/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java@145
PS2, Line 145:         partitionConjuncts.add(clonedConjunct);
Not sure if we already have test coverage for the case when exprRewriter_ 
rewrites the conjuct using BetweenToCompoundRule. If not, I think we should add 
test coverage for that. Also we need test coverage for case that the two rules 
(BetweenToCompoundRule and FoldConstantsRule) both take effect.


http://gerrit.cloudera.org:8080/#/c/15371/2/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java@201
PS2, Line 201:         // TODO: Analyzer should already have done constant 
folding
             :         // and rewrite -- unless this is a copy of an expression 
taken
             :         // before analysis, which would introduce its own issues.
             :         expr = analyzer.getConstantFolder().rewrite(expr, 
analyzer);
             :         Preconditions.checkState(expr instanceof 
BinaryPredicate);
Before IMPALA-8148, this try-clause changes nothing actually: 
https://gerrit.cloudera.org/c/12317/8/fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
It just performs a rewrite and ignore the returned result. This explains why 
IMPALA-8148 introduces the bug.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c1384c2cd1ad5f7024449196f9a348ecdccb60b
Gerrit-Change-Number: 15371
Gerrit-PatchSet: 2
Gerrit-Owner: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Anurag Mantripragada <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>
Gerrit-Comment-Date: Thu, 12 Mar 2020 13:14:35 +0000
Gerrit-HasComments: Yes

Reply via email to