Aman Sinha has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23679 )

Change subject: IMPALA-14525: Calcite planner: Add support for RexSimplify
......................................................................


Patch Set 7:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceOperandShuttle.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceOperandShuttle.java:

http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/coercenodes/CoerceOperandShuttle.java@366
PS7, Line 366:   private static boolean isNullable(RexNode rexNode) {
nit: Isn't there a Calcite utility function for checking the nullability of a 
RexNode ?  Seems common enough use case.


http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaCoreRules.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaCoreRules.java:

http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaCoreRules.java@60
PS7, Line 60:   public static final RelBuilderFactory 
LOGICAL_BUILDER_NO_SIMPLIFY =
Curious why the no_simplify builder is used for all the rules, even ones that 
don't deal with filters or constants.  For instance, why would 
INTERSECT_TO_DISTINCT care about constant folding.   Constant folding is 
relevant for rules involving filter conditions.


http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaJoinSimplifyRule.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaJoinSimplifyRule.java:

http://gerrit.cloudera.org:8080/#/c/23679/7/java/calcite-planner/src/main/java/org/apache/impala/calcite/rules/ImpalaJoinSimplifyRule.java@36
PS7, Line 36: public class ImpalaJoinSimplifyRule extends RelOptRule {
Is this rule meant for actual 2 table join predicates or for single table 
predicates  that happen to be present in the ON clause of a join ?
I would have thought the RexSimplify would mainly apply to single table 
predicates, not join predicates.  You can just point me to an example in the 
test cases if there's one.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I44792688f361bf15affa565e5de5709f64dcf18c
Gerrit-Change-Number: 23679
Gerrit-PatchSet: 7
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Pranav Lodha <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Sun, 18 Jan 2026 21:14:43 +0000
Gerrit-HasComments: Yes

Reply via email to