neilconway opened a new pull request, #21986: URL: https://github.com/apache/datafusion/pull/21986
## Which issue does this PR close? - Closes #21349. ## Rationale for this change `ScalarSubqueryExec` marked its main input (the parent query of the subquery) as benefitting from partitioning, but that was incorrect: `ScalarSubqueryExec` is just a passthrough node, so it doesn't benefit from input partitioning itself. This bug resulted in inserting unnecessary `RepartitionExec` nodes underneath `ScalarSubqueryExec`, notably in TPC-H Q22. ## What changes are included in this PR? * Fix input-partitioning behavior for `ScalarSubqueryExec` * Add SLT test to confirm this behavior * Update expected plan for TPC-H Q22 ## Are these changes tested? Yes. ## Are there any user-facing changes? Yes, some query plans will change (and improve). -- 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]
