Kurt Deschler 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) Thanks. 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 Done 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 Done 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_ r I added a testcase. It looks like the BetweenToCompoundRule is always applied during analysis since it has no restrictions on the arg types. 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://gerri I confirmed that it is the assignment of expr from IMPALA-8148 that caused the precondition to fail. This is reassurance that the changes here are a proper fix. -- 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: Bharath Vissapragada <[email protected]> Gerrit-Reviewer: Fredy Wijaya <[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: Mon, 16 Mar 2020 02:32:49 +0000 Gerrit-HasComments: Yes
