phillipleblanc commented on code in PR #10259: URL: https://github.com/apache/datafusion/pull/10259#discussion_r1584722484
########## datafusion/core/src/physical_optimizer/enforce_distribution.rs: ########## @@ -1192,7 +1192,11 @@ fn ensure_distribution( .collect::<Result<Vec<_>>>()?; let children_plans = children.iter().map(|c| c.plan.clone()).collect::<Vec<_>>(); - plan = if plan.as_any().is::<UnionExec>() && can_interleave(children_plans.iter()) { + + plan = if plan.as_any().is::<UnionExec>() + && !config.optimizer.prefer_existing_union Review Comment: Nope, I think this approach looks good! Thanks! -- 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