-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle runtime subfields when shadowing dynamic mappings (#75595)
In #75454 we changed our dynamic shadowing logic to check that an unmapped field was truly shadowed by a runtime field before returning no-op mappers. However, this does not handle the case where the runtime field can have multiple subfields, as will be true for the upcoming composite field type. We instead need to check that the field in question would not be shadowed by any field type returned by any runtime field. This commit abstracts this logic into a new isShadowed() method on DocumentParserContext, which uses a set of runtime field type names built from the mapping lookup at construction time. It also simplifies the no-op mapper slightly by making it a singleton object, as we don't need to preserve field names here.
- Loading branch information
1 parent
90148fe
commit ffcaffc
Showing
6 changed files
with
124 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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