diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index af4fbfbd067..32170b4aec7 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1563,5 +1563,12 @@ ClickHouse supports reading and writing [MessagePack](https://msgpack.org/) data | `uint 32` | [DateTime](../sql-reference/data-types/datetime.md) | | `uint 64` | [DateTime64](../sql-reference/data-types/datetime.md) | | `fixarray`, `array 16`, `array 32`| [Array](../sql-reference/data-types/array.md) | - -Unsupported MsgPack data type: `nil`. +| `nil` | [Nothing](../sql-reference/data-types/special-data-types/nothing.md) | + +Example: + +```sql +CREATE TABLE msgpack (uint8 UInt8, uint16 UInt16, uint32 UInt32, uint64 UInt64, int8 Int8, int16 Int16, int32 Int32, int64 Int64, float Float32, double Float64, string String, date Date, datetime DateTime, datetime64 DateTime64, array Array(UInt32)) ENGINE = Memory; +INSERT INTO msgpack VALUES (255, 65535, 4294967295, 100000000000, -128, -32768, -2147483648, -100000000000, 2.02, 10000.0000001, 'String', 18980, 1639872000, 1639872000000, [1,2,3,4,5]), (4, 1234, 3244467295, 500000000000, -1, -256, -14741221, -7000000000, 100.1, 14321.032141201, 'Another string', 20000, 1839882000, 1639872891123, [5,4,3,2,1]),(42, 42, 42, 42, 42, 42, 42, 42, 42.42, 42.42, '42', 42, 42, 42, [42]); +SELECT * FROM msgpack INTO OUTFILE 'tmp_msgpac_test_all_types.msgpk' FORMAT MsgPack; +``` \ No newline at end of file diff --git a/docs/ru/interfaces/formats.md b/docs/ru/interfaces/formats.md index 6a3c85d6df4..ea57b3ded13 100644 --- a/docs/ru/interfaces/formats.md +++ b/docs/ru/interfaces/formats.md @@ -1477,5 +1477,12 @@ ClickHouse поддерживает запись и чтение из файло | `uint 32` | [DateTime](../sql-reference/data-types/datetime.md) | | `uint 64` | [DateTime64](../sql-reference/data-types/datetime.md) | | `fixarray`, `array 16`, `array 32`| [Array](../sql-reference/data-types/array.md) | - -Неподдерживаемый тип данных: `nil`. \ No newline at end of file +| `nil` | [Nothing](../sql-reference/data-types/special-data-types/nothing.md) | + +Пример: + +```sql +CREATE TABLE msgpack (uint8 UInt8, uint16 UInt16, uint32 UInt32, uint64 UInt64, int8 Int8, int16 Int16, int32 Int32, int64 Int64, float Float32, double Float64, string String, date Date, datetime DateTime, datetime64 DateTime64, array Array(UInt32)) ENGINE = Memory; +INSERT INTO msgpack VALUES (255, 65535, 4294967295, 100000000000, -128, -32768, -2147483648, -100000000000, 2.02, 10000.0000001, 'String', 18980, 1639872000, 1639872000000, [1,2,3,4,5]), (4, 1234, 3244467295, 500000000000, -1, -256, -14741221, -7000000000, 100.1, 14321.032141201, 'Another string', 20000, 1839882000, 1639872891123, [5,4,3,2,1]),(42, 42, 42, 42, 42, 42, 42, 42, 42.42, 42.42, '42', 42, 42, 42, [42]); +SELECT * FROM msgpack INTO OUTFILE 'tmp_msgpac_test_all_types.msgpk' FORMAT MsgPack; +``` \ No newline at end of file diff --git a/docs/tmp_msgpac_test_all_types.msgpk b/docs/tmp_msgpac_test_all_types.msgpk new file mode 100644 index 00000000000..efefdf32a55 Binary files /dev/null and b/docs/tmp_msgpac_test_all_types.msgpk differ