Skip to content

Commit fad903f

Browse files
committed
Fix missing match branches
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 5306dd9 commit fad903f

17 files changed

Lines changed: 29 additions & 7 deletions

File tree

encodings/sparse/src/canonical.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ pub(super) fn execute_sparse(
117117
execute_sparse_fixed_size_list(array, *nullability, ctx)?
118118
}
119119
DType::Extension(_ext_dtype) => todo!(),
120+
DType::Variant => todo!(),
120121
})
121122
}
122123

fuzz/src/array/compare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn compare_canonical_array(
141141
)
142142
.into_array()
143143
}
144-
d @ (DType::Null | DType::Extension(_)) => {
144+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
145145
unreachable!("DType {d} not supported for fuzzing")
146146
}
147147
}

fuzz/src/array/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult
115115
}
116116
take_canonical_array_non_nullable_indices(array, indices.as_slice())
117117
}
118-
d @ (DType::Null | DType::Extension(_)) => {
118+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
119119
unreachable!("DType {d} not supported for fuzzing")
120120
}
121121
}

fuzz/src/array/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ fn actions_for_dtype(dtype: &DType) -> HashSet<ActionType> {
487487
// Extension types delegate to storage dtype, support most operations
488488
ActionType::iter().collect()
489489
}
490+
// Currently, no support at all
491+
DType::Variant => Default::default(),
490492
}
491493
}
492494

fuzz/src/array/search_sorted.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn search_sorted_canonical_array(
131131
.collect::<VortexResult<Vec<_>>>()?;
132132
scalar_vals.search_sorted(&scalar.cast(array.dtype())?, side)
133133
}
134-
d @ (DType::Null | DType::Extension(_)) => {
134+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
135135
unreachable!("DType {d} not supported for fuzzing")
136136
}
137137
}

fuzz/src/array/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn slice_canonical_array(
114114
.into_array(),
115115
)
116116
}
117-
d @ (DType::Null | DType::Extension(_)) => {
117+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
118118
unreachable!("DType {d} not supported for fuzzing")
119119
}
120120
}

fuzz/src/array/sort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult<ArrayRef> {
8181
});
8282
take_canonical_array_non_nullable_indices(array, &sort_indices)
8383
}
84-
d @ (DType::Null | DType::Extension(_)) => {
84+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
8585
unreachable!("DType {d} not supported for fuzzing")
8686
}
8787
}

fuzz/src/array/take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option<usize>]) -> Vort
138138
}
139139
Ok(builder.finish())
140140
}
141-
d @ (DType::Null | DType::Extension(_)) => {
141+
d @ (DType::Null | DType::Extension(_) | DType::Variant) => {
142142
unreachable!("DType {d} not supported for fuzzing")
143143
}
144144
}

vortex-datafusion/src/convert/scalars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ impl TryToDataFusion<ScalarValue> for Scalar {
101101
}
102102
}
103103
}
104-
// SAFETY: By construction Utf8 scalar values are utf8
105104
DType::Utf8(_) => ScalarValue::Utf8(self.as_utf8().value().cloned().map(|s| unsafe {
106105
String::from_utf8_unchecked(Vec::<u8>::from(s.into_inner().into_inner()))
107106
})),
@@ -160,6 +159,7 @@ impl TryToDataFusion<ScalarValue> for Scalar {
160159
},
161160
}
162161
}
162+
DType::Variant => vortex_bail!("Variant scalars aren't supported with DF"),
163163
})
164164
}
165165
}

vortex-duckdb/src/convert/dtype.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ impl TryFrom<&DType> for LogicalType {
236236
let element_logical_type = LogicalType::try_from(element_dtype.as_ref())?;
237237
return LogicalType::array_type(element_logical_type, *list_size);
238238
}
239+
DType::Variant => {
240+
vortex_bail!("Vortex Variant array aren't supported in DuckDB")
241+
}
239242
DType::Extension(ext_dtype) => {
240243
let Some(temporal) = ext_dtype.metadata_opt::<AnyTemporal>() else {
241244
vortex_bail!("Unsupported extension type \"{}\"", ext_dtype.id());

0 commit comments

Comments
 (0)