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
Results in a very hard to interpret error message:
DataFusion error: Error during planning: Failed to coerce arguments to satisfy a call to 'array_slice' function: coercion from ListView(Int64), Int64, Int64 to the signature OneOf([ArraySignature(Array { arguments: [Array, Index, Index], array_coercion: Some(FixedSizedListToList) }), ArraySignature(Array { arguments: [Array, Index, Index, Index], array_coercion: Some(FixedSizedListToList) })]) failed No function matches the given name and argument types 'array_slice(ListView(Int64), Int64, Int64)'. You might need to add explicit type casts.
As a user I would be pretty hard pressed to understand the actual problem is that array_slice doesn't support the ListView type
Describe the solution you'd like
I would like the error message to be more human readable
Describe alternatives you've considered
The error message for array_reverse seems much easier to understand:
>select array_reverse(arrow_cast(make_array(1, 2, 3, 4, 5), 'ListView(Int64)'));
Error during planning: array_reverse does not support type ListView(Int64) No function matches the given name and argument types 'array_reverse(ListView(Int64))'. You might need to add explicit type casts.
Candidate functions:
array_reverse(array)```
Perhaps something like
DataFusion error: Error during planning: Failed to coerce arguments to satisfy a call to 'array_slice' function. You might need to add explicit type casts.
Candidate functions:
array_slice(array, index, index)
array_slice(array index, index, index)
I am not really sure how to work in the information that "Array" in this context means ListArray, LargeListArray or FixedSizeListArray
I'll add on to this issue, we should look into improving the error message when using coercion API too. For example:
>select log('');
Error during planning: Internal error: Function 'log' failed to match any signature, errors: Internal error: Expect TypeSignatureClass::Decimal but received NativeType::String, DataType: Utf8.
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues,Internal error: Expect TypeSignatureClass::Float but received NativeType::String, DataType: Utf8.This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues,Error during planning: Function 'log' expects 2 arguments but received 1,Error during planning: Function 'log' expects 2 arguments but received 1.
This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues No function matches the given name and argument types 'log(Utf8)'. You might need to add explicit type casts. Candidate functions: log(Coercion(TypeSignatureClass::Decimal)) log(Coercion(TypeSignatureClass::Float, implicit_coercion=ImplicitCoercion([Numeric], default_type=Float64)) log(Coercion(TypeSignatureClass::Float, implicit_coercion=ImplicitCoercion([Numeric], default_type=Float64), Coercion(TypeSignatureClass::Decimal)) log(Coercion(TypeSignatureClass::Float, implicit_coercion=ImplicitCoercion([Numeric], default_type=Float64), Coercion(TypeSignatureClass::Float, implicit_coercion=ImplicitCoercion([Numeric], default_type=Float64))
It's not very readable, and it includes InternalError which is not right in terms of semantics.
This can be tackled as a separate task, with this issue as a wider tracking issue.
Hey @alamb / @Jefffrey - is this one still open? Happy to work on this if so :)
Yes thank you -- perhaps you can start with some research into the current behavior and then we can figure out how what the curent status and what it should look like after that
Activity
Jefffrey commentedon Nov 30, 2025
Thanks for creating this, been meaning to do so but lost track 😅
jatinkumarsingh commentedon Dec 1, 2025
@alamb
sir i would love to work on this issue too
could u plz assign it to me
jatinkumarsingh commentedon Dec 1, 2025
take
Jefffrey commentedon Dec 10, 2025
I'll add on to this issue, we should look into improving the error message when using coercion API too. For example:
It's not very readable, and it includes
InternalErrorwhich is not right in terms of semantics.This can be tackled as a separate task, with this issue as a wider tracking issue.
Jefffrey commentedon Dec 25, 2025
Hey @jatinkumarsingh , how's the progress going on this?
Jefffrey commentedon Dec 27, 2025
I'll take over this as I think it's important to finally tackle this as part of other efforts to use the coercible API
Refactor duplicate code in `type_coercion/functions.rs` (#19518)
Improve error message when string functions receive Binary types (#19819
Further refactoring of type coercion function code (#19603)
Improve formatting of datatypes (#20605)
Improve error message when string functions receive Binary types (apa…
Further refactoring of type coercion function code (apache#19603)
Improve formatting of datatypes (apache#20605)
saadtajwar commentedon Jun 30, 2026
Hey @alamb / @Jefffrey - is this one still open? Happy to work on this if so :)
alamb commentedon Jul 1, 2026
Yes thank you -- perhaps you can start with some research into the current behavior and then we can figure out how what the curent status and what it should look like after that
saadtajwar commentedon Jul 1, 2026
@alamb - sounds good, thank you! I'll start with some digging now and report back with my findings! 😁
saadtajwar commentedon Jul 1, 2026
take
fix: report OneOf signature mismatches as planning errors (apache#26329)