File tree Expand file tree Collapse file tree
vortex-array/src/arrays/variant
vortex-datafusion/src/convert
vortex-duckdb/src/convert Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ use vortex_buffer::buffer_mut;
5050use vortex_error:: VortexError ;
5151use vortex_error:: VortexExpect ;
5252use vortex_error:: VortexResult ;
53+ use vortex_error:: vortex_bail;
5354use vortex_error:: vortex_panic;
5455
5556use 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
Original file line number Diff line number Diff 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 ) ]
1515pub struct VariantArray {
1616 child : ArrayRef ,
Original file line number Diff line number Diff 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 } ) ) ,
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments