-
Couldn't load subscription status.
- Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
datafusion-cliThen run
DataFusion CLI v40.0.0
> create table foo as values ('value1', arrow_cast('one', 'Utf8View')), ('value1', arrow_cast('two', 'Utf8View'));
0 row(s) fetched.
> select column2||'ff' from foo;
Internal error: Data type Utf8View not supported for binary operation 'concat_elements' on string arrays.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue trackerDescribe the solution you'd like
I would like the query to work
Describe alternatives you've considered
We can probably get the query to work by fixing the coercion logic to coerce to Utf8, but that will be less efficient than implementing native StringView support for concat
The coercion is here:
datafusion/datafusion/expr/src/type_coercion/binary.rs
Lines 116 to 122 in 6e2ff29
| StringConcat => { | |
| string_concat_coercion(lhs, rhs).map(Signature::uniform).ok_or_else(|| { | |
| plan_datafusion_err!( | |
| "Cannot infer common string type for string concat operation {lhs} {op} {rhs}" | |
| ) | |
| }) | |
| } |
The physical expression implementation starts here
| StringConcat => binary_string_array_op!(left, right, concat_elements), |
Additional context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request