vibhatha commented on PR #15183:
URL: https://github.com/apache/arrow/pull/15183#issuecomment-1379679691

   @westonpace btw, I just searched for places where I could have missed `move` 
and found out the following in other sections of the code base. I haven't 
included it in here yet, but here is the diff (I tested locally and works 
fine). 
   
   ```
   diff --git a/cpp/src/arrow/compute/exec/test_util.cc 
b/cpp/src/arrow/compute/exec/test_util.cc
   index 038171c84..912428acf 100644
   --- a/cpp/src/arrow/compute/exec/test_util.cc
   +++ b/cpp/src/arrow/compute/exec/test_util.cc
   @@ -273,8 +273,8 @@ Result<std::vector<std::shared_ptr<ExecBatch>>> 
ToExecBatches(
        const BatchesWithSchema& batches_with_schema) {
      std::vector<std::shared_ptr<ExecBatch>> exec_batches;
      for (auto batch : batches_with_schema.batches) {
   -    auto exec_batch = std::make_shared<ExecBatch>(batch);
   -    exec_batches.push_back(exec_batch);
   +    //auto exec_batch = std::make_shared<ExecBatch>(batch);
   +    exec_batches.push_back(std::make_shared<ExecBatch>(batch));
      }
      return exec_batches;
    }
   @@ -285,7 +285,7 @@ Result<std::vector<std::shared_ptr<RecordBatch>>> 
ToRecordBatches(
      for (auto batch : batches_with_schema.batches) {
        ARROW_ASSIGN_OR_RAISE(auto record_batch,
                              batch.ToRecordBatch(batches_with_schema.schema));
   -    record_batches.push_back(record_batch);
   +    record_batches.push_back(std::move(record_batch));
      }
      return record_batches;
    }
   ```
   
   Is this acceptable?


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