houqp commented on a change in pull request #7306:
URL: https://github.com/apache/arrow/pull/7306#discussion_r432970873
##########
File path: rust/arrow/src/array/builder.rs
##########
@@ -500,6 +500,49 @@ 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],
+ offset: usize,
+ ) -> Result<()> {
Review comment:
I think that makes sense. Using `&[bool]` also prevents users from
blindly passing in the validity bitmap from an existing ArrayData into it
without being aware of the offsets. CPP implementation also has a method that
takes a vector of bool.
----------------------------------------------------------------
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:
[email protected]