nevi-me commented on a change in pull request #7306: URL: https://github.com/apache/arrow/pull/7306#discussion_r432870268
########## File path: rust/arrow/src/array/builder.rs ########## @@ -500,6 +500,26 @@ impl<T: ArrowPrimitiveType> PrimitiveBuilder<T> { Ok(()) } + /// Appends values from a slice of type `T` and a validity byte slice + pub fn append_values(&mut self, values: &[T::Native], is_valid: &[u8]) -> Result<()> { + let ceil = bit_util::round_upto_power_of_2(values.len(), 8); Review comment: The idea here is to check that `&[T::Native; 65]` has validity slice of `$[u8; 9]` by rounding 65 to 72, then dividing by 8 to get to 9 u8 values. I'll add a test that asserts failure of the condition. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org