@@ -92,9 +92,9 @@ class ParquetStorageService : public arrow::flight::FlightServerBase {
92
92
const arrow::flight::Ticket& request,
93
93
std::unique_ptr<arrow::flight::FlightDataStream>* stream) override {
94
94
ARROW_ASSIGN_OR_RAISE (auto input, root_->OpenInputFile (request.ticket ));
95
- std::unique_ptr<parquet::arrow::FileReader> reader;
96
- ARROW_RETURN_NOT_OK ( parquet::arrow::OpenFile ( std::move (input) ,
97
- arrow::default_memory_pool ( ), &reader ));
95
+ ARROW_ASSIGN_OR_RAISE (
96
+ auto reader ,
97
+ parquet:: arrow::OpenFile ( std::move (input ), arrow::default_memory_pool () ));
98
98
99
99
std::shared_ptr<arrow::Table> table;
100
100
ARROW_RETURN_NOT_OK (reader->ReadTable (&table));
@@ -135,9 +135,9 @@ class ParquetStorageService : public arrow::flight::FlightServerBase {
135
135
arrow::Result<arrow::flight::FlightInfo> MakeFlightInfo (
136
136
const arrow::fs::FileInfo& file_info) {
137
137
ARROW_ASSIGN_OR_RAISE (auto input, root_->OpenInputFile (file_info));
138
- std::unique_ptr<parquet::arrow::FileReader> reader;
139
- ARROW_RETURN_NOT_OK ( parquet::arrow::OpenFile ( std::move (input) ,
140
- arrow::default_memory_pool ( ), &reader ));
138
+ ARROW_ASSIGN_OR_RAISE (
139
+ auto reader ,
140
+ parquet:: arrow::OpenFile ( std::move (input ), arrow::default_memory_pool () ));
141
141
142
142
std::shared_ptr<arrow::Schema> schema;
143
143
ARROW_RETURN_NOT_OK (reader->GetSchema (&schema));
@@ -222,9 +222,8 @@ arrow::Status TestPutGetDelete() {
222
222
FindTestDataFile (" airquality.parquet" ));
223
223
ARROW_ASSIGN_OR_RAISE (std::shared_ptr<arrow::io::RandomAccessFile> input,
224
224
fs->OpenInputFile (airquality_path));
225
- std::unique_ptr<parquet::arrow::FileReader> reader;
226
- ARROW_RETURN_NOT_OK (
227
- parquet::arrow::OpenFile (std::move (input), arrow::default_memory_pool (), &reader));
225
+ ARROW_ASSIGN_OR_RAISE (auto reader, parquet::arrow::OpenFile (
226
+ std::move (input), arrow::default_memory_pool ()));
228
227
229
228
auto descriptor = arrow::flight::FlightDescriptor::Path ({" airquality.parquet" });
230
229
std::shared_ptr<arrow::Schema> schema;
0 commit comments