Key references
A key reference is a column slot whose values are not stored because they equal a 9-byte field inside the key of the same entry. It exists in columnar revisions 4 and 5 (SPEC V714). SEAM 1 writers produce it.
Encoding
Section titled “Encoding”The slot reference field is c + 1, where c is the index of the column itself. The slot then holds:
count(65535): the key offsetoff.- tags, floats, bools and bytes as in an ordinary slot.
- No ints stream.
Every row’s tag in such a column is constant: INT (1) or TS (6).
Value rule
Section titled “Value rule”The value equals the 9-byte key field at off:
key[off]is0x03for INT or0x05for TS, and- the value is
BE u64(key[off+1..off+9]) ^ 2^63.
This is the order-preserving value encoding of an integer or timestamp.
Reader behaviour
Section titled “Reader behaviour”Readers expand key references into the revision 3 layout in memory, filling the ints from the keys. A corrupt reference is Corrupt. In a revision 5 block the keys are first rebuilt from the typed key section (expand_typed_refs, mod.rs:2383).