eliaperantoni opened a new issue, #14431:
URL: https://github.com/apache/datafusion/issues/14431
### Is your feature request related to a problem or challenge?
For a query like:
```sql
SELECT sum('a')'
```
The only message that the end user of an application built atop of
DataFusion is:
```
Error during planning: Execution error: User-defined coercion failed with
Execution("Sum not supported for Utf8") No function matches the given name and
argument types 'sum(Utf8)'. You might need to add explicit type casts.
Candidate functions:
sum(UserDefined)
```
We want to provide a richer message that _references and highlights
locations in the original SQL query_, and contextualises and helps the user
understand the error. In the end, it would be possible to display errors in a
fashion akin to:

See #14429 for more information.
### Describe the solution you'd like
Attach a well crafted `Diagnostic` to the `DataFusionError`, building on top
of the foundations laid in #13664. See #14429 for more information.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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]