Skip to content

Attach Diagnostic to "incompatible type in unary expression" error #14433

Open
@eliaperantoni

Description

@eliaperantoni

Is your feature request related to a problem or challenge?

For a query like:

SELECT +'a'

The only message that the end user of an application built atop of DataFusion sees is:

Error during planning: Unary operator '+' only supports numeric, interval and timestamp types

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 what was enabled by #13664 for some errors:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions