Ted-Jiang commented on code in PR #2994:
URL: https://github.com/apache/arrow-rs/pull/2994#discussion_r1011248753


##########
parquet/src/arrow/arrow_reader/selection.rs:
##########
@@ -117,6 +117,39 @@ impl RowSelection {
         Self { selectors }
     }
 
+    /// Creates a [`RowSelection`] from a slice of uncombined `RowSelector`:
+    /// Like [skip(5),skip(5),read(10)].
+    /// After combine will return [skip(10),read(10)]
+    /// # Note
+    /// If directly use uncombined `RowSelection` with offset_index in parquet
+    /// will panic.
+    fn from_selectors_and_combine(selectors: &[RowSelector]) -> Self {
+        if selectors.len() < 2 {
+            return Self {
+                selectors: Vec::from(selectors),
+            };
+        }
+        let first = selectors.first().unwrap();
+        let mut sum_rows = first.row_count;
+        let mut selected = first.skip;

Review Comment:
   Yes 😂



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