v.22.6New Feature

Add New Columnar JSON Formats: JSONColumns, JSONCompactColumns, JSONColumnsWithMetadata

Add new columnar JSON formats: JSONColumns, JSONCompactColumns, JSONColumnsWithMetadata. Closes #36338 Closes #34509. #36975 (Kruglov Pavel).
Introduces new columnar JSON formats: JSONColumns, JSONCompactColumns, and JSONColumnsWithMetadata for more efficient and structured JSON data serialization in ClickHouse.

Why it matters

These new JSON formats provide a column-oriented serialization of data, improving interoperability and performance when exporting data as JSON. They address limitations of traditional row-oriented JSON formats by enabling more compact representations and including metadata where necessary.

How to use it

Users can specify the new JSON formats in their queries or data export commands by setting the output format option to JSONColumns, JSONCompactColumns, or JSONColumnsWithMetadata. For example:

SELECT * FROM table_name FORMAT JSONColumns

This allows exporting query results in the desired columnar JSON format.