-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, cast_to_variant accepts the following arguments:
cast_to_variant(BinaryViewArray, BinaryViewArray) # represents metadata, value columnsI don't see why we can support the following:
cast_to_variant(StringArray | StringViewArray | LargeStringArray) # represents String valueswhere each str (s) in the array can be converted to a Variant from Variant::from(s)
This applies to other array types like FixedSizeBinaryArray
cast_to_variant(FixedSizeBinaryArray) # represents UUID (FixedSizeBinary(16))datafusion-variant/src/cast_to_variant.rs
Lines 52 to 62 in 8910c31
| match args.arg_fields.as_slice() { | |
| [metadata_field, variant_field] => { | |
| try_field_as_binary(metadata_field.as_ref())?; | |
| try_field_as_binary(variant_field.as_ref())?; | |
| } | |
| _ => { | |
| // right now, let's only support (BinaryViewArray, BinaryViewArray) | |
| // but I don't see why we couldn't call cast_to_variant(string_column) -> VariantArray... | |
| return exec_err!("unsupported, expected 2 arguments"); | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels