joroKr21 commented on code in PR #11592: URL: https://github.com/apache/datafusion/pull/11592#discussion_r1687603952
########## datafusion/physical-expr-common/src/aggregate/groups_accumulator/prim_op.rs: ########## @@ -102,9 +102,13 @@ where values, opt_filter, total_num_groups, - |group_index, new_value| { - let value = &mut self.values[group_index]; - (self.prim_fn)(value, new_value); + |group_index, was_valid, new_value| { Review Comment: Perhaps not, although conceptually an accumulator is just a map-reduce-map via some monoid or semigroup. The current implementation supports only monoids (need an empty value) but it doesn't support semigroups (no empty value). We could use this for something like `FirstValue` or `AnyValue` but I guess we could also implement it specifically for that use case. -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org