nevi-me commented on a change in pull request #7306:
URL: https://github.com/apache/arrow/pull/7306#discussion_r432919440
##########
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:
Thanks, this didn't occur to me, because I started with the signature
that was proposed in the comment that led to the JIRA being opened. So by the
time I added the offset, I was too far in to notice that I'm passing the
elements of ArrayData. I'll change this, and it'll make the interface much
better, because the most natural usecase of this is to append arrays to each
other
##########
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:
Thanks, this didn't occur to me, because I started with the signature
that was proposed in the comment that led to the JIRA being opened. So by the
time I added the offset, I was too far in to notice that I'm passing the
elements of ArrayData. I'll change this, and it'll make the interface much
better, because the most natural usecase of this is to append arrays to each
other
----------------------------------------------------------------
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]