alamb commented on code in PR #9118:
URL: https://github.com/apache/arrow-rs/pull/9118#discussion_r2743767602


##########
parquet/src/arrow/push_decoder/reader_builder/mod.rs:
##########
@@ -588,6 +591,24 @@ impl RowGroupReaderBuilder {
                     &mut self.buffers,
                 )?;
 
+                // For mask-based selection, attach offset index metadata for 
page-aware chunking.
+                let offset_index_metadata = if 
plan_builder.resolve_selection_strategy()
+                    == RowSelectionStrategy::Mask
+                    && plan_builder.selection().is_some_and(|selection| {
+                        selection.requires_page_aware_mask(
+                            &self.projection,
+                            self.row_group_offset_index(row_group_idx),
+                        )
+                    }) {
+                    self.row_group_offset_index(row_group_idx)
+                        .map(|columns| columns.to_vec().into())
+                } else {
+                    None
+                };
+
+                let plan_builder = plan_builder
+                    .with_offset_index_metadata(offset_index_metadata, 
&self.projection);

Review Comment:
   I am still struggling to make adequate test covearage. I am rethinking the 
approach



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