Skip to content

[ntuple] Fixes to RNTupleMerger with emulated types - #23702

Open
silverweed wants to merge 3 commits into
root-project:masterfrom
silverweed:ntuple_merge_emu
Open

silverweed wants to merge 3 commits into
root-project:masterfrom
silverweed:ntuple_merge_emu

Conversation

@silverweed

@silverweed silverweed commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This Pull request:

starts adding some systematic testing for merging RNTuples containing emulated fields. In particular the end goal is to test all types of emulated fields with and without late model extension.

Adding some basic testing of emulated fields + late model extension (aka Union merging) surfaced some bugs since the code path was never exercised before. This was brought to light by #23684.

This PR starts setting the foundation for this new set of tests along with fixes for the problems found so far. It doesn't address yet the issue brought up by the PR linked above, but the idea is to get to the best solution for it incrementally.

Changes or fixes:

  • moved MergeEmulated test from ntuple_emulated to new ntuple_merge_emulated test file
  • fixed RNTupleMerger not passing the EmulateUnknownTypes flag to CreateField calls in case of late model extension
  • fixed Type Version and Type Checksum not being properly carried over to emulated record and vector fields.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Test Results

    23 files      23 suites   4d 0h 22m 29s ⏱️
 3 893 tests  3 891 ✅ 0 💤 2 ❌
79 538 runs  79 536 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit c8f217b.

♻️ This comment has been updated with latest results.

Comment thread tree/ntuple/src/RField.cxx
Comment thread tree/ntuple/src/RFieldSequenceContainer.cxx
@silverweed
silverweed force-pushed the ntuple_merge_emu branch 2 times, most recently from 1ac51aa to 2d3888e Compare October 16, 2026 14:14
desc = builder.TypeVersion(GetTypeVersion())
.TypeChecksum(GetTypeChecksum())
.TypeName(GetTypeName())
// we need an Id for MoveDescriptor to succeed, but we're not going to use it.

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.

Which part makes it optional? (and is it too hard and/or fragile to remove this requirement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this case we're using the descriptor just as a container for the three values we care about (type version/checksum/name), so it's a bit of an improper use.
The alternatives would be to keep passing them as separate args or to come up with a dedicated struct for it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we have the SoA emulation fix waiting for this, I'd suggest to add a TODO so that we can proceed.

This will collect a bunch of new tests for merging of emulated fields
We need to tell CreateField to emulate late model extended fields.
Also add a test for merging emulated Vector field

This branch has not been deployed

No deployments
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.

3 participants