alamb opened a new pull request, #18678: URL: https://github.com/apache/datafusion/pull/18678
## Which issue does this PR close? - Related to https://github.com/apache/datafusion/issues/17261 ## Rationale for this change Each time a LogicalPlan is rewritten to eliminate a Union, we traverse the entire plan tree and copy some non trivial parts of it Thus it is faster to plan when we have fewer passes over the plan tree the EliminateNestedUnion and EliminateOneUnion rules both do similar things, and the EliminateNestedUnion rule is very simple. So let's combine them into a single rule that does both things in one pass over the plan tree. ## What changes are included in this PR? Consolidate `EliminateNestedUnion` and `EliminateOneUnion` optimizer rules into a single pass ## Are these changes tested? Yes with existing tests I will also run planning benchmarks ## Are there any user-facing changes? No -- 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]
