Skip to content

A column slot holds one column of a row-shaped columnar block, see Value modes. A block in value mode 1 has width slots, numbered c from 0. Each slot is a small group of streams, each in a column container type.

Field Encoding Meaning
reference revision 1: absent. Revisions 2 and 3: count(c). Revisions 4 and 5: count(c+1) See reference semantics below
key offset count(65535), only when reference equals c + 1 Offset of the key field, revisions 4 and 5
tags IntCol (n) Row-cell tag per entry (see row format), 8 = absent
ints IntCol, count = number of int and timestamp cells Absent for a key reference
floats FloatCol, count = float cells
bools IntCol, count = bool cells
bytes BytesCol, count = text, bytes and json cells

An ordinary slot stores tags, ints, floats, bools, bytes in that order. A key-reference slot stores the key offset, then tags, floats, bools, bytes, with no ints stream.

  • 0: none. The column stores its own ints.
  • r + 1 with r less than c: the ints of this column are stored as wrapping deltas against the ints of column r. The two columns must have the same int count. Writers only pick a reference when the tag columns are also equal.
  • c + 1: a key reference. Every row’s tag is constant INT (1) or TS (6), and the value equals the 9-byte key field at the stored offset.

Each stream picks its own codec: FOR, PATCHED, DELTA, RLE, integer DICT or CONST for IntCol; RAW, ALP or XOR for FloatCol; PLAIN, DICT, FRONT or FSST for BytesCol. Integers are stored using packed integers. The container types are on Column container types.