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

    21 files      21 suites   3d 16h 43m 57s ⏱️
 3 664 tests  3 662 ✅  0 💤 2 ❌
75 132 runs  75 119 ✅ 10 💤 3 ❌

For more details on these failures, see this check.

Results for commit 6c3a26f.

♻️ 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 silverweed force-pushed the ntuple_attr_1 branch 2 times, most recently from b0449c0 to 48b72ff Compare September 18, 2025 08:45
@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.

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.

some comments on the spec additions and the iterator implementations

1. it cannot have linked Attribute RNTuples itself;
2. the Alias columns sections, both in its header and footer, must be empty (i.e. none of the Attribute Set RNTuple's
Fields can be Projected Fields);
3. none of its fields may have a structural role of 0x04 (i.e. it must not contain a ROOT streamer object);
Copy link
Member

Choose a reason for hiding this comment

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

Is it a choice or a technical limitation?

An Attribute Set RNTuple has a number of restrictions compared to a regular RNTuple:

1. it cannot have linked Attribute RNTuples itself;
2. the Alias columns sections, both in its header and footer, must be empty (i.e. none of the Attribute Set RNTuple's
Copy link
Member

Choose a reason for hiding this comment

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

Is there (somewhere else) a more detailed explanation/reason for this limitation?


### Attribute Schema Version
Each Attribute Set is created with a user-defined Model. This Model is not used directly by the underlying Attribute
Set RNTuple, but it is augmented with internal fields used to store additional data that serve to associate each
Copy link
Member

Choose a reason for hiding this comment

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

When inspecting the Attribute Set RNTuple will the additional fields be exposed or hidden? (And If they are exposed would a user be able to distinguish the implicit vs the explicit part of the model?)

if (fnBufSizeLeft() < static_cast<int>(sizeof(std::uint64_t)))
return R__FAIL("record frame too short");
std::uint16_t vMajor, vMinor;
bytes += DeserializeUInt16(bytes, vMajor);
Copy link
Member

Choose a reason for hiding this comment

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

Should there be a:

if (vMajor > 1)
	throw;

and/or did I misunderstand:

A change in Major version number indicates a breaking, non-forward-compatible change in the schema: readers should
refuse reading an Attribute Set whose Major Schema Version is unknown.

and/or should that statement be weakened?

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.

4 participants