@@ -39,6 +39,7 @@ use vortex_array::vtable::Array;
3939use vortex_array:: vtable:: ArrayId ;
4040use vortex_array:: vtable:: VTable ;
4141use vortex_array:: vtable:: ValidityVTable ;
42+ use vortex_array:: vtable:: child_to_validity;
4243use vortex_array:: vtable:: validity_to_child;
4344use vortex_buffer:: Buffer ;
4445use vortex_buffer:: ByteBuffer ;
@@ -459,10 +460,8 @@ impl FSSTArray {
459460 let offsets = self . slots [ CODES_OFFSETS_SLOT ]
460461 . clone ( )
461462 . vortex_expect ( "FSSTArray codes_offsets slot must be present" ) ;
462- let validity = match & self . slots [ CODES_VALIDITY_SLOT ] {
463- Some ( arr) => Validity :: Array ( arr. clone ( ) ) ,
464- None => Validity :: from ( self . dtype . nullability ( ) ) ,
465- } ;
463+ let validity =
464+ child_to_validity ( & self . slots [ CODES_VALIDITY_SLOT ] , self . dtype . nullability ( ) ) ;
466465 // SAFETY: components were validated at FSSTArray construction time and bytes are
467466 // immutable; only offsets/validity slots can change, but the executor preserves
468467 // their invariants.
@@ -509,7 +508,10 @@ impl FSSTArray {
509508
510509impl ValidityVTable < FSST > for FSST {
511510 fn validity ( array : & FSSTArray ) -> VortexResult < Validity > {
512- Ok ( array. codes ( ) . validity ( ) )
511+ Ok ( child_to_validity (
512+ & array. slots [ CODES_VALIDITY_SLOT ] ,
513+ array. dtype . nullability ( ) ,
514+ ) )
513515 }
514516}
515517
0 commit comments