Dandandan opened a new pull request, #21822: URL: https://github.com/apache/datafusion/pull/21822
## Which issue does this PR close? - None. ## Rationale for this change Physical plans currently only do local binary join-side selection. Multi-way inner hash join islands can preserve large left-deep intermediates even when statistics make a smaller connected join available first. ## What changes are included in this PR? - Adds an early bounded Selinger-style DP subrule in JoinSelection for inner HashJoinExec islands up to 8 inputs. - Preserves output column order/schema with ProjectionExec when the chosen order changes output layout. - Keeps conservative guards for filters, null-aware joins, non-column join keys, disconnected islands, and schema metadata. ## Are these changes tested? - cargo fmt --all - cargo clippy -p datafusion-physical-optimizer --all-targets --all-features -- -D warnings - cargo test -p datafusion --test core_integration physical_optimizer::join_selection -- --nocapture - INCLUDE_TPCH=true cargo test -p datafusion-sqllogictest --test sqllogictests -- tpch ## Are there any user-facing changes? No API changes. Query plans for eligible inner hash join islands may use a different join order when statistics indicate a cheaper plan. -- 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]
