sdf-jkl commented on code in PR #9118:
URL: https://github.com/apache/arrow-rs/pull/9118#discussion_r2748090065


##########
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 think there was no error in the filter stage with the current solution, 
because the predicates we used were simple, targeting one column at a time. (No 
multi-column predicate projection that causes the page layout errors)



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