Skip to content

ESQL: introduce mapping-unavailable fields grammar#138889

Closed
bpintea wants to merge 2 commits intoelastic:mainfrom
bpintea:feat/unavailable_fields_grammar
Closed

ESQL: introduce mapping-unavailable fields grammar#138889
bpintea wants to merge 2 commits intoelastic:mainfrom
bpintea:feat/unavailable_fields_grammar

Conversation

@bpintea
Copy link
Contributor

@bpintea bpintea commented Dec 2, 2025

This adds the grammar for the mapping-unavailable fields: the FROM command gets two new clauses, similar to METADATA: OPTIONAL and UNMAPPED.

These new clauses can receive field names, field name patterns or identifier parameter markers.

They can be provided in any order (along with METADATA), but each can only appear at most once.

Examples:

FROM test OPTIONAL specificFoo, `metadata`, optionalFields* METADATA _index UNMAPPED specificBar, `unmapped`
FROM test UNMAPPED *
FROM test OPTIONAL ??param1, embeddedFieldName

Related: #138888

This adds the grammar for the mapping-unavailable fields: the FROM
command gets two new clauses, similar to METADATA: OPTIONAL and
UNMAPPED.

These new clauses can receive field names, field name patterns or
identifier parameter markers.

They can be provided in any order (along with METADATA), but each can
only appear at most once.
@elasticsearchmachine
Copy link
Collaborator

Hi @bpintea, I've created a changelog YAML for you.

@bpintea
Copy link
Contributor Author

bpintea commented Jan 19, 2026

Started with #139417, will re-evaluate the need this PR adrdesses at a later time.

@bpintea bpintea closed this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants