-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
Negating an string results in an internal error
To Reproduce
❯ select -'100';
Internal error: Can't create negative physical expr for (- 'Literal { value: Utf8("100") }'), the type of child expr is Utf8, not signed numeric.
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue trackerHowever, if the explicit cast is added things work great:
❯ select -'100'::int;
+-----------------+
| (- Utf8("100")) |
+-----------------+
| -100 |Expected behavior
The query should probably an error that says something like negate only supports numeric types
Related PR: #8982 can be applied here too
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers