为什么 clickhouse 'DESCRIBE TABLE' returns 4 或 5 列
Why clickhouse 'DESCRIBE TABLE' returns 4 or 5 columns
Clickhouse DESCRIBE TABLE return 有时有五列:
name
: 字符串
type
: 字符串
default_type
: 字符串
default_expression
: 字符串
comment_expression
: 字符串
有时没有 comment_expression 所以 return 只有四列。
如何解释这种差异?我如何知道在请求之前描述将 return 多少列?
编辑:
clickhouse 的版本高于 19 时有第 6 列 codec_expression
但查询似乎更可预测并且 return 总是六列
Sometimes there is not comment_expression so it returns just four columns.
我强烈认为这是 clickhouse 服务器升级不一致的迹象。 comment_expression 列是在此提交 https://github.com/yandex/ClickHouse/blob/bdcdc15b1eb398bf715e05fb3652a21650bbab68/dbms/src/Interpreters/InterpreterDescribeQuery.cpp#L50 中引入的。 sample block决定了数据结构,它是强制性的,因此没有正确的方法来生成更少的列。
Clickhouse DESCRIBE TABLE return 有时有五列:
name
: 字符串type
: 字符串default_type
: 字符串default_expression
: 字符串comment_expression
: 字符串
有时没有 comment_expression 所以 return 只有四列。
如何解释这种差异?我如何知道在请求之前描述将 return 多少列?
编辑:
clickhouse 的版本高于 19 时有第 6 列 codec_expression
但查询似乎更可预测并且 return 总是六列
Sometimes there is not comment_expression so it returns just four columns.
我强烈认为这是 clickhouse 服务器升级不一致的迹象。 comment_expression 列是在此提交 https://github.com/yandex/ClickHouse/blob/bdcdc15b1eb398bf715e05fb3652a21650bbab68/dbms/src/Interpreters/InterpreterDescribeQuery.cpp#L50 中引入的。 sample block决定了数据结构,它是强制性的,因此没有正确的方法来生成更少的列。