alamb commented on code in PR #9121:
URL: https://github.com/apache/arrow-rs/pull/9121#discussion_r2694185842
##########
parquet/src/arrow/buffer/view_buffer.rs:
##########
@@ -70,26 +70,18 @@ impl ViewBuffer {
/// Converts this into an [`ArrayRef`] with the provided `data_type` and
`null_buffer`
pub fn into_array(self, null_buffer: Option<Buffer>, data_type:
&ArrowType) -> ArrayRef {
let len = self.views.len();
- let views = Buffer::from_vec(self.views);
+ let views = ScalarBuffer::from(self.views);
+ let nulls = null_buffer
+ .map(|b| NullBuffer::new(BooleanBuffer::new(b, 0, len)))
+ .filter(|n| n.null_count() != 0);
Review Comment:
replicates the behavior of ArrayDataBuilder in
https://github.com/apache/arrow-rs/blob/237065b2bbf9b0f249321828acd91f07387669a1/arrow-data/src/data.rs#L2120-L2119
--
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]