Value modes
The value mode is a u8 in the columnar block that says how the entry values are stored, right after the kinds column. See the base layout for its position.
| Mode | Meaning |
|---|---|
| 0 | Generic: all values in one BytesCol |
| 1 | Rows: values are in the SQL row format and are split into columns |
Mode 0: generic
Section titled “Mode 0: generic”The values are one BytesCol of n entries, one value per entry in entry order. Nothing is parsed.
Mode 1: row-shaped values
Section titled “Mode 1: row-shaped values”Mode 1 is for values in the SQL row format, see also table rows.
| Field | Encoding | Meaning |
|---|---|---|
| shape | IntCol (n) |
0 = value parsed as a row, 1 = kept raw |
| raw values | BytesCol | The raw-shaped values only, in entry order |
| width | count(1024) |
Maximum cells per row |
| width x column slot | see Column slot | One slot per column |
The product of entries and width is limited: n x width <= 4 194 304. The other limits are on Columnar limits.
Entries whose shape is 1 are kept as raw bytes in the raw values column. Entries whose shape is 0 are split into cells, and the cells of column c go into column slot c, with a tag per entry. A tag of 8 means the entry has no cell in that column.