pitrou commented on code in PR #51270:
URL: https://github.com/apache/arrow/pull/51270#discussion_r3977377207
##########
cpp/src/arrow/acero/exec_plan.cc:
##########
@@ -1150,10 +1150,10 @@ ExecFactoryRegistry* default_exec_factory_registry() {
}
Result<std::function<Future<std::optional<ExecBatch>>()>> MakeReaderGenerator(
- std::shared_ptr<RecordBatchReader> reader, ::arrow::internal::Executor*
io_executor,
+ const std::shared_ptr<RecordBatchReader>& reader,
::arrow::internal::Executor* io_executor,
int max_q, int q_restart) {
auto batch_it = MakeMapIterator(
- [](std::shared_ptr<RecordBatch> batch) {
+ [](const std::shared_ptr<RecordBatch>& batch) {
return std::make_optional(ExecBatch(*batch));
},
MakeIteratorFromReader(reader));
Review Comment:
I don't think this is right. `MakeIteratorFromReader` should instead take
its argument by value instead of const-ref.
--
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]