Parent: #22395
Add partitioning compatibility helpers.
Partitioning::Range describes range-partitioned data, but optimizer and execution work lack a good way to ask whether two partitioning schemes describe the same partition map. This issue adds that API surface without changing planning behavior:
- Add
Partitioning::compatible_with.
- Add
RangePartitioning::compatible_with.
compatible_with is different from satisfaction:
satisfaction asks whether a partitioning can satisfy a required distribution.
- Example: a single-partition input satisfies
HashPartitioned([a]) because no repartition is needed for correctness.
compatible_with asks whether partition i on both sides covers the same key domain. Example: two range partitionings on a with split points [10, 20] are compatible because partition 1 means 10 <= a < 20 on both sides.
This distinction is useful for partition-local behavior such as joins or dynamic filters. If two partition maps are compatible, partition-local state from partition i can be applied to partition i safely. If compatibility is not proven, later optimizer rules should keep the existing safe fallback behavior.
Parent: #22395
Add partitioning compatibility helpers.
Partitioning::Rangedescribes range-partitioned data, but optimizer and execution work lack a good way to ask whether two partitioning schemes describe the same partition map. This issue adds that API surface without changing planning behavior:Partitioning::compatible_with.RangePartitioning::compatible_with.compatible_withis different fromsatisfaction:satisfactionasks whether a partitioning can satisfy a required distribution.HashPartitioned([a])because no repartition is needed for correctness.compatible_withasks whether partitionion both sides covers the same key domain. Example: two range partitionings onawith split points[10, 20]are compatible because partition 1 means10 <= a < 20on both sides.This distinction is useful for partition-local behavior such as joins or dynamic filters. If two partition maps are compatible, partition-local state from partition
ican be applied to partitionisafely. If compatibility is not proven, later optimizer rules should keep the existing safe fallback behavior.