You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose I could construct a single row that contains more than i32 bytes of string data. But it also seems generally desirable for DataFusion to promote to the large string/binary type?
To Reproduce
No response
Expected behavior
Utf8 promotes into LargeUt8, but not vice versa.
Additional context
No response
The text was updated successfully, but these errors were encountered:
You can try TypeSignature::String now if you want to coerce any type to string.
The current logic is which won't coerce Utf8 to LargeUtf8. (LargeUtf8View is currently not supported)
pubfnstring_coercion(lhs_type:&DataType,rhs_type:&DataType) -> Option<DataType>{use arrow::datatypes::DataType::*;match(lhs_type, rhs_type){// If Utf8View is in any side, we coerce to Utf8View.(Utf8View,Utf8View | Utf8 | LargeUtf8) | (Utf8 | LargeUtf8,Utf8View) => {Some(Utf8View)}// Then, if LargeUtf8 is in any side, we coerce to LargeUtf8.(LargeUtf8,Utf8 | LargeUtf8) | (Utf8,LargeUtf8) => Some(LargeUtf8),// Utf8 coerces to Utf8(Utf8,Utf8) => Some(Utf8),
_ => None,}}
Describe the bug
The function can_coerce_from establishes the lossless conversions between data types.
It currently says that LargeUtf8 can be coerced into Utf8. I'm not sure this should be true?
datafusion/datafusion/expr/src/type_coercion/functions.rs
Lines 768 to 769 in 0f584c8
I suppose I could construct a single row that contains more than i32 bytes of string data. But it also seems generally desirable for DataFusion to promote to the large string/binary type?
To Reproduce
No response
Expected behavior
Utf8 promotes into LargeUt8, but not vice versa.
Additional context
No response
The text was updated successfully, but these errors were encountered: