RowBinary

Syntax:

```
QBit(element_type, dimension)
```

Where `element_type` is `Float32`, `Float64`, or `BFloat16`, and `dimension` is the fixed vector dimension.

Wire format: identical to `Array(element_type)`:

```
// LEB128 length
// followed by `length` elements of `element_type`
```

Sample encoding of `QBit(Float32, 4)` containing `[1.0, 2.0, 3.0, 4.0]`:

```
SELECT [1.0, 2.0, 3.0, 4.0]::QBit(Float32, 4)
```

```
0x04,                   // LEB128 - array has 4 elements
0x00, 0x00, 0x80, 0x3F, // 1.0 as Float32
0x00, 0x00, 0x00, 0x40, // 2.0 as Float32
0x00, 0x00, 0x40, 0x40, // 3.0 as Float32
0x00, 0x00, 0x80, 0x40, // 4.0 as Float32
```

## Format settings[​](#format-settings "Direct link to Format settings")

The following settings are common to all `RowBinary` type formats.

|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Setting Description Default|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | [`format_binary_max_string_size`](/docs/operations/settings/formats#format_binary_max_string_size) The maximum allowed size for String in RowBinary format. `1GiB`| [`output_format_binary_encode_types_in_binary_format`](/docs/operations/settings/formats#input_format_binary_decode_types_in_binary_format) Allows to write types in header using [`binary encoding`](/docs/sql-reference/data-types/data-types-binary-encoding) instead of strings with type names in [`RowBinaryWithNamesAndTypes`](/docs/interfaces/formats/RowBinaryWithNamesAndTypes) output format. `false`| [`input_format_binary_decode_types_in_binary_format`](/docs/operations/settings/formats#input_format_binary_decode_types_in_binary_format) Allows to read types in header using [`binary encoding`](/docs/sql-reference/data-types/data-types-binary-encoding) instead of strings with type names in [`RowBinaryWithNamesAndTypes`](/docs/interfaces/formats/RowBinaryWithNamesAndTypes) input format. `false`| [`output_format_binary_write_json_as_string`](/docs/operations/settings/formats#output_format_binary_write_json_as_string) Allows to write values of the [`JSON`](/docs/sql-reference/data-types/newjson) data type as `JSON` [String](/docs/sql-reference/data-types/string) values in [`RowBinary`](/docs/interfaces/formats/RowBinary) output format. `false`| [`input_format_binary_read_json_as_string`](/docs/operations/settings/formats#input_format_binary_read_json_as_string) Allows to read values of the [`JSON`](/docs/sql-reference/data-types/newjson) data type as `JSON` [String](/docs/sql-reference/data-types/string) values in [`RowBinary`](/docs/interfaces/formats/RowBinary) input format. `false` | | | | | | | | | | | | | | | | | |

- [Description](#description)- [Data types wire format](#data-types-wire-format)
    - [Unsigned LEB128 (Little Endian Base 128)](#unsigned-leb128)- [(U)Int8, (U)Int16, (U)Int32, (U)Int64, (U)Int128, (U)Int256](#integer-types)- [Bool](#bool)- [Float32, Float64](#float32-float64)- [BFloat16](#bfloat16)- [Decimal32, Decimal64, Decimal128, Decimal256](#decimal)- [String](#string)- [FixedString](#fixedstring)- [Date](#date)- [Date32](#date32)- [DateTime](#datetime)- [DateTime64](#datetime64)- [Time](#time)- [Time64](#time64)- [Interval types](#interval-types)- [Enum8, Enum16](#enum8-enum16)- [UUID](#uuid)- [IPv4](#ipv4)- [IPv6](#ipv6)- [Nullable](#nullable)- [LowCardinality](#lowcardinality)- [Array](#array)- [Tuple](#tuple)- [Map](#map)- [Variant](#variant)- [Dynamic](#dynamic)- [JSON](#json)- [Geo types](#geo-types)- [Geometry](#geometry)- [Nested](#nested)- [SimpleAggregateFunction](#simpleaggregatefunction)- [AggregateFunction](#aggregatefunction)- [QBit](#qbit)- [Format settings](#format-settings)

Was this page helpful?