Skip to content

Commit c38ed37

Browse files
fix[fuzz]: correct chunked mask nullable (#5170)
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 1f1409c commit c38ed37

File tree

1 file changed

+8
-5
lines changed
  • vortex-array/src/arrays/chunked/compute

1 file changed

+8
-5
lines changed

vortex-array/src/arrays/chunked/compute/mask.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,23 @@ fn mask_slices(
9595
.iter()
9696
.zip_eq(chunked_filters)
9797
.map(|(chunk, chunk_filter)| -> VortexResult<ArrayRef> {
98-
Ok(match chunk_filter {
98+
match chunk_filter {
9999
ChunkFilter::All => {
100100
// entire chunk is masked out
101-
ConstantArray::new(Scalar::null(new_dtype.clone()), chunk.len()).into_array()
101+
Ok(
102+
ConstantArray::new(Scalar::null(new_dtype.clone()), chunk.len())
103+
.into_array(),
104+
)
102105
}
103106
ChunkFilter::None => {
104107
// entire chunk is not affected by mask
105-
chunk.clone()
108+
cast(chunk, new_dtype)
106109
}
107110
ChunkFilter::Slices(slices) => {
108111
// Slices of indices that must be set to null
109-
mask(chunk, &Mask::from_slices(chunk.len(), slices))?
112+
mask(chunk, &Mask::from_slices(chunk.len(), slices))
110113
}
111-
})
114+
}
112115
})
113116
.process_results(|iter| iter.collect::<Vec<_>>())
114117
}

0 commit comments

Comments
 (0)