Skip to content

Nest pass-through objects within objects#105062

Merged
kkrik-es merged 9 commits intoelastic:mainfrom
kkrik-es:fix/103567
Feb 5, 2024
Merged

Nest pass-through objects within objects#105062
kkrik-es merged 9 commits intoelastic:mainfrom
kkrik-es:fix/103567

Conversation

@kkrik-es
Copy link
Copy Markdown
Member

@kkrik-es kkrik-es commented Feb 2, 2024

This is a follow-up on #103648, lifting the limitation that pass-through objects need to be defined at the root level.

Pass-through objects still need to be "leaf" fields, they can't have child objects.

Related to #103567

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @kkrik-es, I've created a changelog YAML for you.

@kkrik-es kkrik-es marked this pull request as ready for review February 2, 2024 13:44
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Member

@felixbarny felixbarny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one idea for an additional case to test. Otherwise LGTM!

}

public void testPassThroughObjectNested() throws IOException {
MapperService mapperService = createMapperService(mapping(b -> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same test case, could you also add a top level attributes passthrough field? Just to check that this doesn’t cause a naming conflict because there’s also an attributes field in the resource object.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, had a test for that in yaml too.

@kkrik-es kkrik-es merged commit e85bb5a into elastic:main Feb 5, 2024
@kkrik-es kkrik-es deleted the fix/103567 branch February 8, 2024 17:10
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.

4 participants