Skip to content

- (negation) with NULL literals does not work: can't be evaluated because the expression's type is Utf8, not signed  #1192

@alamb

Description

@alamb

Reproducer:

> select -null;
Internal("(- 'Literal { value: Utf8(NULL) }') can't be evaluated because the expression's type is Utf8, not signed numeric")

The correct output is null

I think the solution will likely be to teach Expr::Negative about type coercion (as is done in BinaryExpr and function calls) once coercion knows about the null type (and that it can be cast to any other type). See #1184 for more details

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions