danny0405 commented on a change in pull request #1610: [CALCITE-3525] 
RexSimplify: eliminate redundant rex calls in OR
URL: https://github.com/apache/calcite/pull/1610#discussion_r358029304
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
 ##########
 @@ -1970,6 +1980,8 @@ public static void registerDefaultRules(RelOptPlanner 
planner,
     // Change the below to enable constant-reduction.
     if (false) {
       registerReductionRules(planner);
+    } else {
+      planner.addRule(ReduceExpressionsRule.FILTER_INSTANCE);
 
 Review comment:
   Indeed the cases that need constant reduction in rule planning is rare, 
except for the cases we bring in new constant in the planning rules.
   
   In Flink, we have a little such rules to explode some predicates for Join 
condition(in order to generate HashJoin), but indeed, the benefits of constant 
reduction are small.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to