sdf-jkl commented on code in PR #9681:
URL: https://github.com/apache/arrow-rs/pull/9681#discussion_r3307560648


##########
parquet-variant-compute/src/variant_get.rs:
##########
@@ -171,6 +187,16 @@ 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]));
+                    let arr = VariantArray::from_parts(
+                        input.metadata_field().clone(),

Review Comment:
   Valid, but `metadata` array has to be the same length as Value/TypedValue 
fields. 
   
   By reusing `EMPTY_VARIANT_METADATA_BYTES: &[u8] = &[1, 0, 0];` we'll 
allocate 3 * array_len bytes vs doing Arc bump



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