You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tree/ntuple/v7/doc/architecture.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -374,6 +374,18 @@ If the buffered sink is used (default), the pages of a cluster are buffered unti
374
374
On committing the cluster, all pages are sealed and sent to a _persistent sink_ in one go (vector write).
375
375
Pages are also reordered to ensure locality of pages of the same column.
376
376
377
+
#### Late model extension
378
+
For fields added to the RNTupleModel after the RNTuple schema has been created (i.e., through `RNTupleWriter::CreateModelUpdater()`), the following steps are taken:
379
+
380
+
1. On calling `RUpdater::BeginUpdate()`, all `REntry` instances belonging to the underlying RNTupleModel are invalidated.
381
+
2. After adding the desired additional fields, calling `RUpdater::CommitUpdate()` will add the relevant fields to the footer's [schema extension record frame](./specifications.md#schema-extensions-record-frame).
382
+
1. The principal columns of top-level fields and record subfields will have a non-zero first element index.
383
+
These columns are referred to as "deferred columns".
384
+
In particular, columns in a subfield tree of collections or variants are _not_ stored as deferred columns (see next point).
385
+
2. All other columns belonging to the added (sub)fields will be written as usual.
386
+
3. `RNTuple(Writer|Model)::CreateEntry()` or `RNTupleModel::CreateBareEntry()` must be used to create an `REntry` matching the new model.
387
+
4. Writing continues as described in steps 2-5 above.
388
+
377
389
### Reading Case
378
390
The reverse process is performed on reading (e.g. `RNTupleReader::LoadEntry()`, `RNTupleView` call operator).
379
391
@@ -389,6 +401,11 @@ The page source can be restricted to a certain entry range.
389
401
This allows for optimizing the page lists that are being read.
390
402
Additionally, it allows for optimizing the cluster pool to not read-ahead beyond the limits.
391
403
404
+
#### Late model extension
405
+
Reading an RNTuple with an extended model is transparent -- i.e., no additional interface calls are required.
406
+
Internally, columns that were created as part of late model extension will have synthesized zero-initialized column ranges for the clusters that were already written before the model was extended.
407
+
In addition, pages made up of 0x00 bytes are synthesized for deferred columns in the clusters that were already (partially) filled before the model was extended.
0 commit comments