wgtmac commented on code in PR #14964:
URL: https://github.com/apache/arrow/pull/14964#discussion_r1083256983
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -302,6 +303,17 @@ class SerializedFile : public ParquetFileReader::Contents {
std::shared_ptr<FileMetaData> metadata() const override { return
file_metadata_; }
+ std::shared_ptr<PageIndexReader> GetPageIndexReader() override {
+ if (!file_metadata_) {
+ throw ParquetException("Cannot get PageIndexReader as file metadata is
not ready");
Review Comment:
Usually this won't happen if user calls one of the static Open() functions
to create a ParquetFileReader instance. But if user calls the constructor
directly and calls GetPageIndexReader() before Open() then this could happen.
Add a comment to explain it and makes the exception message clear.
--
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]