lidavidm commented on a change in pull request #10890:
URL: https://github.com/apache/arrow/pull/10890#discussion_r685383421



##########
File path: cpp/src/arrow/compute/kernels/hash_aggregate.cc
##########
@@ -1011,6 +1012,118 @@ struct GroupedSumFactory {
   InputType argument_type;
 };
 
+// ----------------------------------------------------------------------
+// Product implementation
+
+using arrow::internal::MultiplyWithOverflow;
+
+template <typename Type>
+struct GroupedProductImpl final : public GroupedAggregator {
+  using AccType = typename FindAccumulatorType<Type>::Type;
+  using ProductType = typename TypeTraits<AccType>::CType;
+
+  Status Init(ExecContext* ctx, const FunctionOptions*) override {
+    pool_ = ctx->memory_pool();
+    products_ = TypedBufferBuilder<ProductType>(pool_);
+    valid_ = TypedBufferBuilder<bool>(pool_);
+    out_type_ = TypeTraits<AccType>::type_singleton();
+    return Status::OK();
+  }

Review comment:
       The hash mean/sum don't support this either so I'll modify all three.




-- 
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...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to