Dandandan commented on code in PR #9294:
URL: https://github.com/apache/arrow-rs/pull/9294#discussion_r2741412140


##########
arrow-array/src/array/primitive_array.rs:
##########
@@ -1467,13 +1468,14 @@ impl<T: ArrowPrimitiveType, Ptr: 
Into<NativeAdapter<T>>> FromIterator<Ptr> for P
             .collect();
 
         let len = null_builder.len();
+        let maybe_nulls = null_builder.finish().map(|x| 
x.into_inner().into_inner());
 
         let data = unsafe {
             ArrayData::new_unchecked(
                 T::DATA_TYPE,
                 len,
                 None,
-                Some(null_builder.into()),
+                maybe_nulls,

Review Comment:
   This makes sense, I think I saw heavy cloning in profiles even



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to