-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[do not merge] RNTuple Attributes prototype #19153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
silverweed
wants to merge
61
commits into
root-project:master
Choose a base branch
from
silverweed:ntuple_attr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Results 16 files 16 suites 3d 4h 16m 26s ⏱️ For more details on these failures, see this check. Results for commit 565836e. ♻️ This comment has been updated with latest results. |
3aa19c0 to
b3b4900
Compare
jblomer
reviewed
Jul 4, 2025
e77589e to
b86c122
Compare
658dcd2 to
7fc58aa
Compare
0a24d9c to
0dcc555
Compare
ed882c4 to
49f5abc
Compare
0ee772d to
47c2183
Compare
Added Attribute Sets
- RNTupleAttributeSetReader -> RNTupleAttrSetReader - RNTupleAttributeSetWriter -> RNTupleAttrSetWriter - RNTupleAttributeEntry -> RNTupleAttrEntry
Attribute Entries are now created on the user side similarly to what happens with the main data. So instead of having: auto attrEntries = attrSet->GetAttributes(0); you now do: auto attrEntry = attrSet->CreateAttrEntry(); attrSet->LoadAttrEntry(0, attrEntry); This means that the attribute entry can be reused instead of having to recreate it every time.
We always merge AttributeSets in Union mode and we use the same Error Behavior as the main RNTuple.
The new API more closely resembles the main RNTuple API. Now, instead of having BeginRange() allocate the AttributeEntry every time, it returns a "pending range" which can then be used to commit a REntry which can be created from the attribute user model, or it can even be the user model's default entry.
We don't use any more the RNTupleAttrEntry but rather just regular REntries. This allows more flexibility as the user can decide whether to create their own entry or use the default entry from the reader. LoadAttrEntry() now returns the Range information.
for consistency with RNTupleWriter::Recreate, pass the model first and the name second.
...since Append() was made private
To avoid conflicts if the user names the attribute set like one of the internal names
This can be useful to store it in collections etc. Since we already allow moving from a PendingRange, we already need to handle an "invalid state" anyway, so it makes sense you can default construct a value in the invalid state.
47c2183 to
376fdb2
Compare
This was referenced Sep 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull request:
Draft PR for the RNTuple Attributes prototype.
This prototype allows writing, reading and merging TFile-based RNTuples containing Attributes. Note that the implementation is not final and cuts several corners in order to provide a proof of concept.
Note that this new optional feature requires the Binary Format to be bumped by one minor version.