khwilson commented on code in PR #44184:
URL: https://github.com/apache/arrow/pull/44184#discussion_r2074664481
##########
cpp/src/arrow/compute/kernels/hash_aggregate.cc:
##########
@@ -564,7 +564,7 @@ struct GroupedReducingAggregator : public GroupedAggregator
{
template <typename T = Type>
static enable_if_decimal<T, std::shared_ptr<DataType>> GetOutType(
const std::shared_ptr<DataType>& in_type) {
- return in_type;
+ return WidenDecimalToMaxPrecision(in_type).ValueOrDie();
Review Comment:
Yeah, different databases do different things. E.g., for a mean, duckdb
converts to a double (which is also what the array aggregate does for
non-decimal numeric types in arrow). Do you have a preference for what the type
for the other aggregates _should_ be?
--
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]