ESQL: make unmapped_fields="load" automatically trigger for partially mapped KEYWORD fields, and allow projecting partially mapped non-KEYWORD fields#144228
Merged
alex-spies merged 88 commits intoelastic:mainfrom Apr 14, 2026
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
alex-spies
commented
Mar 26, 2026
alex-spies
commented
Mar 26, 2026
mouhc1ne
approved these changes
Apr 10, 2026
Collaborator
|
Hi @alex-spies, I've created a changelog YAML for you. |
Contributor
Author
astefan
approved these changes
Apr 14, 2026
|
|
||
| SET unmapped_fields="load"\; | ||
| FROM employees, employees_no_names METADATA _index | ||
| | KEEP emp_no, first_name, last_name, _index |
Contributor
There was a problem hiding this comment.
I don't see why you also keep the last_name here, but I don't have an argument good enough to NOT keep it.
alex-spies
added a commit
to alex-spies/elasticsearch
that referenced
this pull request
Apr 14, 2026
… mapped fields (elastic#144228) * Unconditionally load partially mapped keyword fields, whether they are mentioned in expressions or not. Also, always load values of partially mapped fields from the indices where they are mapped. * Fix "optimized incorrectly" for `KEEP foo` with partially mapped fields. * Move detection of PUNKs/PUKs to ResolveTable. * Add temporary manual validation against usage of PUNKs in expressions to keep current behavior. * Add ability to unmap fields to CsvTestsDataLoader. --------- Co-authored-by: Mouhcine Aitounejjar <5037925+mouhc1ne@users.noreply.github.com>
Collaborator
💚 Backport successful
|
elasticsearchmachine
pushed a commit
that referenced
this pull request
Apr 15, 2026
… mapped fields (#144228) (#146262) * Unconditionally load partially mapped keyword fields, whether they are mentioned in expressions or not. Also, always load values of partially mapped fields from the indices where they are mapped. * Fix "optimized incorrectly" for `KEEP foo` with partially mapped fields. * Move detection of PUNKs/PUKs to ResolveTable. * Add temporary manual validation against usage of PUNKs in expressions to keep current behavior. * Add ability to unmap fields to CsvTestsDataLoader. --------- Co-authored-by: Mouhcine Aitounejjar <5037925+mouhc1ne@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #141994, fix #145206
KEEPetc. or not.nulls for indices where it's unmapped. (We temporarily forbid explicit usage in expressions, see ESQL: disallow unmapped_fields="load" in case a field is partially mapped but not as KEYWORD and used without cast #143218; we still support usage in convert functions, introduced in ESQL: unmapped_fields="load" in case a field is partially mapped but not as KEYWORD but cast explicitly #141912.)AI-assisted PR
TODO:
unmapped-type-conflicts.csv-specrather thanunmapped-load.csv-specResolveRefs#resolvePartiallyMappedandResolveRefs#propagateInsistedFieldsif they continue being unused.Add tests toreplaced by spec testsx-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/192_unmapped_load_partial_non_keyword.ymlresp. add expected values.nullcolumns.