Skip to content

Commit 30c8036

Browse files
committed
fixes
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent fad903f commit 30c8036

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

encodings/sparse/src/canonical.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ use vortex_buffer::buffer_mut;
5050
use vortex_error::VortexError;
5151
use vortex_error::VortexExpect;
5252
use vortex_error::VortexResult;
53+
use vortex_error::vortex_bail;
5354
use vortex_error::vortex_panic;
5455

5556
use crate::ConstantArray;
@@ -117,7 +118,7 @@ pub(super) fn execute_sparse(
117118
execute_sparse_fixed_size_list(array, *nullability, ctx)?
118119
}
119120
DType::Extension(_ext_dtype) => todo!(),
120-
DType::Variant => todo!(),
121+
DType::Variant => vortex_bail!("Sparse canonicalization does not support Variant"),
121122
})
122123
}
123124

vortex-array/src/arrays/variant/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::stats::ArrayStats;
1010
/// The canonical in-memory representation of variant (semi-structured) data.
1111
///
1212
/// Wraps a single child array that contains the actual variant-encoded data
13-
/// (e.g. a [`ParquetVariantArray`] or any other variant encoding).
13+
/// (e.g. a `ParquetVariantArray` or any other variant encoding).
1414
#[derive(Clone, Debug)]
1515
pub struct VariantArray {
1616
child: ArrayRef,

vortex-datafusion/src/convert/scalars.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl TryToDataFusion<ScalarValue> for Scalar {
101101
}
102102
}
103103
}
104+
// SAFETY: By construction Utf8 scalar values are utf8.
104105
DType::Utf8(_) => ScalarValue::Utf8(self.as_utf8().value().cloned().map(|s| unsafe {
105106
String::from_utf8_unchecked(Vec::<u8>::from(s.into_inner().into_inner()))
106107
})),

vortex-duckdb/src/convert/scalar.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ impl ToDuckDBScalar for Scalar {
7979
DType::Utf8(_) => self.as_utf8().try_to_duckdb_scalar(),
8080
DType::Binary(_) => self.as_binary().try_to_duckdb_scalar(),
8181
DType::Struct(..) | DType::List(..) | DType::FixedSizeList(..) => todo!(),
82-
DType::Variant => todo!(),
82+
DType::Variant => {
83+
vortex_bail!("Vortex Variant scalars aren't supported in DuckDB")
84+
}
8385
}
8486
}
8587
}

0 commit comments

Comments
 (0)