Skip to content

Conversation

silverweed
Copy link
Contributor

First PR of a series to merge the RNTuple Attributes into master. The final result will be this, although the commits will be reorganized to be more coherent and reviewable.

This first PR updates the binary format specification (introducing a new minor version) and updates the Serializer and Descriptor code to match. This is backward-compatible and no Attribute can be written yet since the writer API will be introduced later.

Checklist:

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

Copy link

github-actions bot commented Sep 16, 2025

Test Results

    20 files      20 suites   3d 12h 55m 39s ⏱️
 3 662 tests  3 661 ✅ 0 💤 1 ❌
71 510 runs  71 509 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 48b72ff.

♻️ This comment has been updated with latest results.

@silverweed silverweed added the clean build Ask CI to do non-incremental build on PR label Sep 16, 2025
@silverweed silverweed closed this Sep 16, 2025
@silverweed silverweed reopened this Sep 16, 2025
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.

In principle looks good to me. Some comments.

@silverweed
Copy link
Contributor Author

I updated the PR and uniformed the RNTupleAttrSetDescriptor with the other descriptor classes.

@silverweed silverweed requested a review from jblomer September 18, 2025 08:46
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.

Very nice! Some minor comments.

Since this is changing the binary format, let's perhaps get a second approval.


The current Attribute Schema Version is **1.0**. It has the following fields (in the following order):
1. `_rangeStart` (type `NTupleSize_t`): the start of the range that each Attribute Entry refers to;
2. `_rangeLen` (type `NTupleSize_t`): the length of the range that each Attribute Entry refers to;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we may want to elaborate what length zero means

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How prescriptive do we want to be with them? I think we probably don't want to mandate how a reader treats them, but we want to make sure they are recognized as 'valid'. That said, we never say anything about merging in the Specification...

fName == other.fName;
};

ROOT::Experimental::RNTupleAttrSetDescriptor ROOT::Experimental::RNTupleAttrSetDescriptor::Clone() const
Copy link
Contributor

Choose a reason for hiding this comment

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

Clone of fAnchorLocator seems missing

@@ -1799,6 +1799,23 @@ ROOT::RResult<std::uint32_t> ROOT::Internal::RNTupleSerializer::SerializeFooter(
return R__FORWARD_ERROR(res);
}

// Attributes
frame = pos;
const auto nAttributeSets = desc.GetNAttributeSets();
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a warning if nAttributeSets > 0 that attributes are still experimental

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does this have implication on the readability of the data? @hahnjo pointed out that we may want to have a way to write RNTuples with no format changes until we have finalized the decision about the format (which also implies we should not merge any change to the specs until then).
I think we need an internal discussion on this before this PR can proceed (or at least before the specs are merged).

} else {
return R__FORWARD_ERROR(res);
}
for (std::uint32_t attrSetId = 0; attrSetId < nAttributeSets; ++attrSetId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, if nAttributeSets > 0 let's print a warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean build Ask CI to do non-incremental build on PR in:RNTuple
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants