lidavidm commented on code in PR #13753:
URL: https://github.com/apache/arrow/pull/13753#discussion_r937778580


##########
cpp/src/arrow/compute/kernels/aggregate_var_std.cc:
##########
@@ -287,12 +285,15 @@ const FunctionDoc variance_doc{
     {"array"},
     "VarianceOptions"};
 
+namespace {}  // namespace
+

Review Comment:
   nit: empty namespace?



##########
cpp/src/arrow/compute/kernels/hash_aggregate.cc:
##########
@@ -2775,6 +2773,39 @@ const FunctionDoc hash_one_doc{"Get one value from each 
group",
 const FunctionDoc hash_list_doc{"List all values in each group",
                                 ("Null values are also returned."),
                                 {"array", "group_id_array"}};
+
+void PopulateHashGenericKernels(Result<HashAggregateKernel> make_kernel(const 
DataType*),
+                                std::shared_ptr<HashAggregateFunction> func,
+                                FunctionRegistry* registry) {
+  DCHECK_OK(AddHashAggKernels(NumericTypes(), make_kernel, func.get()));
+  DCHECK_OK(AddHashAggKernels(TemporalTypes(), make_kernel, func.get()));
+  DCHECK_OK(AddHashAggKernels(BaseBinaryTypes(), make_kernel, func.get()));
+  DCHECK_OK(AddHashAggKernels(
+      {null().get(), boolean().get(), decimal128(1, 1).get(), decimal256(1, 
1).get(),
+       month_interval().get(), fixed_size_binary(1).get()},
+      make_kernel, func.get()));
+  DCHECK_OK(registry->AddFunction(std::move(func)));
+}
+
+void PopulateNumericHashKernels(Result<HashAggregateKernel> make_kernel(const 
DataType*),
+                                bool with_null_boolean,
+                                std::shared_ptr<HashAggregateFunction> func,
+                                FunctionRegistry* registry) {
+  static std::shared_ptr<DataType> decimal128_example = decimal128(1, 1);
+  static std::shared_ptr<DataType> decimal256_example = decimal256(1, 1);

Review Comment:
   extreme nit: there's some inconsistency here and above, maybe 
`PopulateHashGenericKernels` should just call `PopulateNumericHashKernels`?



-- 
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]

Reply via email to