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


##########
parquet/src/arrow/arrow_reader/selection/algebra.rs:
##########
@@ -276,6 +277,23 @@ pub(super) fn union_row_selections(left: &[RowSelector], 
right: &[RowSelector])
     iter.collect()
 }
 
+/// Combines a mask and selectors without expanding the mask into runs.
+pub(super) fn combine_mixed_selection(
+    selectors: &[RowSelector],
+    mask: &MaskSelection,
+    op: impl FnOnce(&BooleanBuffer, &BooleanBuffer) -> BooleanBuffer,
+) -> RowSelection {
+    // An empty operand leaves the other unchanged.
+    if selectors.is_empty() {
+        return RowSelection::from_mask_selection(mask.clone());
+    }
+    if mask.mask().is_empty() {
+        return RowSelection::from_selectors(selectors.to_vec());

Review Comment:
   It is unfortunate that this needs to allocate/copy the vec.
   
   Maybe there is some way to avoid this (and go directly from `&[RowSelector]` 
to a boolean mask



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