You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "askoa (via GitHub)" <gi...@apache.org> on 2023/02/04 12:25:47 UTC

[GitHub] [arrow-rs] askoa commented on a diff in pull request #3622: feat: take kernel for RunArray

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


##########
arrow-array/src/array/run_array.rs:
##########
@@ -143,6 +143,102 @@ impl<R: RunEndIndexType> RunArray<R> {
             values,
         })
     }
+
+    /// 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> {

Review Comment:
   This function is moved from `TypedRunArray` to `RunArray` as the function has nothing to do with values.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org