Skip to content

ESQL: unmapped_fields="load" can lead to 0 pages emitted #141920

@alex-spies

Description

@alex-spies

Saw this in union types tests, but this may be unrelated to union types as the unmapped field was not one with a type conflict in this test.

To reproduce, unmap the name from the apps index in mapping-apps.json:

{
    "dynamic": false,
    "properties" : {
        "id" : {
            "type" : "integer"
        },
        "version" : {
            "type" : "version"
        }
    }
}

Then, run

./gradlew ":x-pack:plugin:esql:qa:server:single-node:javaRestTest" --tests "org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT" -Dtests.method="test {csv-spec:union_types.ShortIntegerWidening}" 

This runs

FROM apps, apps_short METADATA _index
| EVAL id = id::integer
| KEEP _index, id, version, name
| WHERE name == "aaaaa" OR name == "hhhhh"
| SORT _index ASC, id ASC

and returns

Expected more data but no more entries found after [0]
Data mismatch:

Actual:
_index:keyword | id:integer | version:version | name:keyword

Expected:
_index:keyword | id:integer | version:version | name:keyword
apps           | 1          | 1               | aaaaa
apps           | 8          | 1.2.3.4         | hhhhh
apps           | 12         | 1.2.3.4         | aaaaa
apps_short     | 1          | 1               | aaaaa
apps_short     | 8          | 1.2.3.4         | hhhhh
apps_short     | 12         | 1.2.3.4         | aaaaa

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions