ClickHouse/tests/queries/0_stateless/02111_json_column_name_encoding.reference
Kevin Michel edbeeaf6ec
Fix invalid JSON in column names
If the column name contains invalid UTF-8 sequences
and the output data types are all considered safe,
then the output will not be sanitized and the generated
JSON will be invalid.

A minimal reproduction case is :
`SELECT length('\x80') FORMAT JSONCompact`
where we auto-generate a non-UTF-8 column name with only
integer outputs, whereas :
`SELECT '\x80' FORMAT JSONCompact`
would be sanitized because the column type is String and
will trigger UTF-8 sanitization over the entire document.
2021-11-20 12:35:41 +01:00

17 lines
113 B
Plaintext
Raw Blame History

{
"meta":
[
{
"name": "length('<27>')",
"type": "UInt64"
}
],
"data":
[
["1"]
],
"rows": 1
}