neilconway opened a new issue, #22531: URL: https://github.com/apache/datafusion/issues/22531
### Is your feature request related to a problem or challenge? Currently, the `EliminateOuterJoin` rewrite looks for a `Filter` node directly above a `Join` node. For most queries, that is the right plan shape to look for (because `PushdownFilter` will typically place the filters that are useful for outer join elimination directly on top of the relevant `Join` node). However, some plans don't follow this shape: 1. Filters on volatile expressions result in a `Projection` node between the `Filter` and the `Join` 2. `OptimizeProjections` might result in placing a `Projection` node between the `Filter` and the `Join` Notably, case #2 appears when optimizing TPC-DS Q49; we currently fail to convert three outer joins to inner joins for that reason. In both cases, we can teach `EliminateOuterJoin` to look for the `Filter` -> `Projection` -> `Join` plan shape as well. ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### 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: [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]
