Columns

Carbon TypeDescriptionSizenull-ValueBegin MarkerAbstract Type
columnlist of fixed-typed elements3+ bytesnull valuesee belowunsorted-multiset

Encoding

[<column-marker>](num-of-elems)(cap-of-elems) <values>...

Column Types

MarkerContainerDescriptionSizenull-Value
[B]column-booleanthree-valued logic1 B each2
[1]column-u8unsigned 8-bit int1 B each28 - 1
[2]column-u16unsigned 16-bit int2 B each216 - 1
[3]column-u32unsigned 32-bit int4 B each216 - 1
[4]column-u64unsigned 64-bit int8 B each216 - 1
[5]column-i8signed 8-bit int1 B each-27
[6]column-i16signed 16-bit int2 B each-215
[7]column-i32signed 32-bit int4 B each-231
[8]column-i64signed 64-bit int8 B each-263
[R]column-float32-bit float4 B eachNAN value

Table C-1: Carbon column Type Support and Markers

Values

<values>

Capacities

...

Abstract Type

A column is one abstract base type for unsorted-multiset. The other base type is array, see array containers.

Example

JSON snippet

[ -4, 2, null ]

A (compacted) Carbon column-i8.

[5] (3)(3) [-4] [2] [-128]

Record Container Compatibility

Note that a column container cannot replace a record container. If the input Json string is a plain Json array, this array is always stored as record (i.e., an array) rather than a column. To force a column container, the input Json array must be wrapped with an object.

JSON file

[ 1, 2, 3 ]

A (compacted) Carbon record with no primary key encoding the JSON file from above as array container.

[nokey][[] [1][2][3] []]