alamb commented on a change in pull request #1176:
URL: https://github.com/apache/arrow-datafusion/pull/1176#discussion_r735914124



##########
File path: datafusion/src/optimizer/constant_folding.rs
##########
@@ -61,18 +58,14 @@ impl OptimizerRule for ConstantFolding {
         // children plans.
         let mut simplifier = Simplifier {
             schemas: plan.all_schemas(),
-            execution_props,
         };
 
-        let mut const_evaluator = utils::ConstEvaluator::new();
+        let mut const_evaluator = utils::ConstEvaluator::new(execution_props);
 
         match plan {
-            LogicalPlan::Filter { predicate, input } => Ok(LogicalPlan::Filter 
{

Review comment:
       There is no reason to special case `LogicalPlan::Filter` as the 
`predicate` is handled by `LogicalPlan::expressions` -- and if you look 
carefully this doesn't call rewrite using the `const_evaluator` (I totally 
missed this in #1153 ) but found it while updating tests in this PR




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to