Uh oh!
There was an error while loading. Please reload this page.
Allow Range partitioned inputs to PartitionedTopK - #23355
Conversation
1b1c490 to
e236f7bCompareeb2c841 to
3ab476dComparegene-bordegaray
commented
Jul 9, 2026
This is in my queue, just waiting for #23184 to land 🙇 |
3ab476d to
7d0f380Compare
gene-bordegaray
left a comment
There was a problem hiding this comment.
Looks goodl, siilar to #23416 lets keep the testing set in slt leaner and not stress the full preserve_file_partitions and subset_repartition_threshold matrix. I will make a PR to have this matrix tested in the unit 👍
I think for slt tests keeping it to a simple positive / negative, subset positive / negative is good, lmk what you think 🙇
Thank you
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
7d0f380 to
ab90d5cComparestuhood
commented
Jul 13, 2026
Thanks @gene-bordegaray : have rebased atop #23416 (only the top 3 commits are relevant) and applied your feedback. I'll put this back in draft until #23416 has landed. |
ab90d5c to
c92419eCompare…rtitioned requirements (apache#23416) ## Which issue does this PR close? - Closesapache#23289. Rebased on main now that apache#23184 has merged. Overlaps with apache#23355, which also opts the window execs into range satisfaction as part of its PartitionedTopK work — happy to rebase whichever lands second. ## What changes are included in this PR? In one commit: * Opt `WindowAggExec` and `BoundedWindowAggExec` with partition keys into range satisfaction via `InputDistributionRequirements::allow_range_satisfaction_for_key_partitioning`, mirroring `AggregateExec`. Compatible range-partitioned inputs then satisfy the window key requirement without a hash repartition; subset satisfaction and the hash fallback for incompatible keys come from the existing satisfaction machinery. Windows without `PARTITION BY` keep requiring a single partition. ## Are these changes tested? Yes: new `slt` tests in `range_partitioning.slt` (exact and subset reuse, rehash on incompatible keys, `subset_repartition_threshold` / `preserve_file_partitions` / `target_partitions` behavior, `WindowAggExec` via an unbounded frame, and no-`PARTITION BY`), plus plan-shape tests in `enforce_distribution.rs` and acceptance/rejection tests in `sanity_checker.rs`. ## Are there any user-facing changes? No: only plan changes.
stuhood
commented
Jul 14, 2026
@gene-bordegaray: Ready for another look! Thanks. |
gene-bordegaray
left a comment
There was a problem hiding this comment.
Great, thanks. Just some small nits 👍
cc: @gabotechs
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gabotechs
left a comment
There was a problem hiding this comment.
Thanks @stuhood and @gene-bordegaray!
Uh oh!
There was an error while loading. Please reload this page.
…rtitioned requirements (apache#23416) ## Which issue does this PR close? - Closesapache#23289. Rebased on main now that apache#23184 has merged. Overlaps with apache#23355, which also opts the window execs into range satisfaction as part of its PartitionedTopK work — happy to rebase whichever lands second. ## What changes are included in this PR? In one commit: * Opt `WindowAggExec` and `BoundedWindowAggExec` with partition keys into range satisfaction via `InputDistributionRequirements::allow_range_satisfaction_for_key_partitioning`, mirroring `AggregateExec`. Compatible range-partitioned inputs then satisfy the window key requirement without a hash repartition; subset satisfaction and the hash fallback for incompatible keys come from the existing satisfaction machinery. Windows without `PARTITION BY` keep requiring a single partition. ## Are these changes tested? Yes: new `slt` tests in `range_partitioning.slt` (exact and subset reuse, rehash on incompatible keys, `subset_repartition_threshold` / `preserve_file_partitions` / `target_partitions` behavior, `WindowAggExec` via an unbounded frame, and no-`PARTITION BY`), plus plan-shape tests in `enforce_distribution.rs` and acceptance/rejection tests in `sanity_checker.rs`. ## Are there any user-facing changes? No: only plan changes.
- Closesapache#23290. In two commits: * Improve the robustness of `WindowTopN` to intermediate `RepartitionExec` nodes, to ensure that `PartitionedTopK` can still be used when `target_partitions` mismatches physical partitions. * Use `required_input_distributions` to declare required partitioning for `PartitionedTopKExec`, `BoundedWindowAggExec`, and `WindowAggExec`. Yes, new `slt` tests are added for both the `WindowTopN` robustness fix, and for the use of `required_input_distributions` in `PartitionedTopK`. No: only plan changes.
…rtitioned requirements (apache#23416) ## Which issue does this PR close? - Closesapache#23289. Rebased on main now that apache#23184 has merged. Overlaps with apache#23355, which also opts the window execs into range satisfaction as part of its PartitionedTopK work — happy to rebase whichever lands second. ## What changes are included in this PR? In one commit: * Opt `WindowAggExec` and `BoundedWindowAggExec` with partition keys into range satisfaction via `InputDistributionRequirements::allow_range_satisfaction_for_key_partitioning`, mirroring `AggregateExec`. Compatible range-partitioned inputs then satisfy the window key requirement without a hash repartition; subset satisfaction and the hash fallback for incompatible keys come from the existing satisfaction machinery. Windows without `PARTITION BY` keep requiring a single partition. ## Are these changes tested? Yes: new `slt` tests in `range_partitioning.slt` (exact and subset reuse, rehash on incompatible keys, `subset_repartition_threshold` / `preserve_file_partitions` / `target_partitions` behavior, `WindowAggExec` via an unbounded frame, and no-`PARTITION BY`), plus plan-shape tests in `enforce_distribution.rs` and acceptance/rejection tests in `sanity_checker.rs`. ## Are there any user-facing changes? No: only plan changes.
- Closesapache#23290. In two commits: * Improve the robustness of `WindowTopN` to intermediate `RepartitionExec` nodes, to ensure that `PartitionedTopK` can still be used when `target_partitions` mismatches physical partitions. * Use `required_input_distributions` to declare required partitioning for `PartitionedTopKExec`, `BoundedWindowAggExec`, and `WindowAggExec`. Yes, new `slt` tests are added for both the `WindowTopN` robustness fix, and for the use of `required_input_distributions` in `PartitionedTopK`. No: only plan changes.
…rtitioned requirements (apache#23416) ## Which issue does this PR close? - Closesapache#23289. Rebased on main now that apache#23184 has merged. Overlaps with apache#23355, which also opts the window execs into range satisfaction as part of its PartitionedTopK work — happy to rebase whichever lands second. ## What changes are included in this PR? In one commit: * Opt `WindowAggExec` and `BoundedWindowAggExec` with partition keys into range satisfaction via `InputDistributionRequirements::allow_range_satisfaction_for_key_partitioning`, mirroring `AggregateExec`. Compatible range-partitioned inputs then satisfy the window key requirement without a hash repartition; subset satisfaction and the hash fallback for incompatible keys come from the existing satisfaction machinery. Windows without `PARTITION BY` keep requiring a single partition. ## Are these changes tested? Yes: new `slt` tests in `range_partitioning.slt` (exact and subset reuse, rehash on incompatible keys, `subset_repartition_threshold` / `preserve_file_partitions` / `target_partitions` behavior, `WindowAggExec` via an unbounded frame, and no-`PARTITION BY`), plus plan-shape tests in `enforce_distribution.rs` and acceptance/rejection tests in `sanity_checker.rs`. ## Are there any user-facing changes? No: only plan changes.
## Which issue does this PR close? - Closesapache#23290. ## What changes are included in this PR? In two commits: * Improve the robustness of `WindowTopN` to intermediate `RepartitionExec` nodes, to ensure that `PartitionedTopK` can still be used when `target_partitions` mismatches physical partitions. * Use `required_input_distributions` to declare required partitioning for `PartitionedTopKExec`, `BoundedWindowAggExec`, and `WindowAggExec`. ## Are these changes tested? Yes, new `slt` tests are added for both the `WindowTopN` robustness fix, and for the use of `required_input_distributions` in `PartitionedTopK`. ## Are there any user-facing changes? No: only plan changes.
Which issue does this PR close?
Partitioning::Rangeto satisfy PartitionedTopKDistribution::KeyPartitionedrequirements #23290.What changes are included in this PR?
In two commits:
WindowTopNto intermediateRepartitionExecnodes, to ensure thatPartitionedTopKcan still be used whentarget_partitionsmismatches physical partitions.required_input_distributionsto declare required partitioning forPartitionedTopKExec,BoundedWindowAggExec, andWindowAggExec.Are these changes tested?
Yes, new
slttests are added for both theWindowTopNrobustness fix, and for the use ofrequired_input_distributionsinPartitionedTopK.Are there any user-facing changes?
No: only plan changes.