viirya commented on code in PR #3326: URL: https://github.com/apache/arrow-rs/pull/3326#discussion_r1059079777
########## arrow-array/src/builder/generic_bytes_builder.rs: ########## @@ -118,10 +146,34 @@ impl<T: ByteArrayType> GenericByteBuilder<T> { self.value_builder.as_slice() } + /// Returns the current values buffer as a mutable slice + pub fn values_slice_mut(&mut self) -> &mut [u8] { + self.value_builder.as_slice_mut() + } + /// Returns the current offsets buffer as a slice pub fn offsets_slice(&self) -> &[T::Offset] { self.offsets_builder.as_slice() } + + /// Returns the current null buffer as a slice + pub fn validity_slice(&self) -> Option<&[u8]> { + self.null_buffer_builder.as_slice() + } + + /// Returns the current null buffer as a mutable slice + pub fn validity_slice_mut(&mut self) -> Option<&mut [u8]> { + self.null_buffer_builder.as_slice_mut() + } + + /// Returns the current offsets, values buffer and null buffer as a slice + pub fn slices_mut(&mut self) -> (&mut [T::Offset], &mut [u8], Option<&mut [u8]>) { Review Comment: Oops, removed it now. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org