Jefffrey commented on code in PR #9036:
URL: https://github.com/apache/arrow-rs/pull/9036#discussion_r2679447099


##########
arrow-buffer/src/buffer/run.rs:
##########
@@ -189,6 +189,16 @@ where
         &self.run_ends
     }
 
+    /// Similar to [`values`] but accounts for logical slicing, returning only 
the values
+    /// that are part of the logical slice of this buffer.
+    ///
+    /// [`values`]: Self::values
+    pub fn values_slice(&self) -> &[E] {

Review Comment:
   > Without `values_slice`, it is unclear whether adding `get_physical_len` 
would be useful for end users?
   
   Could you elaborate on this? I don't recall discussing adding a 
`get_physical_len()` API 🤔 



##########
arrow-buffer/src/buffer/run.rs:
##########
@@ -368,4 +386,68 @@ mod tests {
         assert_eq!(buffer.get_start_physical_index(), 0);
         assert_eq!(buffer.get_end_physical_index(), 0);
     }
+    #[test]
+    fn test_sliced_buffer_access() {

Review Comment:
   This test probably can be removed now that we don't have `values_slice()`



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