You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/23 17:49:06 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #3171: Return slice from GenericByteArray::value_data

alamb commented on code in PR #3171:
URL: https://github.com/apache/arrow-rs/pull/3171#discussion_r1030735481


##########
arrow-array/src/array/byte_array.rs:
##########
@@ -55,9 +55,9 @@ impl<T: ByteArrayType> GenericByteArray<T> {
         offsets[i + 1] - offsets[i]
     }
 
-    /// Returns a clone of the value data buffer
-    pub fn value_data(&self) -> Buffer {
-        self.data.buffers()[1].clone()
+    /// Returns the raw value data

Review Comment:
   I also double checked that it is possible to get the buffers (via ArrayData) directly if someone needs access. 👍 
   
   ```rust
   impl<T: ByteArrayType> From<GenericByteArray<T>> for ArrayData {
       fn from(array: GenericByteArray<T>) -> Self {
           array.data
       }
   }
   ```



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