-
Notifications
You must be signed in to change notification settings - Fork 835
refactor: refine experimental final aggregate spill #18907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: refine experimental final aggregate spill #18907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the aggregate spill implementation by renaming settings and introducing a new spiller architecture with multi-level spill support. The main changes consolidate spill logic, add a maximum recursion depth setting for aggregate spills, and improve memory management during aggregation.
- Renamed
enable_experiment_aggregate_finaltoenable_experiment_aggregatewith updated default from 0 to 1 - Added
max_aggregate_spill_levelsetting to limit recursion depth during aggregate spilling - Replaced
FinalAggregateSpillerwithNewAggregateSpillerusing parquet-based spilling
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| settings_getter_setter.rs | Renamed getter method to match new setting name and added getter for max spill level |
| settings_default.rs | Renamed setting, changed default to 1, and added max_aggregate_spill_level setting |
| new_transform_final_aggregate.rs | Major refactor to extract state management, improve spilling logic, and add multi-level spill support |
| new_final_aggregate_state.rs | New file containing extracted state management structs (RoundPhase, LocalRoundState, FinalAggregateSharedState) |
| new_aggregate_spiller.rs | New file implementing parquet-based spiller replacing legacy serialization approach |
| final_aggregate_spiller.rs | Deleted file - legacy spiller implementation removed |
| aggregate_meta.rs | Added NewSpilledPayload struct and NewBucketSpilled enum variant |
| transform_partition_bucket*.rs | Added unreachable handlers for NewBucketSpilled variant |
| payload/partitioned_payload/aggregate_hashtable | Added reset_for_reuse methods to support hashtable reuse |
| build_partition_bucket.rs | Updated to use new spiller and pass max_aggregate_spill_level parameter |
| physical_aggregate_final.rs | Updated to use renamed setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...elines/processors/transforms/aggregator/new_final_aggregate/new_transform_final_aggregate.rs
Outdated
Show resolved
Hide resolved
.../src/pipelines/processors/transforms/aggregator/new_final_aggregate/new_aggregate_spiller.rs
Outdated
Show resolved
Hide resolved
.../src/pipelines/processors/transforms/aggregator/new_final_aggregate/new_aggregate_spiller.rs
Outdated
Show resolved
Hide resolved
Docker Image for PR
|
fix: re-enable check spill by setting max spill depth refactor: split local/shared state
7ceabe9 to
4587399
Compare
4587399 to
1ba503a
Compare
Docker Image for PR
|
Docker Image for PR
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
SpillsBufferPoolmax_aggregate_spill_levelTests
Type of change
This change is