You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Aman Sinha (Code Review)" <ge...@cloudera.org> on 2026/01/18 21:14:43 UTC
[Impala-ASF-CR] IMPALA-14525: Calcite planner: Add support for RexSimplify
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 <sc...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Fang-Yu Rao <fa...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Pranav Lodha <pr...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@gmail.com>
Gerrit-Reviewer: Steve Carlin <sc...@cloudera.com>
Gerrit-Comment-Date: Sun, 18 Jan 2026 21:14:43 +0000
Gerrit-HasComments: Yes