pitrou commented on a change in pull request #12299:
URL: https://github.com/apache/arrow/pull/12299#discussion_r795687618
##########
File path: cpp/src/arrow/compute/kernels/hash_aggregate.cc
##########
@@ -1091,8 +1153,17 @@ struct GroupedMeanImpl : public
GroupedReducingAggregator<Type, GroupedMeanImpl<
}
};
+struct GroupedMeanNullImpl final : public GroupedNullImpl {
+ std::shared_ptr<DataType> out_type() const override { return float64(); }
+
+ void output_empty(const std::shared_ptr<Buffer>& data) override {
+ std::memset(data->mutable_data(), 0, num_groups_ * sizeof(double));
Review comment:
I'd rather use `std::fill_n(double*, ...)` here for clarity.
--
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]