zeroshade commented on code in PR #43957:
URL: https://github.com/apache/arrow/pull/43957#discussion_r1761338731
##########
cpp/src/arrow/compute/kernels/aggregate_internal.h:
##########
@@ -52,6 +52,16 @@ struct FindAccumulatorType<I, enable_if_floating_point<I>> {
using Type = DoubleType;
};
+template <typename I>
+struct FindAccumulatorType<I, enable_if_decimal32<I>> {
+ using Type = Decimal64Type;
Review Comment:
See the discussion
[here](https://github.com/apache/arrow/pull/43957#discussion_r1750962486)
We do the same for `int32` accumulators having their Sum type and
Accumulator type being upcasted to Int64, it makes sense that the accumulated
sum of Decimal32 should be Decimal64 to avoid overflows
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]