-
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 logic
pkg/sql/colexec/group/exec.go
SpillManager
andSpillThreshold
inPrepare
methodgroup_spill.go
Core spill implementation with state management
pkg/sql/colexec/group/group_spill.go
spillPartialResults
method to serialize and store aggregationstate
mergeSpilledResults
andrestoreAndMergeSpilledAggregators
methods
spill.go
Define spill interfaces and types
pkg/sql/colexec/group/spill.go
SpillableData
interface for serializable data structuresSpillManager
interface for spill operationsSpillID
type for spill identificationspill_memory.go
Memory-based spill manager implementation
pkg/sql/colexec/group/spill_memory.go
MemorySpillManager
for in-memory spill storagespillable_agg_state.go
Spillable aggregation state implementation
pkg/sql/colexec/group/spillable_agg_state.go
SpillableAggState
struct for aggregation state serializationtypes.go
Add spill configuration to group types
pkg/sql/colexec/group/types.go
SpillManager
andSpillThreshold
fields toGroup
structFree
and cleanup methods to handle spill resourcesexec_test.go
Update test mock with size method
pkg/sql/colexec/group/exec_test.go
Size()
method to test aggregation executor mockspill_test.go
Comprehensive spill functionality tests
pkg/sql/colexec/group/spill_test.go