EdsonPetry opened a new pull request, #23584: URL: https://github.com/apache/datafusion/pull/23584
## Which issue does this PR close? - Closes #23450. ## Rationale for this change #23184 allowed compatible range-partitioned inputs to satisfy partitioned inner joins without hash repartitioning. However, join output still downgraded `Partitioning::Range` to `UnknownPartitioning`, so downstream joins and aggregates could not reuse the preserved range layout and inserted avoidable hash repartitions. ## What changes are included in this PR? - Preserve `Partitioning::Range` in `adjust_right_output_partitioning`. - Shift right-side range-ordering column indexes into the joined schema while retaining split points and sort options. - Add unit coverage for compound range keys and non-default sort options. - Update SQL logic test plans for nested range joins and a range join feeding an aggregate. ## Are these changes tested? Yes. - `./dev/rust_lint.sh` - `cargo clippy --all-targets --all-features -- -D warnings` - `cargo test -p datafusion-physical-plan test_adjust_right_output_partitioning_preserves_range` - `cargo test --profile=ci --test sqllogictests -- range_partitioning.slt` - `ulimit -n 10240 && RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption` ## Are there any user-facing changes? Yes. Physical plans can preserve proven range partitioning through joins, allowing compatible downstream joins and aggregates to avoid unnecessary hash repartitioning. There are no public API changes. -- 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]
