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


##########
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:
   BTW I made another small PR
   - https://github.com/apache/arrow-rs/pull/9299
   
   As well as filed an epic to track trying to avoid ArrayData when possible:
   - https://github.com/apache/arrow-rs/issues/9298



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