Skip to content

[DF] Allow snapshotting from TTree to RNTuple#19364

Merged
enirolf merged 3 commits intoroot-project:masterfrom
enirolf:rdf-snap-ttree-to-rntuple
Jul 23, 2025
Merged

[DF] Allow snapshotting from TTree to RNTuple#19364
enirolf merged 3 commits intoroot-project:masterfrom
enirolf:rdf-snap-ttree-to-rntuple

Conversation

@enirolf
Copy link
Contributor

@enirolf enirolf commented Jul 14, 2025

Snapshotting from TTree to RNTuple was initially disabled, because it was assumed that this would require adopting (parts of) the machinery of the RNTupleImporter to make it work. However, this is all already taken care of by the TTree's datasource.

One caveat is the support of leaflist branches. It is not possible to snapshot these fully, and users always need to explicitly pass their leaf names to Snapshot. This, however, is something fundamentally unsupported by the RDataFrame. The reason is that for snapshotting to TTree, it is impossible/overly complex to correctly set the branch addresses in the output TTree for these branches at runtime, without JITting. For RNTuple, however, this is likely more doable by using untyped record fields (similar to how it is done in the importer). This requires some more investigation, however, and if indeed possible will be addressed in a follow-up PR.

@github-actions
Copy link

github-actions bot commented Jul 14, 2025

Test Results

    21 files      21 suites   3d 9h 36m 55s ⏱️
 3 217 tests  3 213 ✅ 0 💤 4 ❌
65 838 runs  65 834 ✅ 0 💤 4 ❌

For more details on these failures, see this check.

Results for commit 3e1ab31.

♻️ This comment has been updated with latest results.

Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

Great! LG from an RNTuple perspective, I let RDataFrame experts comment if there's anything else to test in particular (but I think you already discussed offline)

@enirolf enirolf force-pushed the rdf-snap-ttree-to-rntuple branch from 26dc6f0 to 70e54ce Compare July 15, 2025 07:47
Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Great! RDF owners should give final approval.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

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

Thank you!

enirolf added 2 commits July 17, 2025 08:48
Templated snapshotting has been removed, so the "*Templated" and
"*JITted" tests have become identical.
@enirolf enirolf force-pushed the rdf-snap-ttree-to-rntuple branch from 70e54ce to d46cd89 Compare July 17, 2025 13:20
@enirolf enirolf requested a review from vepadulano July 17, 2025 13:21
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

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

Thanks.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

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

Changes are great! just a small warning to fix

@enirolf enirolf force-pushed the rdf-snap-ttree-to-rntuple branch 4 times, most recently from 4e04e96 to 0aa713f Compare July 22, 2025 09:37
Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

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

Thank you, this is great!

@enirolf enirolf force-pushed the rdf-snap-ttree-to-rntuple branch from 0aa713f to 1a93455 Compare July 22, 2025 12:46
Also check the resulting on-disk layout, as well as the effects of
turning the `kVectorToRVec` snapshot option off.
@enirolf enirolf force-pushed the rdf-snap-ttree-to-rntuple branch from 1a93455 to 3e1ab31 Compare July 22, 2025 15:34
@enirolf enirolf merged commit 7a6785d into root-project:master Jul 23, 2025
24 of 26 checks passed
@enirolf enirolf deleted the rdf-snap-ttree-to-rntuple branch July 23, 2025 11:36
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.

5 participants