pitrou commented on code in PR #45789:
URL: https://github.com/apache/arrow/pull/45789#discussion_r2003614035


##########
cpp/src/arrow/acero/aggregate_internal.cc:
##########
@@ -177,14 +177,11 @@ void AggregatesToString(std::stringstream* ss, const 
Schema& input_schema,
   *ss << ']';
 }
 
-Status ExtractSegmenterValues(std::vector<Datum>* values_ptr,
-                              const ExecBatch& input_batch,
+Status ExtractSegmenterValues(std::vector<Datum>& values, const ExecBatch& 
input_batch,
                               const std::vector<int>& field_ids) {
+  DCHECK_EQ(values.size(), field_ids.size());
   DCHECK_GT(input_batch.length, 0);
-  std::vector<Datum>& values = *values_ptr;
   int64_t row = input_batch.length - 1;
-  values.clear();
-  values.resize(field_ids.size());
   for (size_t i = 0; i < field_ids.size(); i++) {

Review Comment:
   But if this function is executed single-threaded, how did the race occur? 
Sorry for the questions...



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