feat(hash-aggr): Migrate Single/SinglePartitioned aggregation#5
feat(hash-aggr): Migrate Single/SinglePartitioned aggregation#52010YOUY01 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48b2db5d3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| )); | ||
| } | ||
|
|
||
| ControlFlow::Continue(original_state) |
There was a problem hiding this comment.
Honor pushed-down DISTINCT limits before continuing
When enable_migration_aggregate routes a Single/SinglePartitioned DISTINCT aggregate with lim=[N] to this stream, this path always continues polling input after aggregating each batch and never checks agg.limit_options(). The older GroupedHashAggregateStream and the migrated partial/final streams stop reading and start output once the soft group limit is reached, so a single-stage SELECT DISTINCT a LIMIT 10 plan now scans all input before producing rows and an AggregateExec consumed directly can emit more than the pushed-down limit. Add the same soft-limit state/check here or avoid selecting this stream when limit_options is set.
Useful? React with 👍 / 👎.
Which issue does this PR close?
Part of apache#22710
Rationale for this change
See issue for details.
This PR is stacked on apache#23309
What changes are included in this PR?
Migrate single/signle-partitioned aggregation paths
Are these changes tested?
Ut for planning the new implementation.
Functionality tests are covered by existing tests.
Are there any user-facing changes?
No