为什么 clickhouse 'DESCRIBE TABLE' returns 4 或 5 列

Why clickhouse 'DESCRIBE TABLE' returns 4 or 5 columns

Clickhouse DESCRIBE TABLE return 有时有五列:

有时没有 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决定了数据结构,它是强制性的,因此没有正确的方法来生成更少的列。