askoa commented on code in PR #3662:
URL: https://github.com/apache/arrow-rs/pull/3662#discussion_r1101508987


##########
arrow-array/src/array/run_array.rs:
##########
@@ -144,15 +144,16 @@ impl<R: RunEndIndexType> RunArray<R> {
         })
     }
 
-    /// Returns index to the physical array for the given index to the logical 
array.
-    /// Performs a binary search on the run_ends array for the input index.
     #[inline]
-    pub fn get_physical_index(&self, logical_index: usize) -> Option<usize> {
-        if logical_index >= self.len() {
+    fn get_physical_index_from_run_ends_array(
+        run_ends: &PrimitiveArray<R>,

Review Comment:
   My thought process was, `self` should be based on slice. The function acts 
on `run_ends` array irrespective of `offset` and `length` in the `ArrayData`.



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