kou commented on code in PR #48285:
URL: https://github.com/apache/arrow/pull/48285#discussion_r2577082647
##########
cpp/src/parquet/arrow/reader_writer_benchmark.cc:
##########
@@ -736,8 +737,9 @@ static void BM_ReadIndividualRowGroups(::benchmark::State&
state) {
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 =
Review Comment:
No. `ASSERT_OK_AND_ASSIGN()` is for Google Test. Benchmarks uses Google
Benchmark not Google Test.
##########
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:
We need to assign to `arrow_reader`:
```suggestion
auto arrow_reader_result =
FileReader::Make(::arrow::default_memory_pool(), std::move(reader));
EXIT_NOT_OK(arrow_reader_result.status());
auto arrow_reader = *arrow_reader_result;
```
##########
cpp/src/parquet/arrow/reader_writer_benchmark.cc:
##########
@@ -736,8 +737,9 @@ static void BM_ReadIndividualRowGroups(::benchmark::State&
state) {
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:
```suggestion
auto arrow_reader_result =
FileReader::Make(::arrow::default_memory_pool(), std::move(reader));
EXIT_NOT_OK(reader_result.status());
auto arrow_reader = *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]