-
Notifications
You must be signed in to change notification settings - Fork 285
add group agg spill #22527
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
base: main
Are you sure you want to change the base?
add group agg spill #22527
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
This reverts commit 426ddfc.
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #3433
What this PR does / why we need it:
add group aggregation spill
PR Type
Enhancement
Description
Add memory spill functionality to group aggregation operator
Implement spillable data structures and memory management
Add spill threshold configuration and memory usage tracking
Create comprehensive test coverage for spill scenarios
Diagram Walkthrough
File Walkthrough
exec.go
Add spill initialization and integration logicpkg/sql/colexec/group/exec.go
SpillManagerandSpillThresholdinPreparemethodgroup_spill.go
Core spill implementation with state managementpkg/sql/colexec/group/group_spill.go
spillPartialResultsmethod to serialize and store aggregationstate
mergeSpilledResultsandrestoreAndMergeSpilledAggregatorsmethods
spill.go
Define spill interfaces and typespkg/sql/colexec/group/spill.go
SpillableDatainterface for serializable data structuresSpillManagerinterface for spill operationsSpillIDtype for spill identificationspill_memory.go
Memory-based spill manager implementationpkg/sql/colexec/group/spill_memory.go
MemorySpillManagerfor in-memory spill storagespillable_agg_state.go
Spillable aggregation state implementationpkg/sql/colexec/group/spillable_agg_state.go
SpillableAggStatestruct for aggregation state serializationtypes.go
Add spill configuration to group typespkg/sql/colexec/group/types.go
SpillManagerandSpillThresholdfields toGroupstructFreeand cleanup methods to handle spill resourcesexec_test.go
Update test mock with size methodpkg/sql/colexec/group/exec_test.go
Size()method to test aggregation executor mockspill_test.go
Comprehensive spill functionality testspkg/sql/colexec/group/spill_test.go