Skip to content

Commit e48e277

Browse files
committed
ifx
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 7672ad0 commit e48e277

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

encodings/fsst/src/array.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ use vortex_array::vtable::Array;
3939
use vortex_array::vtable::ArrayId;
4040
use vortex_array::vtable::VTable;
4141
use vortex_array::vtable::ValidityVTable;
42+
use vortex_array::vtable::child_to_validity;
4243
use vortex_array::vtable::validity_to_child;
4344
use vortex_buffer::Buffer;
4445
use 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

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

Comments
 (0)