-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-44810: [C++][Parquet] Add arrow::Result version of parquet::arrow::FileReader::Make() #48285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
GH-44810: [C++][Parquet] Add arrow::Result version of parquet::arrow::FileReader::Make() #48285
Conversation
|
|
86eba06 to
7ef530c
Compare
hiroyuki-sato
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou CI passed Please take a look when you get a chacne.
…arrow::FileReader::Make()
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
c3bb1d2 to
39cc9ea
Compare
39cc9ea to
45249dd
Compare
|
@kou Could you check this PR when you get a chance? |
| std::unique_ptr<FileReader> arrow_reader; | ||
| ASSERT_OK(FileReader::Make(default_memory_pool(), std::move(reader), &arrow_reader)); | ||
| ASSERT_OK_AND_ASSIGN(arrow_reader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> arrow_reader; | |
| ASSERT_OK(FileReader::Make(default_memory_pool(), std::move(reader), &arrow_reader)); | |
| ASSERT_OK_AND_ASSIGN(arrow_reader, | |
| ASSERT_OK_AND_ASSIGN(auto arrow_reader, |
| std::unique_ptr<FileReader> reader; | ||
| ASSERT_OK_NO_THROW( | ||
| FileReader::Make(default_memory_pool(), std::move(file_reader), &reader)); | ||
| ASSERT_OK_AND_ASSIGN(reader, | ||
| FileReader::Make(default_memory_pool(), std::move(file_reader))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> reader; | |
| ASSERT_OK_NO_THROW( | |
| FileReader::Make(default_memory_pool(), std::move(file_reader), &reader)); | |
| ASSERT_OK_AND_ASSIGN(reader, | |
| FileReader::Make(default_memory_pool(), std::move(file_reader))); | |
| ASSERT_OK_AND_ASSIGN(auto reader, | |
| FileReader::Make(default_memory_pool(), std::move(file_reader))); |
| std::unique_ptr<FileReader> arrow_reader; | ||
| ASSERT_OK_NO_THROW( | ||
| FileReader::Make(pool, ParquetFileReader::OpenFile(path, false), &arrow_reader)); | ||
| ASSERT_OK_AND_ASSIGN(arrow_reader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> arrow_reader; | |
| ASSERT_OK_NO_THROW( | |
| FileReader::Make(pool, ParquetFileReader::OpenFile(path, false), &arrow_reader)); | |
| ASSERT_OK_AND_ASSIGN(arrow_reader, | |
| ASSERT_OK_AND_ASSIGN(auto arrow_reader, |
| std::unique_ptr<FileReader> reader; | ||
| ASSERT_OK_NO_THROW( | ||
| FileReader::Make(pool, ParquetFileReader::OpenFile(path, false), &reader)); | ||
| ASSERT_OK_AND_ASSIGN( | ||
| reader, FileReader::Make(pool, ParquetFileReader::OpenFile(path, false))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> reader; | |
| ASSERT_OK_NO_THROW( | |
| FileReader::Make(pool, ParquetFileReader::OpenFile(path, false), &reader)); | |
| ASSERT_OK_AND_ASSIGN( | |
| reader, FileReader::Make(pool, ParquetFileReader::OpenFile(path, false))); | |
| ASSERT_OK_AND_ASSIGN( | |
| auto reader, FileReader::Make(pool, ParquetFileReader::OpenFile(path, false))); |
| std::unique_ptr<FileReader> file_reader; | ||
| ASSERT_OK( | ||
| FileReader::Make(::arrow::default_memory_pool(), std::move(reader), &file_reader)); | ||
| ASSERT_OK_AND_ASSIGN( | ||
| file_reader, FileReader::Make(::arrow::default_memory_pool(), std::move(reader))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> file_reader; | |
| ASSERT_OK( | |
| FileReader::Make(::arrow::default_memory_pool(), std::move(reader), &file_reader)); | |
| ASSERT_OK_AND_ASSIGN( | |
| file_reader, FileReader::Make(::arrow::default_memory_pool(), std::move(reader))); | |
| ASSERT_OK_AND_ASSIGN( | |
| auto file_reader, FileReader::Make(::arrow::default_memory_pool(), std::move(reader))); |
| std::unique_ptr<FileReader> parquet_reader; | ||
| ASSERT_OK(FileReader::Make(pool, ParquetFileReader::OpenFile(file, false), properties, | ||
| &parquet_reader)); | ||
| ASSERT_OK_AND_ASSIGN( | ||
| parquet_reader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> parquet_reader; | |
| ASSERT_OK(FileReader::Make(pool, ParquetFileReader::OpenFile(file, false), properties, | |
| &parquet_reader)); | |
| ASSERT_OK_AND_ASSIGN( | |
| parquet_reader, | |
| ASSERT_OK_AND_ASSIGN( | |
| auto parquet_reader, |
| std::unique_ptr<FileReader> arrow_reader; | ||
| ASSERT_OK(FileReader::Make(pool, std::move(reader), read_properties, &arrow_reader)); | ||
| ASSERT_OK_AND_ASSIGN(arrow_reader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::unique_ptr<FileReader> arrow_reader; | |
| ASSERT_OK(FileReader::Make(pool, std::move(reader), read_properties, &arrow_reader)); | |
| ASSERT_OK_AND_ASSIGN(arrow_reader, | |
| ASSERT_OK_AND_ASSIGN(auto arrow_reader, |
| auto arrow_reader_result = | ||
| FileReader::Make(::arrow::default_memory_pool(), std::move(reader)); | ||
| EXIT_NOT_OK(arrow_reader_result.status()); | ||
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); | |
| auto arrow_reader = std::move(*arrow_reader_result); |
| auto arrow_reader_result = | ||
| FileReader::Make(::arrow::default_memory_pool(), std::move(reader)); | ||
| EXIT_NOT_OK(arrow_reader_result.status()); | ||
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); | |
| auto arrow_reader = std::move(*arrow_reader_result); |
| auto arrow_reader_result = | ||
| FileReader::Make(::arrow::default_memory_pool(), std::move(reader)); | ||
| EXIT_NOT_OK(arrow_reader_result.status()); | ||
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::shared_ptr<FileReader> arrow_reader = std::move(*arrow_reader_result); | |
| auto arrow_reader = std::move(*arrow_reader_result); |
Rationale for this change
FileReader::Makepreviously returnedStatusand required callers to pass anoutparameter.What changes are included in this PR?
Introduce a
Result<std::unique_ptr<FileReader>>returning API to allow clearer error propagationAre these changes tested?
Yes.
Are there any user-facing changes?
Yes.
Status version
FileReader::Makehas been deprecated.arrow::Resultversion ofparquet::arrow::FileReader::Make()#44810