Skip to content

ESQL: unexpected verification_exception for same field name in two indices (union types) #111452

@astefan

Description

@astefan

Description

test1 index

{
    "mappings": {
        "properties": {
            "x": {
                "type": "keyword"
            }
        }
    }
}

test2 index

{
    "mappings": {
        "properties": {
            "x": {
                "type": "long"
            },
            "whatever": {
                "type": "text"
            }
        }
    }
}

from test* | rename whatever as foo results in

     "type": "verification_exception",
        "reason": "Found 1 problem\nline 1:1: Cannot use field [x] due to ambiguities being mapped as [2] incompatible types: [keyword] in [test1], [long] in [test2]",
        "stack_trace": "org.elasticsearch.xpack.esql.VerificationException: Found 1 problem\nline 1:1: Cannot use field [x] due to ambiguities being mapped as [2] incompatible types: [keyword] in [test1], [long] in [test2]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions