rtpsw commented on code in PR #14352:
URL: https://github.com/apache/arrow/pull/14352#discussion_r1027284221


##########
cpp/src/arrow/compute/exec/aggregate_node.cc:
##########
@@ -352,15 +497,34 @@ class GroupByNode : public ExecNode {
       int key_field_id = key_field_ids[i];
       output_fields[base + i] = input_schema->field(key_field_id);
     }
+    base += keys.size();
+    for (size_t i = 0; i < segment_keys.size(); ++i) {
+      int segment_key_field_id = segment_key_field_ids[i];
+      output_fields[base + i] = input_schema->field(segment_key_field_id);
+    }
 
     return input->plan()->EmplaceNode<GroupByNode>(
         input, schema(std::move(output_fields)), ctx, std::move(key_field_ids),
-        std::move(agg_src_field_ids), std::move(aggs), std::move(agg_kernels));
+        std::move(segment_key_field_ids), std::move(segmenter),
+        std::move(agg_src_field_ids), std::move(agg_src_types), 
std::move(aggs),
+        std::move(agg_kernels));
+  }
+
+  Status ReconstructAggregates() {

Review Comment:
   It's defined once in `ScalarAggregateNode` and second (differently) in 
`GroupByNode`.



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