alamb commented on code in PR #9122:
URL: https://github.com/apache/arrow-rs/pull/9122#discussion_r2676635354
##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -212,41 +211,69 @@ where
.consume_record_data()
.into_buffer(target_type);
- let array_data = ArrayDataBuilder::new(arrow_data_type)
- .len(self.record_reader.num_values())
- .add_buffer(record_data)
- .null_bit_buffer(self.record_reader.consume_bitmap_buffer());
+ let len = self.record_reader.num_values();
+ let nulls = self
+ .record_reader
+ .consume_bitmap_buffer()
+ .map(|b| NullBuffer::new(BooleanBuffer::new(b, 0, len)));
- let array_data = unsafe { array_data.build_unchecked() };
Review Comment:
the point is to avoid this ArrayData (and its `Vec`s) as we know here what
types of arrays will be built
--
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]