Steve Carlin 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 So I wanted to use the code that they used within Calcite. That Strong.policy() method does a lot of work. If I grep through their code, I actually only see it used within RexSimplify.java. So I'm not sure it's readily available. 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 th I mean...you're prolly right. Very few rules actually need it. I put it everywhere because a) I don't think it costs much to put it there b) If someone new is gonna add a Calcite rule in here, they'll prolly feel like it's something they should do. It would be very easy to add a rule that simplifies and miss the testing for it since it is an edge case. I think doing it on every rule makes it more likely a new code will do it too. It's not a strong case to keep it here, but that's the reason why I did it. I'm open to removing it if you feel strongly about it. 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 p I did this more for safety reasons since I wasn't sure and there's no real harm in keeping it here except a very slight performance hit. I don't mind removing this. -- 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 22:14:50 +0000 Gerrit-HasComments: Yes
