Skip to content

Commit b4f1da1

Browse files
committed
[NFC][ntuple][spec] 'leaf' field --> 'static' field
The name 'static field' should better describe the actual structural role of these fields. No change to the on-disk data.
1 parent 795c491 commit b4f1da1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tree/ntuple/doc/BinaryFormatSpecification.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,15 @@ The structural role of the field can have one of the following values:
376376

377377
| Value | Structural role |
378378
|----------|--------------------------------------------------------------------------|
379-
| 0x00 | Leaf field in the schema tree |
379+
| 0x00 | Static field in the schema tree (see below) |
380380
| 0x01 | The field is the parent of a collection (e.g., a vector) |
381381
| 0x02 | The field is the parent of a record (e.g., a struct) |
382382
| 0x03 | The field is the parent of a variant |
383383
| 0x04 | The field stores objects serialized with the ROOT streamer |
384384

385+
A static field is either a leaf or an inner field with exactly one subfield of same cardinality
386+
(modulo field repetition).
387+
385388
The "flags" field can have any of the following bits set:
386389

387390
| Bit | Meaning |
@@ -403,7 +406,7 @@ these columns are alias columns to physical columns attached to the source field
403406
The following restrictions apply on field projections:
404407
- The source field and the target field must have the same structural role,
405408
except for an `RNTupleCardinality` field, which must have a collection field as a source.
406-
- For streamer fields and leaf fields, the type name of the source field and the projected field must be identical.
409+
- For streamer fields and static fields, the type name of the source field and the projected field must be identical.
407410
- Projections involving variants or fixed-size arrays are unsupported.
408411
- Projected fields must be on the same schema path of collection fields as the source field.
409412
For instance, one can project a vector of structs with floats to individual vectors of floats but cannot
@@ -830,7 +833,7 @@ For example, the type name `const pair<size_t, array<class ::Event, 2>>` will be
830833

831834
### Fundamental Types
832835

833-
The following fundamental types are stored as `leaf` fields with a single column each.
836+
The following fundamental types are stored as `static` fields with a single column each.
834837
Fundamental C++ types can potentially be stored in multiple possible column types.
835838
The possible combinations are marked as `W` in the following table.
836839
Additionally, some types allow for reading from certain column types but not to write into them.
@@ -923,7 +926,7 @@ The child fields are named `_0`, `_1`, ...
923926

924927
#### std::bitset\<N\>
925928

926-
A bitset is stored as a repetitive leaf field with an attached `Bit` column.
929+
A bitset is stored as a repetitive static field with an attached `Bit` column.
927930
The bitset size `N` is stored as repetition parameter in the field metadata.
928931
Within the repetition blocks, bits are stored in little-endian order, i.e. the least significant bits come first.
929932

@@ -952,13 +955,13 @@ whose principal column is of type `(Split)Index[64|32]` and a child field of typ
952955

953956
### std::atomic\<T\>
954957

955-
Atomic types are stored as a leaf field with a single subfield named `_0`.
958+
Atomic types are stored as a static field with a single subfield named `_0`.
956959
The parent field has no attached columns.
957960
The subfield corresponds to the inner type `T`.
958961

959962
### User-defined enums
960963

961-
User-defined enums are stored as a leaf field with a single subfield named `_0`.
964+
User-defined enums are stored as a static field with a single subfield named `_0`.
962965
The parent field has no attached columns.
963966
The subfield corresponds to the integer type the underlies the enum.
964967
Unscoped and scoped enums are supported as long as the enum has a dictionary.

0 commit comments

Comments
 (0)