Repository navigation
fix: allow equal range split points - #27384
Open
jayshrivastava wants to merge 1 commit into
Open
jayshrivastava wants to merge 1 commit into
jayshrivastava wants to merge 1 commit into
Conversation
Accept non-decreasing split points so repeated cuts preserve empty partitions, with primitive and compound-key routing regression tests. Generated-by: Codex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Part of #26509. Extracted from #26593 following the request to land equal split points separately and the request for standalone routing tests.
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?
validate_range_split_points, while continuing to reject decreasing cuts and invalid tuple widths.RepartitionExecrouting 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.
dev/rust_lint.shpassed, 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 incompatiblecargo-machetebinary.range_repartitionCriterion cases againstmain(b5bcea88a4,release-nonlto) detected no regressions: uniform and sequential keys, partitioner construction, and unchangedRangeExprrouting 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_pointsand the logical and physicalRangePartitioningconstructors 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.