alamb commented on code in PR #13046: URL: https://github.com/apache/datafusion/pull/13046#discussion_r1811262014
########## datafusion/core/src/physical_optimizer/optimizer.rs: ########## @@ -103,6 +103,10 @@ impl PhysicalOptimizer { // replacing operators with fetching variants, or adding limits // past operators that support limit pushdown. Arc::new(LimitPushdown::new()), + // The EliminateCommonPhysicalSubExprs rule extracts common physical + // subexpression trees into a `ProjectionExec` node under the actual node to + // calculate the common values only once. + Arc::new(EliminateCommonPhysicalSubexprs::new()), Review Comment: I think the usecase is for systems (like Comet) that don't use the LogicalPlanner. That being said, I think the question of "should it be run by default" is a good one -- and I agree with your assertion if we can't find an example where this helps a plan we should probably not enable it by default. FYI @andygrove -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org