sdf-jkl commented on code in PR #9681:
URL: https://github.com/apache/arrow-rs/pull/9681#discussion_r3397740471
##########
parquet-variant-compute/src/variant_get.rs:
##########
@@ -250,6 +266,15 @@ fn shredded_get_path(
}
ShreddedPathStep::Missing => {
let num_rows = input.len();
+ if
as_field.is_some_and(Field::has_valid_extension_type::<VariantType>) {
+ let all_nulls =
Some(arrow::buffer::NullBuffer::from(vec![false; num_rows]));
+ // Propagating metadata is not necessary for an all-NULL
array, but is cheaper than constructing
+ // a new empty metadata array. (n * 3 bytes vs Arc bump)
+ let metadata = input.metadata_field().clone();
+ return Ok(ArrayRef::from(VariantArray::from_parts(
+ metadata, None, None, all_nulls,
+ )));
Review Comment:
https://github.com/apache/arrow-rs/pull/9681/commits/cf7e545f852623a6818bc520cf272711741a93a6
--
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]