You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove GroupsAccumulator::supports_convert_to_state and make convert_to_state mandatory #23081
convert_to_state(...), which converts raw input rows directly into intermediate aggregate state
supports_convert_to_state(), which lets hash aggregate decide whether the skip-partial-aggregation optimization is available
This optional capability adds branching and complexity in the group hash implementation (as the code has to handle the case when skip partial is not available)
It also means GroupsAccumulator implementations can silently miss the high-cardinality fast path.
I believe the original reason for this API was to allow incremental rollout of partial aggregate support (so we could introduce the API and then incrementally implement it for the accumulators)
Upgrading guide explains the required change for external GroupsAccumulator implementors
Describe alternatives you've considered
We could keep supports_convert_to_state() and continue enabling skip-partial aggregation only when all accumulators opt in. That preserves compatibility, but it keeps the hash aggregate code more complex and allows some accumulators to miss the high-cardinality fast path indefinitely.
Additional context
This is likely a breaking public API change for custom aggregate authors and FFI users, so it should be marked as an API change and documented in the upgrading guide.
changed the title [-]Remove GroupsAccumulator::supports_convert_to_state and make convert_to_state mandatory[/-][+]Remove `GroupsAccumulator::supports_convert_to_state` and make `convert_to_state` mandatory[/+]on Jun 22, 2026
After reviewing the codebase, there are indeed several GroupsAccumulator implementations missing convert_to_state(). So I plan to first complete the missing implementations, then remove supports_convert_to_state() and its call sites - to keep the pr small and easier to review.
Activity
[-]Remove GroupsAccumulator::supports_convert_to_state and make convert_to_state mandatory[/-][+]Remove `GroupsAccumulator::supports_convert_to_state` and make `convert_to_state` mandatory[/+]lyne7-sc commentedon Jun 30, 2026
take
lyne7-sc commentedon Jun 30, 2026
After reviewing the codebase, there are indeed several
GroupsAccumulatorimplementations missingconvert_to_state(). So I plan to first complete the missing implementations, then removesupports_convert_to_state()and its call sites - to keep the pr small and easier to review.alamb commentedon Jun 30, 2026
Sounds like a great plan -- thank you @lyne7-sc
feat: Implement state conversion for remaining group accumulators (#2…
Remove `GroupsAccumulator::supports_convert_to_state` and require `co…
Remove `GroupsAccumulator::supports_convert_to_state` and require `co…