Skip to content

Commit f696a50

Browse files
committed
[NFC][ntuple][spec] 'leaf' field --> 'plain' field
The name 'plain field' should better describe the actual structural role (resp. the absence of a structural role) of these fields. No change to the on-disk data.
1 parent a56f6e3 commit f696a50

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

tree/ntuple/doc/BinaryFormatSpecification.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,16 @@ The field version and type version are used for schema evolution.
374374

375375
The structural role of the field can have one of the following values:
376376

377-
| Value | Structural role |
378-
|----------|--------------------------------------------------------------------------|
379-
| 0x00 | Leaf field in the schema tree |
380-
| 0x01 | The field is the parent of a collection (e.g., a vector) |
381-
| 0x02 | The field is the parent of a record (e.g., a struct) |
382-
| 0x03 | The field is the parent of a variant |
383-
| 0x04 | The field stores objects serialized with the ROOT streamer |
377+
| Value | Structural role |
378+
|----------|---------------------------------------------------------------------------------|
379+
| 0x00 | Plain field in the schema tree that does not carry a particular structural role |
380+
| 0x01 | The field is the parent of a collection (e.g., a vector) |
381+
| 0x02 | The field is the parent of a record (e.g., a struct) |
382+
| 0x03 | The field is the parent of a variant |
383+
| 0x04 | The field stores objects serialized with the ROOT streamer |
384+
385+
A plain field is either a leaf or a "wrapper field" in the schema tree such as the parent field of an enum data field
386+
(see Section "Mapping of C++ Types to Fields and Columns")
384387

385388
The "flags" field can have any of the following bits set:
386389

@@ -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 plain 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 `plain` 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 plain 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 plain 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 plain 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)