Skip to content

Fix handling of projected fields in RNTupleProcessor chains - #23744

Merged
enirolf merged 7 commits into
root-project:masterfrom
enirolf:ntuple-ds-processor-rdffields
Oct 20, 2026
Merged

enirolf merged 7 commits into
root-project:masterfrom
enirolf:ntuple-ds-processor-rdffields

Conversation

@enirolf

@enirolf enirolf commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Currently, the RNTupleProcessorDS crashes with chains of RNTuples that have collections, because the (non-persisted) projected cardinality fields cannot be reconnected properly when the next RNTuple is opened.

This fix adds an additional bookkeeping mechanism for projected fields. It keeps track of the RNTupleProcessorEntry index of the field it should get the on-disk ID from and sets it accordingly upon connection.

Additionally, tests with more involved RNTupleProcessor combinations are added.

There is one outstanding FIXME also uncovered by these tests, which is the #colname alias for collection sizes. This doesn't work yet for fields belonging to auxiliary RNTuples. It will be addressed in a future PR.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 0h 8m 26s ⏱️
 3 888 tests  3 887 ✅ 0 💤 1 ❌
83 245 runs  83 244 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 478b6c5.

♻️ This comment has been updated with latest results.

@jblomer jblomer left a comment

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.

In principle looks good to me. Regarding the term "artificial" in the commit and PR messages: the term "artificial field" is already taken for fields that are added due to schema evolution and that have no on-disk information. Here, I think the correct term is "projected field" (even though this is not a persistified projection).

Comment thread tree/dataframe/src/RNTupleProcessorDS.cxx
Before, the field name `std::vector<float> jets` would be set to `_0`.
Now, we traverse up the fieldInfos to find the actual field name and set
it accordingly.
Projected fields adopt their on-disk ID from other fields. This commit
adds a way to bookkeep how the on-disk ID of artificial fields should be
set when they get updated.
@enirolf
enirolf force-pushed the ntuple-ds-processor-rdffields branch from 62ad8f9 to 478b6c5 Compare October 20, 2026 07:50
@enirolf enirolf changed the title Fix handling of artificial fields in RNTupleProcessor chains Fix handling of projected fields in RNTupleProcessor chains Oct 20, 2026
@enirolf

enirolf commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

In principle looks good to me. Regarding the term "artificial" in the commit and PR messages: the term "artificial field" is already taken for fields that are added due to schema evolution and that have no on-disk information. Here, I think the correct term is "projected field" (even though this is not a persistified projection).

I've updated the wording 👍

@enirolf
enirolf merged commit 6aa4a83 into root-project:master Oct 20, 2026
61 of 63 checks passed
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