@@ -23,7 +23,7 @@ use std::collections::HashMap;
23
23
use substrait:: proto:: expression:: mask_expression:: { StructItem , StructSelect } ;
24
24
use substrait:: proto:: expression:: MaskExpression ;
25
25
use substrait:: proto:: r#type:: {
26
- Boolean , Fp64 , Kind , Nullability , String as SubstraitString , Struct , I64 ,
26
+ Binary , Boolean , Fp64 , Kind , Nullability , String as SubstraitString , Struct , I64 ,
27
27
} ;
28
28
use substrait:: proto:: read_rel:: local_files:: file_or_files:: ParquetReadOptions ;
29
29
use substrait:: proto:: read_rel:: local_files:: file_or_files:: { FileFormat , PathType } ;
@@ -176,6 +176,24 @@ fn to_substrait_type(data_type: &DataType, nullable: bool) -> Result<Type> {
176
176
nullability,
177
177
} ) ) ,
178
178
} ) ,
179
+ DataType :: Binary => Ok ( Type {
180
+ kind : Some ( Kind :: Binary ( Binary {
181
+ type_variation_reference : DEFAULT_CONTAINER_TYPE_VARIATION_REF ,
182
+ nullability,
183
+ } ) ) ,
184
+ } ) ,
185
+ DataType :: LargeBinary => Ok ( Type {
186
+ kind : Some ( Kind :: Binary ( Binary {
187
+ type_variation_reference : LARGE_CONTAINER_TYPE_VARIATION_REF ,
188
+ nullability,
189
+ } ) ) ,
190
+ } ) ,
191
+ DataType :: BinaryView => Ok ( Type {
192
+ kind : Some ( Kind :: Binary ( Binary {
193
+ type_variation_reference : VIEW_CONTAINER_TYPE_VARIATION_REF ,
194
+ nullability,
195
+ } ) ) ,
196
+ } ) ,
179
197
_ => Err ( DataFusionError :: Substrait ( format ! (
180
198
"Logical type {data_type} not implemented as substrait type"
181
199
) ) ) ,
0 commit comments