Columnar revision 5: typed keys
Columnar revision 5 adds typed keys: a fixed-width key section that splits each key into integer fields (SPEC V730). Its first byte is 5, the highest revision a SEAM 1 build knows.
SEAM 1 writers produce this revision, but only when it pays off.
What it replaces
Section titled “What it replaces”Revision 5 replaces the four key fields of the base layout (shared, suffix, restart offsets and key body) with a typed key section. The timestamps, kinds and values follow as in earlier revisions.
When a writer uses it
Section titled “When a writer uses it”Only in stable columnar files (layer 2 or higher) and only when it is smaller. Both conditions must hold:
- the raw section plus 1 byte per row is at most the front-coded size, and
- zstd level 1 of the whole block plus 1 byte per row is at most the front-coded block and at most 15/16 of it.
Otherwise the writer emits revision 3 or 4.
Reader behaviour
Section titled “Reader behaviour”A reader expands typed keys into the revision 3 layout in memory. A revision 5 block may also carry key references (expand_typed_refs, mod.rs:2383). The column slot reference form is the same as in revision 4, count(c+1).