Description
Is your feature request related to a problem or challenge?
AggregateExpr
currently provides both the ScalarValue
based Accumulator
and the new GroupsAccumulator
interface. With an additional groups_accumulator_supported
to indicate if GroupsAccumulator
is supported.
This is unfortunate as it forces us to keep two accumulator implementations for each expression, which is not only wasteful but introduces the possibility of inconsistency between the two implementations
Describe the solution you'd like
Change AggregateExpr::create_accumulator
to return GroupsAccumulator
, and remove groups_accumulator_supported
and create_groups_accumulator
. Implementations that currently only have an Accumulator
based implementation can return a GroupsAccumulatorAdapter
, which is ultimately what GroupedHashAggregateStream
will do anyway
Describe alternatives you've considered
No response
Additional context
This blocks #6842