nevi-me commented on a change in pull request #7365:
URL: https://github.com/apache/arrow/pull/7365#discussion_r436254430



##########
File path: rust/arrow/src/array/builder.rs
##########
@@ -450,6 +455,44 @@ impl<T: ArrowPrimitiveType> ArrayBuilder for 
PrimitiveBuilder<T> {
         self.values_builder.len
     }
 
+    /// Appends data from other arrays into the builder
+    ///
+    /// This is most useful when concatenating arrays of the same type into a 
builder.
+    fn append_data(&mut self, data: &[ArrayDataRef]) -> Result<()> {
+        let mul = T::get_bit_width() / 8;
+        for array in data {
+            if array.data_type() != &T::get_data_type() {

Review comment:
       I considered this, I ideally wanted to leave the responsibility to the 
user, as we'd provide convenience methods like concat, but since this is 
public, I should check data types first, then return early if there's a 
mismatch. I'll update




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


Reply via email to