etseidl commented on code in PR #10842:
URL: https://github.com/apache/arrow-rs/pull/10842#discussion_r3918107962
##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -4905,19 +4906,12 @@ pub(crate) mod tests {
ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required),
)
.unwrap();
- let page_index = builder
- .metadata()
- .page_index()
- .expect("page index should be present");
- let num_columns = builder.metadata().row_group(0).num_columns();
- let offset_indexes = page_index.offset_indexes_for_rowgroup(0);
- assert!(offset_indexes.is_some_and(|ois| ois.len() ==
num_columns));
- let column_indexes = page_index.offset_indexes_for_rowgroup(0);
- assert!(column_indexes.is_some_and(|cis| cis.len() ==
num_columns));
- assert!(page_index.offset_index(0, 0).is_some());
- assert!(page_index.column_index(0, 0).is_some());
- assert!(page_index.page_locations(0, 0).is_some());
- assert_eq!(page_index.num_data_pages(0, 0), Some(325));
+ let page_index = builder.metadata().page_index();
+ let row_group_page_index = RowGroupPageIndex::new(0,
page_index.cloned());
Review Comment:
TIL you can have `(self: Arc<Self>)` in a function. But that still doesn't
help here :(
I can add a helper to `ParquetMetaData`, where the `Arc` is available.
--
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]