-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[ntuple] rename 'leaf' structural role to 'static' #19502
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,23 +99,28 @@ enum class ENTupleColumnType { | |
kMax, | ||
}; | ||
|
||
/// The fields in the ntuple model tree can carry different structural information about the type system. | ||
/// Leaf fields contain just data, collection fields resolve to offset columns, record fields have no | ||
/// materialization on the primitive column layer. | ||
/// The fields in the RNTuple data model tree can carry different structural information about the type system. | ||
/// Collection fields have an offset column and subfields with arbitrary cardinality, record fields have no | ||
/// materialization on the primitive column layer and an arbitrary number of subfields. Static fields are either | ||
/// leafs (e.g., `float`) or fields with exactly one child that has the same cardinality as the parent | ||
/// (modulo field repetitions, e.g. std::atomic<T>). | ||
Comment on lines
+102
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't 'grasp' the
Can you expand more on the rational of the choice of spelling for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the proper semantic association would be with "static array" (as opposed to dynamic array): something with a size known a-priori There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If/since this is the case I think we do need to extend the name to include this notion of size. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not quite sure how, in this context, the meaning of the C++ static keyword comes to mind. But I'm not clinging to that name. The currently used Concretely, fields of this structural role are either leafs in the schema tree (e.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because a field is akin (and often equal) to a data member and thus it can be easily read as 'static data member' ... |
||
// IMPORTANT: if you add members, remember to change the related `operator<<` below. | ||
enum class ENTupleStructure : std::uint16_t { | ||
kInvalid, | ||
kLeaf, | ||
kStatic, | ||
kCollection, | ||
kRecord, | ||
kVariant, | ||
kStreamer, | ||
kUnknown | ||
kUnknown, | ||
|
||
// for backwards compatibility | ||
kLeaf R__DEPRECATED(6, 40, "use instead ROOT::ENTupleStructure::kStatic") = kStatic | ||
}; | ||
|
||
inline std::ostream &operator<<(std::ostream &os, ENTupleStructure structure) | ||
{ | ||
static const char *const names[] = {"Invalid", "Leaf", "Collection", "Record", "Variant", "Streamer", "Unknown"}; | ||
static const char *const names[] = {"Invalid", "Static", "Collection", "Record", "Variant", "Streamer", "Unknown"}; | ||
static_assert((std::size_t)ENTupleStructure::kUnknown + 1 == std::size(names)); | ||
|
||
if (R__likely(static_cast<std::size_t>(structure) <= std::size(names))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence sounds a bit obscure to me; maybe add an example?