Skip to content

ESQL: unmapped_fields="nullify" and "load" with field aliases #144844

@alex-spies

Description

@alex-spies

I don't think we have tests for this yet. We should add some (and potentially fix a bug if needed).

For context:

Assume that field_alias is an alias for field in an index mapping. Things we should (double) check:

  • Do we wrongly try to nullify field_alias/load field_alias from _source?
  • What if the field is aliased in one mapping, but missing in another? That is, idx1 has the field_alias alias, but idx2 does not have it; in FROM idx1, idx2 | KEEP field_alias, do we correctly try to find a field_alias field in the _source for idx2?
  • What if the field is aliased in one mapping, non-aliased in another, missing in yet another? Do we still correctly load it in queries like FROM idx1, idx2, idx3 | EVAL cast_field = field_alias::KEYWORD
  • What if field_alias is an alias of a flattened field? Right now, I expect that we fail the query FROM idx | KEEP field_alias.some.subfield because we determine it's a subfield of a flattened field. This is probably overly restrictive, but okay behavior. But we need to have a look and add a test to make this behavior clear.
  • There may be more interesting cases; we should think a little and see what makes sense to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/ES|QLAKA ESQL>testIssues or PRs that are addressing/adding testsTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    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