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



##########
File path: datafusion/src/execution/context.rs
##########
@@ -896,12 +895,13 @@ impl Default for ExecutionConfig {
             target_partitions: num_cpus::get(),
             batch_size: 8192,
             optimizers: vec![
-                Arc::new(ConstantFolding::new()),
+                // Simplify expressions first to maximize the chance
+                // of applying other optimizations
+                Arc::new(SimplifyExpressions::new()),

Review comment:
       This change has the additional benefit of allowing even more filters to 
be pushed down (e.g. `column * 1 < 5` which is simplified by the code in 
`simpify` to `column < 5` can now also be pushed down

##########
File path: datafusion/src/execution/context.rs
##########
@@ -896,12 +895,13 @@ impl Default for ExecutionConfig {
             target_partitions: num_cpus::get(),
             batch_size: 8192,
             optimizers: vec![
-                Arc::new(ConstantFolding::new()),
+                // Simplify expressions first to maximize the chance
+                // of applying other optimizations
+                Arc::new(SimplifyExpressions::new()),

Review comment:
       This change has the additional benefit of allowing even more filters to 
be pushed down (e.g. `column * 1 < 5` which is simplified by the code in 
`simplify` to `column < 5` can now also be pushed down




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