chunweilei commented on a change in pull request #1686: [CALCITE-3630] Improve 
ReduceExpressionsRule
URL: https://github.com/apache/calcite/pull/1686#discussion_r361252973
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java
 ##########
 @@ -270,6 +270,8 @@ private void reduceNotNullableFilter(
           } else {
             call.transformTo(createEmptyRelOrEquivalent(call, filter));
           }
+          // New plan is absolutely better than old plan.
+          call.getPlanner().setImportance(filter, 0.0);
 
 Review comment:
   Thanks for sharing, @danny0405 . IMO, if we already do it in this rule[1], 
it makes sense to do it to be consistent.
   
   [1] 
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java#L216

----------------------------------------------------------------
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