felipecrv commented on code in PR #15083:
URL: https://github.com/apache/arrow/pull/15083#discussion_r1063480420


##########
cpp/src/arrow/compute/exec/aggregate.cc:
##########
@@ -38,33 +38,38 @@ namespace internal {
 
 Result<std::vector<const HashAggregateKernel*>> GetKernels(
     ExecContext* ctx, const std::vector<Aggregate>& aggregates,
-    const std::vector<TypeHolder>& in_types) {
+    const std::vector<std::vector<TypeHolder>>& in_types) {
   if (aggregates.size() != in_types.size()) {
     return Status::Invalid(aggregates.size(), " aggregate functions were 
specified but ",
                            in_types.size(), " arguments were provided.");
   }
 
   std::vector<const HashAggregateKernel*> kernels(in_types.size());
 
+  std::vector<TypeHolder> aggregate_in_types;
   for (size_t i = 0; i < aggregates.size(); ++i) {
     ARROW_ASSIGN_OR_RAISE(auto function,
                           
ctx->func_registry()->GetFunction(aggregates[i].function));
+    // {in_types[i]..., uint32()}
+    aggregate_in_types = in_types[i];
+    aggregate_in_types.emplace_back(uint32());
     ARROW_ASSIGN_OR_RAISE(const Kernel* kernel,
-                          function->DispatchExact({in_types[i], uint32()}));
+                          function->DispatchExact(aggregate_in_types));
     kernels[i] = static_cast<const HashAggregateKernel*>(kernel);
   }
   return kernels;
 }
 
 Result<std::vector<std::unique_ptr<KernelState>>> InitKernels(
     const std::vector<const HashAggregateKernel*>& kernels, ExecContext* ctx,
-    const std::vector<Aggregate>& aggregates, const std::vector<TypeHolder>& 
in_types) {
+    const std::vector<Aggregate>& aggregates,
+    const std::vector<std::vector<TypeHolder>>& in_types) {
   std::vector<std::unique_ptr<KernelState>> states(kernels.size());
 
+  std::vector<TypeHolder> agg_in_types;

Review Comment:
   Same question as above.



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