jayshrivastava opened a new pull request, #27384:
URL: https://github.com/apache/datafusion/pull/27384

   ## Which issue does this PR close?
   
   Part of #26509. Extracted from #26593 following the [request to land equal 
split points 
separately](https://github.com/apache/datafusion/pull/26593#pullrequestreview-5866547472)
 and the [request for standalone routing 
tests](https://github.com/apache/datafusion/pull/26593#pullrequestreview-5874321315).
   
   ## Rationale for this change
   
   Repeated quantile cuts on skewed keys and intentionally empty partitions can 
require equal adjacent split points. These layouts currently fail validation. 
Allowing non-decreasing cuts preserves the requested partition count: splits 
`[10, 10, 20]` route keys `[5, 10, 15, 25]` to `[5]`, `[]`, `[10, 15]`, and 
`[25]`.
   
   ## What changes are included in this PR?
   
   - Allow equality in `validate_range_split_points`, while continuing to 
reject decreasing cuts and invalid tuple widths.
   - Document that equal keys route after the last equal split point and that 
intervening partitions are empty.
   - Update constructor, file-scan, and range-transform validation tests, and 
add `RepartitionExec` routing regressions for primitive and two-column keys.
   
   ## What is the testing strategy for this PR?
   
   Both new routing regressions fail with the old validation. The primitive 
case exercises the specialized router; the compound case also checks keys that 
differ in the second column around repeated boundaries.
   
   - 5,978 unit tests across the five affected crates passed (two existing 
ignored tests).
   - 2,486 core and CLI tests passed, and all 549 SQL logic test files passed.
   - All checks in `dev/rust_lint.sh` passed, including 
all-targets/all-features Clippy with `-D warnings`, generated documentation 
checks, and Rust/HTML documentation builds. The final checks were resumed after 
rebuilding a locally incompatible `cargo-machete` binary.
   - Eight `range_repartition` Criterion cases against `main` (`b5bcea88a4`, 
`release-nonlto`) detected no regressions: uniform and sequential keys, 
partitioner construction, and unchanged `RangeExpr` routing at 8 and 512 
partitions (30 samples per case, pinned to the same CPU).
   
   ## Are there any user-facing changes?
   
   `datafusion_common::validate_range_split_points` and the logical and 
physical `RangePartitioning` constructors now accept equal adjacent split 
points. Callers that relied on duplicate rejection must check for equality 
explicitly. The DataFusion 57 upgrade guide documents this behavior change.
   


-- 
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]

Reply via email to