Dandandan commented on code in PR #9294:
URL: https://github.com/apache/arrow-rs/pull/9294#discussion_r2741556032
##########
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:
Yeah it shaves off another ~30%
--
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]