Jefffrey commented on issue #19004:
URL: https://github.com/apache/datafusion/issues/19004#issuecomment-3635593713

   I'll add on to this issue, we should look into improving the error message 
when using coercion API too. For example:
   
   ```sql
   > 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to