alamb opened a new issue, #15045: URL: https://github.com/apache/datafusion/issues/15045
### Is your feature request related to a problem or challenge? @jayzhan211 removed the `UnwrapCastInComparison` optimizer (and combined it with the simplifier) In - https://github.com/apache/datafusion/pull/15012 Doing so seemed to make a non trivial difference for planning speed: - https://github.com/apache/datafusion/pull/15012#issuecomment-2701077462 I *think* the improvement came from reducing the number of Optimizer passes (and this rewrites/copies of the plan and all expressions) that happened Here were my mesurements about speed <img width="726" alt="Image" src="https://github.com/user-attachments/assets/4aaea59f-373b-4bf6-a320-4ebeb52cde6b" /> ### Describe the solution you'd like I would like to make planning faster by potentially combining other passes from this list: https://github.com/apache/datafusion/blob/43ecd9b807877946706628633308f73a4645de1f/datafusion/optimizer/src/optimizer.rs#L243-L272 ### Describe alternatives you've considered Some potential candidates to try consolidating: * `EliminateNestedUnion` + `EliminateOneUnion` * `EliminateJoin` and `EliminateJoin` You can run the planning benchmarks like ```shell cargo bench --bench sql_planner ``` ### Additional context _No response_ -- 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.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