Is your feature request related to a problem or challenge?
The spilling path added for OrderedSingleAggregateStream in #24259 is largely similar to the spilling paths used by other aggregation modes. Keeping separate copies of the same spill mechanics makes future fixes and changes easier to miss and can cause the implementations to drift.
This is follow-up work from #24259 (comment) and part of #22710.
Describe the solution you'd like
Identify the semantically identical parts of the aggregation spilling paths and extract them into shared logic that can be reused by the relevant aggregation streams.
Keep mode-specific policies and state transitions explicit in each dedicated stream; only the common spill mechanics should be shared.
Describe alternatives you've considered
Additional context
Is your feature request related to a problem or challenge?
The spilling path added for
OrderedSingleAggregateStreamin #24259 is largely similar to the spilling paths used by other aggregation modes. Keeping separate copies of the same spill mechanics makes future fixes and changes easier to miss and can cause the implementations to drift.This is follow-up work from #24259 (comment) and part of #22710.
Describe the solution you'd like
Identify the semantically identical parts of the aggregation spilling paths and extract them into shared logic that can be reused by the relevant aggregation streams.
Keep mode-specific policies and state transitions explicit in each dedicated stream; only the common spill mechanics should be shared.
Describe alternatives you've considered
Additional context