#pragma once #include namespace DB { /** Binary encoding for Fields: |--------------------------|--------------------------------------------------------------------------------------------------------------------------------| | Field type | Binary encoding | |--------------------------|--------------------------------------------------------------------------------------------------------------------------------| | `Null` | `0x00` | | `UInt64` | `0x01` | | `Int64` | `0x02` | | `UInt128` | `0x03` | | `Int128` | `0x04` | | `UInt128` | `0x05` | | `Int128` | `0x06` | | `Float64` | `0x07` | | `Decimal32` | `0x08` | | `Decimal64` | `0x09` | | `Decimal128` | `0x0A` | | `Decimal256` | `0x0B` | | `String` | `0x0C` | | `Array` | `0x0D...` | | `Tuple` | `0x0E...` | | `Map` | `0x0F...` | | `IPv4` | `0x10` | | `IPv6` | `0x11` | | `UUID` | `0x12` | | `Bool` | `0x13` | | `Object` | `0x14...` | | `AggregateFunctionState` | `0x15` | | `Negative infinity` | `0xFE` | | `Positive infinity` | `0xFF` | |--------------------------|--------------------------------------------------------------------------------------------------------------------------------| */ void encodeField(const Field &, WriteBuffer & buf); Field decodeField(ReadBuffer & buf); }