haohuaijin commented on code in PR #10434:
URL: https://github.com/apache/arrow-rs/pull/10434#discussion_r3650173487


##########
parquet/src/arrow/arrow_reader/selection/mod.rs:
##########
@@ -491,21 +304,6 @@ impl RowSelection {
         }
     }
 
-    /// Promote a mask-backed selection to selector backing in place.
-    fn selectors_mut(&mut self) -> &mut Vec<RowSelector> {
-        if let RowSelectionInner::Mask(_) = &self.inner {
-            let mask = match std::mem::take(&mut self.inner) {
-                RowSelectionInner::Mask(m) => m,
-                RowSelectionInner::Selectors(_) => unreachable!(),
-            };
-            self.inner = 
RowSelectionInner::Selectors(mask_to_selectors(mask.mask()));
-        }
-        match &mut self.inner {
-            RowSelectionInner::Selectors(s) => s,
-            RowSelectionInner::Mask(_) => unreachable!(),
-        }
-    }
-

Review Comment:
   remove those code as it only use in `trim` and `split_off`, but current 
`trim` and `split_off` now match on `self.inner` instead of dispatching with 
`if let / matches!` plus an early return; 
   



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