You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/07/27 14:24:20 UTC

[GitHub] [arrow-datafusion] tustvold opened a new issue, #7112: Remove AggregateExpr::create_accumulator

tustvold opened a new issue, #7112:
URL: https://github.com/apache/arrow-datafusion/issues/7112

   ### 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 https://github.com/apache/arrow-datafusion/issues/6842


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on issue #7112: Remove AggregateExpr::create_accumulator

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7112:
URL: https://github.com/apache/arrow-datafusion/issues/7112#issuecomment-1653794153

   I think updating `AggregateExpr` which is largely an internal implementation detail of DataFusion, to better communicate what is supported and what is not makes a lot of sense to me.
   
   I think there are two accumulators now because Accumulator has an API to do retractable updates (incremental updates)
   Accumulator is part of the public API so I don't think it can / should be removed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] tustvold closed issue #7112: Remove AggregateExpr::create_accumulator

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #7112: Remove AggregateExpr::create_accumulator
URL: https://github.com/apache/arrow-datafusion/issues/7112


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on issue #7112: Remove AggregateExpr::create_accumulator

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7112:
URL: https://github.com/apache/arrow-datafusion/issues/7112#issuecomment-1653795507

   The only thing that might be tricky with this proposal is making sure the right implementation is provided for accumulators that can do retractable updates (like sum and count)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org