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)

This will collect a bunch of new tests for merging of emulated fields
We need to tell CreateField to emulate late model extended fields.
@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 54m 50s ⏱️
 3 887 tests  3 885 ✅ 0 💤 2 ❌
79 690 runs  79 688 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit e8ccc45.

Comment thread tree/ntuple/src/RField.cxx Outdated
ROOT::RVectorField::RVectorField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField,
std::optional<std::string_view> emulatedFromType)
: ROOT::RFieldBase(fieldName, emulatedFromType ? *emulatedFromType : "std::vector<" + itemField->GetTypeName() + ">",
const ROOT::RFieldDescriptor *emulatedFrom)

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.

Ok for now, we'll come back to this to avoid disguising an untyped record as an emulated record. This is a pre-existing issue, of course.

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.

2 participants