emkornfield commented on code in PR #14964:
URL: https://github.com/apache/arrow/pull/14964#discussion_r1063719424
##########
cpp/src/parquet/page_index.h:
##########
@@ -126,4 +130,75 @@ class PARQUET_EXPORT OffsetIndex {
virtual const std::vector<PageLocation>& page_locations() const = 0;
};
+/// \brief Interface for reading the page index from a Parquet row group.
+class PARQUET_EXPORT RowGroupPageIndexReader {
+ public:
+ virtual ~RowGroupPageIndexReader() = default;
+
+ /// \brief Read column index of a column chunk.
+ ///
+ /// \param[in] i column id of the column chunk.
+ /// \returns error Result if either column id is invalid or column index
does not exist.
+ virtual ::arrow::Result<std::shared_ptr<ColumnIndex>> GetColumnIndex(int32_t
i) = 0;
+
+ /// \brief Read offset index of a column chunk.
+ ///
+ /// \param[in] i column id of the column chunk.
+ /// \returns error Result if either column id is invalid or offset index
does not exist.
+ virtual ::arrow::Result<std::shared_ptr<OffsetIndex>> GetOffsetIndex(int32_t
i) = 0;
+};
+
+/// \brief Interface for reading the page index from a Parquet file.
+class PARQUET_EXPORT PageIndexReader {
+ public:
+ virtual ~PageIndexReader() = default;
+
+ /// \brief Create a PageIndexReader instance.
+ static std::shared_ptr<PageIndexReader> Make(
+ ::arrow::io::RandomAccessFile* input, std::shared_ptr<FileMetaData>
file_metadata,
Review Comment:
ownership/lifetime semantics of passing a raw RandomAccessFile needs to be
clarified.
--
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]