haohuaijin commented on code in PR #25731:
URL: https://github.com/apache/datafusion/pull/25731#discussion_r4164381725


##########
datafusion/datasource-parquet/src/access_plan.rs:
##########
@@ -392,6 +426,22 @@ impl ParquetAccessPlan {
             RowGroupAccess::Skip => RowGroupAccess::Skip,
             RowGroupAccess::Scan => RowGroupAccess::Selection(selection),
             RowGroupAccess::Selection(existing_selection) => {
+                // Parquet preserves bitmap backing only when both operands
+                // are masks. Promote selector-backed page pruning to retain
+                // an external index's bitmap and use a bitwise intersection.
+                // Revisit this conversion once Parquet optimizes mixed-backed
+                // intersections: 
https://github.com/apache/arrow-rs/issues/10423
+                let selection = if existing_selection.as_mask().is_some()
+                    && selection.as_mask().is_none()
+                {
+                    let mut mask = 
BooleanBufferBuilder::new(selection.total_row_count());

Review Comment:
   sure, i will submit a pr to arrow to add `force_mask()` api.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to