hiroyuki-sato commented on code in PR #48285:
URL: https://github.com/apache/arrow/pull/48285#discussion_r2579286890
##########
cpp/src/parquet/arrow/reader_writer_benchmark.cc:
##########
@@ -297,8 +297,9 @@ static void BenchmarkReadTable(::benchmark::State& state,
const Table& table,
auto reader =
ParquetFileReader::Open(std::make_shared<::arrow::io::BufferReader>(buffer));
std::unique_ptr<FileReader> arrow_reader;
- EXIT_NOT_OK(FileReader::Make(::arrow::default_memory_pool(),
std::move(reader),
- &arrow_reader));
+ auto reader_result =
+ FileReader::Make(::arrow::default_memory_pool(), std::move(reader));
+ EXIT_NOT_OK(reader_result.status());
Review Comment:
Thanks. It seems that `arrow_reader` doesn't use after declaration.
```
arrow/arrow/cpp/src/parquet/arrow/reader_writer_benchmark.cc:302:10: error:
call to implicitly-deleted copy constructor of
'std::unique_ptr<parquet::arrow::FileReader>'
302 | auto arrow_reader = *arrow_reader_result;
| ^ ~~~~~~~~~~~~~~~~~~~~
```
Do we need the following instead of `auto arrow_reader =
*arrow_reader_result`?
```
std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result);
```
--
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]