adriangb commented on code in PR #16530:
URL: https://github.com/apache/datafusion/pull/16530#discussion_r2176459049


##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -468,6 +469,9 @@ impl PruningPredicate {
             &mut required_columns,
             &unhandled_hook,
         );
+        let predicate_schema = required_columns.schema();
+        let predicate_expr =
+            
PhysicalExprSimplifier::new(&predicate_schema).simplify(predicate_expr)?;

Review Comment:
   ```suggestion
           // Simplify the newly created predicate to get rid of redundant 
casts, comparisons, etc.
           let predicate_expr =
               
PhysicalExprSimplifier::new(&predicate_schema).simplify(predicate_expr)?;
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to