pitrou commented on code in PR #43957:
URL: https://github.com/apache/arrow/pull/43957#discussion_r1761566440
##########
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:
By the way, the reason we upcast integers when summing them is to emulate
what DB engines typically do. I don't think DB engines upcast decimals when
summing them.
See e.g. https://www.postgresql.org/docs/current/functions-aggregate.html
--
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]