Skip to content

Commit 906d297

Browse files
authored
chore: Don't generate compare expressions for lists when fuzzing (#3882)
Signed-off-by: Robert Kruszewski <[email protected]>
1 parent 29d2323 commit 906d297

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

vortex-dtype/src/dtype.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ impl DType {
284284
matches!(self, Struct(_, _))
285285
}
286286

287+
/// Check if `self` is a `ListDType`
288+
pub fn is_list(&self) -> bool {
289+
matches!(self, List(_, _))
290+
}
291+
287292
/// Check if `self` is a primitive tpye
288293
pub fn is_primitive(&self) -> bool {
289294
matches!(self, Primitive(_, _))

vortex-expr/src/arbitrary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn filter_expr(u: &mut Unstructured<'_>, dtype: &DType) -> AResult<Option<Ex
3737
.filter_map(|_| {
3838
match u.choose_iter(struct_dtype.names().iter().zip(struct_dtype.fields())) {
3939
Ok((col, dtype)) => {
40-
if dtype.is_struct() {
40+
if dtype.is_struct() || dtype.is_list() {
4141
None
4242
} else {
4343
Some(random_comparison(u, col, &dtype))

0 commit comments

Comments
 (0)