You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add config-matrix tests in enforce_distribution.rs for range-satisfaction settings #23572
Is your feature request related to a problem or challenge?
Each operator that opts into range satisfaction currently re-tests the same shared config machinery (datafusion.optimizer.subset_repartition_threshold, datafusion.optimizer.preserve_file_partitions, datafusion.execution.target_partitions) through per-operator blocks in range_partitioning.slt. The machinery is shared, so the file grows the same permutations for every operator.
This was raised in the #23416 review (discussion): keep range_partitioning.slt lean per operator, and cover the config permutations once, colocated with the decision logic.
Describe the solution you'd like
A table-driven test in datafusion/core/tests/physical_optimizer/enforce_distribution.rs asserting reuse (no RepartitionExec inserted; the existing Range partitioning satisfies the requirement) vs. hash repartition (RepartitionExec: Hash inserted) across combinations of:
key match: exact / subset / incompatible
subset_repartition_threshold: met / not met
preserve_file_partitions: met / not met
target_partitions: equal to / greater than input partition count
Behavior verified while developing #23416 that the matrix must pin:
exact key, threshold not met, equal partition count → reuse (repartitioning gains no parallelism)
exact key, threshold not met, target > count, preserve not met → hash repartition
exact key, threshold not met, target > count, preserve met → reuse (the threshold and preserve conditions are OR'd in ensure_distribution)
subset key, threshold not met, preserve not met → hash repartition
incompatible key → hash repartition in all configurations
Describe alternatives you've considered
None.
Additional context
Once the matrix lands, the equivalent per-operator slt permutations in the aggregate section of range_partitioning.slt can also be slimmed, and future operator opt-ins only need operator-specific slt cases.
Activity
blinding-pixels commentedon Jul 15, 2026
take
Add config-matrix tests in enforce_distribution.rs for range-satisfac…
Add config-matrix tests in enforce_distribution.rs for range-satisfac…