@@ -270,7 +270,7 @@ impl VTable for ParquetVariant {
270270 ) ;
271271
272272 let ( validity, mut child_idx) = if children. len ( ) == expected_children {
273- ( Validity :: AllValid , 0 )
273+ ( Validity :: from ( dtype . nullability ( ) ) , 0 )
274274 } else {
275275 ( Validity :: Array ( children. get ( 0 , & Validity :: DTYPE , len) ?) , 1 )
276276 } ;
@@ -338,9 +338,8 @@ impl VTable for ParquetVariant {
338338 }
339339
340340 fn execute ( array : Arc < Self :: Array > , _ctx : & mut ExecutionCtx ) -> VortexResult < ExecutionResult > {
341- let nullability = array. dtype . nullability ( ) ;
342341 Ok ( ExecutionResult :: done (
343- VariantArray :: new ( array. as_ref ( ) . clone ( ) . into_array ( ) , nullability ) . into_array ( ) ,
342+ VariantArray :: new ( array. as_ref ( ) . clone ( ) . into_array ( ) ) . into_array ( ) ,
344343 ) )
345344 }
346345}
@@ -402,8 +401,7 @@ mod tests {
402401 let inner_value = VarBinViewArray :: from_iter_bin ( [ b"\x02 " , b"\x03 " , b"\x04 " ] ) . into_array ( ) ;
403402 let inner_pv =
404403 ParquetVariantArray :: try_new ( inner_metadata, Some ( inner_value) , None ) . unwrap ( ) ;
405- let typed_value =
406- VariantArray :: new ( inner_pv. into_array ( ) , Nullability :: NonNullable ) . into_array ( ) ;
404+ let typed_value = VariantArray :: new ( inner_pv. into_array ( ) ) . into_array ( ) ;
407405
408406 let outer_pv =
409407 ParquetVariantArray :: try_new ( outer_metadata, None , Some ( typed_value) ) . unwrap ( ) ;
@@ -413,7 +411,7 @@ mod tests {
413411 assert ! ( array. array_eq( & decoded, Precision :: Value ) ) ;
414412 let decoded_pv = decoded. as_opt :: < ParquetVariant > ( ) . unwrap ( ) ;
415413 let typed = decoded_pv. typed_value_array ( ) . unwrap ( ) ;
416- assert_eq ! ( typed. dtype( ) , & DType :: Variant ( Nullability :: NonNullable ) ) ;
414+ assert_eq ! ( typed. dtype( ) , & DType :: Variant ( Nullability :: Nullable ) ) ;
417415 }
418416
419417 #[ test]
0 commit comments