etseidl commented on code in PR #10842:
URL: https://github.com/apache/arrow-rs/pull/10842#discussion_r3856608317


##########
parquet/src/file/metadata/mod.rs:
##########
@@ -246,70 +246,31 @@ pub(crate) use writer::ThriftMetadataWriter;
 /// [Page Index]: 
https://github.com/apache/parquet-format/blob/master/PageIndex.md
 /// [`ColumnIndex`]: crate::file::page_index::column_index::ColumnIndexMetaData
 /// [`OffsetIndex`]: crate::file::page_index::offset_index::OffsetIndexMetaData
-#[derive(Debug, Clone, PartialEq)]
-pub struct PageIndex {
-    column_indexes: Option<Vec<Vec<Option<ColumnIndexMetaData>>>>,
-    offset_indexes: Option<Vec<Vec<Option<OffsetIndexMetaData>>>>,
-}
-
-impl PageIndex {
-    pub(crate) fn new(
-        column_indexes: Option<Vec<Vec<Option<ColumnIndexMetaData>>>>,
-        offset_indexes: Option<Vec<Vec<Option<OffsetIndexMetaData>>>>,
-    ) -> Self {
-        Self {
-            column_indexes,
-            offset_indexes,
-        }
-    }
-
+pub trait PageIndexProvider: HeapSize + Send + Sync + std::fmt::Debug {

Review Comment:
   This trait replicates most of the previous `PageIndex` interface. The 
`ParquetMetaData` now holds a `Option<Arc<dyn PageIndexProvider>>` so we should 
be able to plug in any type of optimizations we want. I kept the old 
`PageIndex` as a default implementation primarily used on the write side.



-- 
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]

Reply via email to