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


##########
parquet/src/arrow/arrow_reader/selection/boolean.rs:
##########
@@ -92,6 +93,22 @@ impl MaskSelection {
             .get_or_init(|| mask_to_selectors(&self.mask))
             .as_slice()
     }
+
+    /// Borrows the cached RLE form, converting into a temporary if not cached.
+    pub(super) fn borrowed_selectors(&self) -> Cow<'_, [RowSelector]> {

Review Comment:
   The fact it is called `borrowed_selectors` but may compute / allocate a 
temporary was confusing to me
   
   Shouldn't this also set the  `self.selectors` cache if it wasn't already 
set? 
   
   Otherwise calling this twice in a row will recompute the selectors



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