Skip to content

ES|QL implicit typecasting missing in CASE #121890

@jan-elastic

Description

@jan-elastic

Elasticsearch Version

9.0

Installed Plugins

No response

Java Version

n/a

OS Version

n/a

Problem Description

The following statement

ROW a=0 | EVAL b=CASE(a==0, 1.5, 2)

results in an error:

verification_exception - Found 1 problem
line 1:18: third argument of [CASE(a==0, 1.5, 2)] must be [double], found value [2] type [integer]

I'd expect implicit conversion to happen, comparable to C++'s implicit conversion.

Steps to Reproduce

ROW a=0 | EVAL b=CASE(a==0, 1.5, 2)

Logs (if relevant)

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions