> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 2019 更新日志

> 2019 年更新日志

<div id="clickhouse-release-v19-17">
  ## ClickHouse 发布 19.17
</div>

<div id="clickhouse-release-v19-17-6-36-2019-12-27">
  ### ClickHouse 发布 19.17.6.36，2019-12-27
</div>

<div id="bug-fix">
  #### 问题修复
</div>

* 修复了 `decompress` 中潜在的缓冲区溢出问题。恶意用户可传入伪造的压缩数据，导致读取越过缓冲区边界。该问题由 Yandex 信息安全团队的 Eldar Zaitov 发现。[#8404](https://github.com/ClickHouse/ClickHouse/pull/8404) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在以下情况下服务器可能崩溃 (`std::terminate`) 的问题：服务器无法以 JSON 或 XML 格式发送或写入包含 String 类型值 (需要进行 UTF-8 校验) 的数据，或者在使用 Brotli 算法压缩结果数据时，以及其他一些罕见情况下。 [#8384](https://github.com/ClickHouse/ClickHouse/pull/8384) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 已修复源自 ClickHouse `VIEW` 的固定字典；现在读取此类字典时不会再报错 `There is no query`。[#8351](https://github.com/ClickHouse/ClickHouse/pull/8351) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了根据 users.xml 中指定的 host\_regexp 检查客户端主机是否被允许时的问题。[#8241](https://github.com/ClickHouse/ClickHouse/pull/8241), [#8342](https://github.com/ClickHouse/ClickHouse/pull/8342) ([Vitaly Baranov](https://github.com/vitlibar))
* `RENAME TABLE` 现在对分布式表会在发送到分片之前，先重命名包含已插入数据的文件夹。这修复了连续重命名 `tableA->tableB`、`tableC->tableA` 时的问题。[#8306](https://github.com/ClickHouse/ClickHouse/pull/8306) ([tavplubix](https://github.com/tavplubix))
* 通过 DDL 查询创建的 `range_hashed` 外部字典现已支持任意数值类型的范围。[#8275](https://github.com/ClickHouse/ClickHouse/pull/8275) ([alesapin](https://github.com/alesapin))
* 修复了 `INSERT INTO table SELECT ... FROM mysql(...)` 表函数中的问题。[#8234](https://github.com/ClickHouse/ClickHouse/pull/8234) ([tavplubix](https://github.com/tavplubix))
* 修复了在向不存在的文件执行 `INSERT INTO TABLE FUNCTION file()` 时发生段错误的问题。现在在这种情况下会先创建文件，然后执行插入操作。[#8177](https://github.com/ClickHouse/ClickHouse/pull/8177) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了对聚合后的 bitmap 和标量 bitmap 进行求交时的 bitmapAnd 错误。[#8082](https://github.com/ClickHouse/ClickHouse/pull/8082) ([Yue Huang](https://github.com/moon03432))
* 修复了在未使用 `TABLE` 或 `DICTIONARY` 限定符的情况下使用 `EXISTS` 查询 (如 `EXISTS t`) 时会导致段错误的问题。[#8213](https://github.com/ClickHouse/ClickHouse/pull/8213) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了函数 `rand` 和 `randConstant` 在参数为 Nullable 时的返回类型。现在这些函数始终返回 `UInt32`，不再返回 `Nullable(UInt32)`。[#8204](https://github.com/ClickHouse/ClickHouse/pull/8204) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 已修复 `DROP DICTIONARY IF EXISTS db.dict`：现在即使 `db` 不存在，也不会抛出异常。[#8185](https://github.com/ClickHouse/ClickHouse/pull/8185) ([Vitaly Baranov](https://github.com/vitlibar))
* 如果某个表因服务器崩溃而未被完全删除，服务器会尝试将其恢复并加载 [#8176](https://github.com/ClickHouse/ClickHouse/pull/8176) ([tavplubix](https://github.com/tavplubix))
* 修复了一个问题：当分片本地表数量超过两个时，针对分布式表的简单 `count` 查询会出错。[#8164](https://github.com/ClickHouse/ClickHouse/pull/8164) ([小路](https://github.com/nicelulu))
* 修复了一个会导致 `DB::BlockStreamProfileInfo::calculateRowsBeforeLimit()` 中发生数据竞争的问题 [#8143](https://github.com/ClickHouse/ClickHouse/pull/8143) ([Alexander Kazakov](https://github.com/Akazz))
* 修复了这样一个问题：在指定的 part 合并完成后立即执行 `ALTER table MOVE part`，可能会移动该指定 part 合并后生成的 part。现在会正确移动指定的 part。[#8104](https://github.com/ClickHouse/ClickHouse/pull/8104) ([Vladimir Chebotarev](https://github.com/excitoon))
* 现在可以将字典的表达式指定为字符串。这对于从非 ClickHouse 数据源提取数据时计算 attribute 很有用，因为这样可以在这些表达式中使用非 ClickHouse 语法。 [#8098](https://github.com/ClickHouse/ClickHouse/pull/8098) ([alesapin](https://github.com/alesapin))
* 修复了 `clickhouse-copier` 中一个极少出现的竞态问题，原因是 ZXid 溢出。[#8088](https://github.com/ClickHouse/ClickHouse/pull/8088) ([Ding Xiang Fei](https://github.com/dingxiangfei2009))
* 修复了一个 bug：当查询失败后 (例如因 "Too many simultaneous queries") ，系统不会读取外部表信息，而后续请求会将这些信息误认为是下一条查询的开头，从而导致类似 `Unknown packet from client` 的错误。 [#8084](https://github.com/ClickHouse/ClickHouse/pull/8084) ([Azat Khuzhin](https://github.com/azat))
* 修复在出现 "Unknown packet X from server" 后发生空指针解引用的问题 [#8071](https://github.com/ClickHouse/ClickHouse/pull/8071) ([Azat Khuzhin](https://github.com/azat))
* 恢复对所有 ICU 区域设置的支持，新增了可对常量表达式应用排序规则的功能，并在 system.collations 表中添加了语言名称。[#8051](https://github.com/ClickHouse/ClickHouse/pull/8051) ([alesapin](https://github.com/alesapin))
* 现在已限制从 `StorageFile` 和 `StorageHDFS` 读取时的流数量，以避免超出内存限制。[#7981](https://github.com/ClickHouse/ClickHouse/pull/7981) ([alesapin](https://github.com/alesapin))
* 修复了对不带键的 `*MergeTree` 表执行 `CHECK TABLE` 查询时的问题。[#7979](https://github.com/ClickHouse/ClickHouse/pull/7979) ([alesapin](https://github.com/alesapin))
* 如果没有变更，则从数据分片名称中去掉变更编号，从而提高了与旧版本的兼容性。 [#8250](https://github.com/ClickHouse/ClickHouse/pull/8250) ([alesapin](https://github.com/alesapin))
* 修复了一个缺陷：某些已附加的 parts 的 data\_version 大于表的变更版本，导致这些 parts 的变更被跳过。[#7812](https://github.com/ClickHouse/ClickHouse/pull/7812) ([Zhichang Yu](https://github.com/yuzhichang))
* 允许在将 parts 移动到另一设备后，即使存在冗余副本也能启动服务器。[#7810](https://github.com/ClickHouse/ClickHouse/pull/7810) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了使用聚合函数列时可能出现的错误："Sizes of columns does not match"。[#7790](https://github.com/ClickHouse/ClickHouse/pull/7790) ([Boris Granveaud](https://github.com/bgranvea))
* 现在，如果同时使用 WITH TIES 和 LIMIT BY，将抛出异常。现在也可以将 TOP 与 LIMIT BY 一起使用。[#7637](https://github.com/ClickHouse/ClickHouse/pull/7637) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))
* 修复了带有 `invalidate_query` 的字典重新加载问题；此前这会导致更新停止，并在先前的更新尝试中引发一些异常。[#8029](https://github.com/ClickHouse/ClickHouse/pull/8029) ([alesapin](https://github.com/alesapin))

<div id="clickhouse-release-v19-17-4-11-2019-11-22">
  ### ClickHouse 发布 19.17.4.11，2019-11-22
</div>

<div id="backward-incompatible-change">
  #### 向后不兼容的更改
</div>

* 为了提升性能，改为使用列而不是 AST 来存储标量子查询结果。19.17 新增了设置 `enable_scalar_subquery_optimization`，且默认启用。这会在从早期版本升级到 19.17.2 或 19.17.3 时导致出现类似[此问题](https://github.com/ClickHouse/ClickHouse/issues/7851)中的错误。为确保能够从 19.16 及更早版本无错误升级，19.17.4 将此设置改为默认禁用。[#7392](https://github.com/ClickHouse/ClickHouse/pull/7392) ([Amos Bird](https://github.com/amosbird))

<div id="new-feature">
  #### 新功能
</div>

* 新增支持使用 DDL 查询创建字典。[#7360](https://github.com/ClickHouse/ClickHouse/pull/7360) ([alesapin](https://github.com/alesapin))
* 使 `bloom_filter` 类型的索引支持 `LowCardinality` 和 `Nullable` [#7363](https://github.com/ClickHouse/ClickHouse/issues/7363) [#7561](https://github.com/ClickHouse/ClickHouse/pull/7561) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 新增函数 `isValidJSON`，用于检查传入的字符串是否为有效的 JSON。[#5910](https://github.com/ClickHouse/ClickHouse/issues/5910) [#7293](https://github.com/ClickHouse/ClickHouse/pull/7293) ([Vdimir](https://github.com/Vdimir))
* 实现 `arrayCompact` 函数 [#7328](https://github.com/ClickHouse/ClickHouse/pull/7328) ([Memo](https://github.com/Joeywzr))
* 新增用于 Decimal 数值的 `hex` 函数。其行为类似于 `hex(reinterpretAsString())`，但不会删除末尾的零字节。[#7355](https://github.com/ClickHouse/ClickHouse/pull/7355) ([Mikhail Korotov](https://github.com/millb))
* 新增 `arrayFill` 和 `arrayReverseFill` 函数，可用数组中前面/后面的其他元素替换元素。[#7380](https://github.com/ClickHouse/ClickHouse/pull/7380) ([hcz](https://github.com/hczhcz))
* 新增对 `CRC32IEEE()`/`CRC64()` 的支持 [#7480](https://github.com/ClickHouse/ClickHouse/pull/7480) ([Azat Khuzhin](https://github.com/azat))
* 实现了与 [mysql](https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char) 中类似的 `char` 函数 [#7486](https://github.com/ClickHouse/ClickHouse/pull/7486) ([sundyli](https://github.com/sundy-li))
* 新增 `bitmapTransform` 函数。它可将 bitmap 中的一组值转换为另一组值，结果为一个新的 bitmap [#7598](https://github.com/ClickHouse/ClickHouse/pull/7598) ([Zhichang Yu](https://github.com/yuzhichang))
* 实现了 `javaHashUTF16LE()` 函数 [#7651](https://github.com/ClickHouse/ClickHouse/pull/7651) ([achimbab](https://github.com/achimbab))
* 为 Distributed engine 新增 `_shard_num` 虚拟列 [#7624](https://github.com/ClickHouse/ClickHouse/pull/7624) ([Azat Khuzhin](https://github.com/azat))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* `MergeTree` 新增对处理器 (新的查询执行流水线) 的支持。[#7181](https://github.com/ClickHouse/ClickHouse/pull/7181) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="bug-fix">
  #### 问题修复
</div>

* 修复 `Values` 中的浮点数解析错误 [#7817](https://github.com/ClickHouse/ClickHouse/issues/7817) [#7870](https://github.com/ClickHouse/ClickHouse/pull/7870) ([tavplubix](https://github.com/tavplubix))
* 修复了在启用 trace\_log 时可能出现的罕见死锁。[#7838](https://github.com/ClickHouse/ClickHouse/pull/7838) ([filimonov](https://github.com/filimonov))
* 当向 Kafka 表写入数据且存在从该表进行 SELECT 的 MV 时，防止消息重复 [#7265](https://github.com/ClickHouse/ClickHouse/pull/7265) ([Ivan](https://github.com/abyss7))
* 支持在 `IN` 中使用 `Array(LowCardinality(Nullable(String)))`。已解决 [#7364](https://github.com/ClickHouse/ClickHouse/issues/7364) [#7366](https://github.com/ClickHouse/ClickHouse/pull/7366) ([achimbab](https://github.com/achimbab))
* 在 ODBC Bridge 中增加对 `SQL_TINYINT` 和 `SQL_BIGINT` 的支持，并修复 `SQL_FLOAT` 数据源类型的处理。[#7491](https://github.com/ClickHouse/ClickHouse/pull/7491) ([Denis Glazachev](https://github.com/traceon))
* 修复空十进制列上的聚合 (`avg` 和分位数) 问题 [#7431](https://github.com/ClickHouse/ClickHouse/pull/7431) ([Andrey Konyaev](https://github.com/akonyaev90))
* 修复了向带有 `MATERIALIZED` 列的 Distributed 表执行 `INSERT` 时的问题 [#7377](https://github.com/ClickHouse/ClickHouse/pull/7377) ([Azat Khuzhin](https://github.com/azat))
* 使 `MOVE PARTITION` 在分区的部分 parts 已位于目标磁盘或卷上时也能正常工作 [#7434](https://github.com/ClickHouse/ClickHouse/pull/7434) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了在多磁盘配置下，`ReplicatedMergeTree` 在变更期间无法创建硬链接的问题。[#7558](https://github.com/ClickHouse/ClickHouse/pull/7558) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了 MergeTree 上变更操作中的一个 bug：当整个分片保持不变，且最佳空间位于另一块磁盘上时，会出现该问题 [#7602](https://github.com/ClickHouse/ClickHouse/pull/7602) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了未能从磁盘配置中读取 `keep_free_space_ratio` 的问题 [#7645](https://github.com/ClickHouse/ClickHouse/pull/7645) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了表仅包含 `Tuple` 列或包含复杂路径的列时出现的错误。修复了 [7541](https://github.com/ClickHouse/ClickHouse/issues/7541)。[#7545](https://github.com/ClickHouse/ClickHouse/pull/7545) ([alesapin](https://github.com/alesapin))
* 在 `max&#95;memory&#95;usage` 限制中不计入 Buffer 引擎的内存 [#7552](https://github.com/ClickHouse/ClickHouse/pull/7552) ([Azat Khuzhin](https://github.com/azat))
* 修复在按 `tuple()` 排序的 `MergeTree` 表中对 final 标记的使用问题。极少数情况下，这会在 SELECT 查询时导致 `Can't adjust last granule` 错误。[#7639](https://github.com/ClickHouse/ClickHouse/pull/7639) ([Anton Popov](https://github.com/CurtizJ))
* 修复了变更中的一个错误：如果谓词中包含需要 Context 的 actions (例如用于 json 的函数) ，可能会导致崩溃或出现异常报错。 [#7664](https://github.com/ClickHouse/ClickHouse/pull/7664) ([alesapin](https://github.com/alesapin))
* 修复了 `data/` 和 `shadow/` 目录中数据库名与表名转义方式不一致的问题 [#7575](https://github.com/ClickHouse/ClickHouse/pull/7575) ([Alexander Burmak](https://github.com/Alex-Burmak))
* 支持在 RIGHT|FULL JOIN 中使用重复键，例如 `ON t.x = u.x AND t.x = u.y`。修复了此情况下的崩溃问题。 [#7586](https://github.com/ClickHouse/ClickHouse/pull/7586) ([Artem Zuikov](https://github.com/4ertus2))
* 修复在使用 RIGHT 或 FULL JOIN 且基于表达式进行连接时出现的 `Not found column <expression> in block` 问题。[#7641](https://github.com/ClickHouse/ClickHouse/pull/7641) ([Artem Zuikov](https://github.com/4ertus2))
* 再次尝试修复 `PrettySpace` 格式中的无限循环问题 [#7591](https://github.com/ClickHouse/ClickHouse/pull/7591) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了 `concat` 函数在所有参数均为相同长度的 `FixedString` 时的缺陷。[#7635](https://github.com/ClickHouse/ClickHouse/pull/7635) ([alesapin](https://github.com/alesapin))
* 修复了在定义 S3、URL 和 HDFS 存储时仅使用 1 个参数会导致异常的问题。[#7618](https://github.com/ClickHouse/ClickHouse/pull/7618) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复带查询的视图中 InterpreterSelectQuery 的作用域问题 [#7601](https://github.com/ClickHouse/ClickHouse/pull/7601) ([Azat Khuzhin](https://github.com/azat))

<div id="improvement">
  #### 改进
</div>

* ODBC-bridge 现已可识别 `Nullable` 列，并能正确处理 NULL 值 [#7402](https://github.com/ClickHouse/ClickHouse/pull/7402) ([Vasily Nemkov](https://github.com/Enmk))
* 以原子方式写入用于分布式发送的当前批次 [#7600](https://github.com/ClickHouse/ClickHouse/pull/7600) ([Azat Khuzhin](https://github.com/azat))
* 如果无法在查询中确定列名对应的表，则抛出异常 [#7358](https://github.com/ClickHouse/ClickHouse/pull/7358) ([Artem Zuikov](https://github.com/4ertus2))
* 为 `MergeTreeSettings` 添加 `merge_max_block_size` 设置 [#7412](https://github.com/ClickHouse/ClickHouse/pull/7412) ([Artem Zuikov](https://github.com/4ertus2))
* 带有 `HAVING` 但不带 `GROUP BY` 的查询会假定按常量分组。因此，`SELECT 1 HAVING 1` 现在会返回结果 [#7496](https://github.com/ClickHouse/ClickHouse/pull/7496) ([Amos Bird](https://github.com/amosbird))
* 支持像 Python 一样将 `(X,)` 解析为元组 [#7501](https://github.com/ClickHouse/ClickHouse/pull/7501), [#7562](https://github.com/ClickHouse/ClickHouse/pull/7562) ([Amos Bird](https://github.com/amosbird))
* 使 `range` 函数的行为几乎与 Python 版本一致 [#7518](https://github.com/ClickHouse/ClickHouse/pull/7518) ([sundyli](https://github.com/sundy-li))
* 为表 `system.settings` 添加 `constraints` 列 [#7553](https://github.com/ClickHouse/ClickHouse/pull/7553) ([Vitaly Baranov](https://github.com/vitlibar))
* 改进 TCP handler 的 Null 格式，因此可以通过 clickhouse-client 使用 `select ignore(<expression>) from table format Null` 进行性能测量 [#7606](https://github.com/ClickHouse/ClickHouse/pull/7606) ([Amos Bird](https://github.com/amosbird))
* 现在可以正确解析诸如 `CREATE TABLE ... AS (SELECT (1, 2))` 这样的查询 [#7542](https://github.com/ClickHouse/ClickHouse/pull/7542) ([hcz](https://github.com/hczhcz))

<div id="performance-improvement">
  #### 性能改进
</div>

* 提升了短字符串键聚合的性能。[#6243](https://github.com/ClickHouse/ClickHouse/pull/6243) ([Alexander Kuzmenkov](https://github.com/akuzm), [Amos Bird](https://github.com/amosbird))
* 在常量谓词折叠后，再进行一轮语法/表达式分析，以获取潜在的优化机会。[#7497](https://github.com/ClickHouse/ClickHouse/pull/7497) ([Amos Bird](https://github.com/amosbird))
* 使用存储元信息来计算简单的 `SELECT count() FROM table;`。[#7510](https://github.com/ClickHouse/ClickHouse/pull/7510) ([Amos Bird](https://github.com/amosbird), [alexey-milovidov](https://github.com/alexey-milovidov))
* 将 `arrayReduce` 的处理向量化，类似于 Aggregator 的 `addBatch`。[#7608](https://github.com/ClickHouse/ClickHouse/pull/7608) ([Amos Bird](https://github.com/amosbird))
* 小幅提升了 `Kafka` 消费的性能。[#7475](https://github.com/ClickHouse/ClickHouse/pull/7475) ([Ivan](https://github.com/abyss7))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增对 AARCH64 CPU 架构交叉编译的支持。重构打包脚本。[#7370](https://github.com/ClickHouse/ClickHouse/pull/7370) [#7539](https://github.com/ClickHouse/ClickHouse/pull/7539) ([Ivan](https://github.com/abyss7))
* 在构建软件包时，将 darwin-x86\_64 和 linux-aarch64 工具链解压到挂载的 Docker 卷中 [#7534](https://github.com/ClickHouse/ClickHouse/pull/7534) ([Ivan](https://github.com/abyss7))
* 更新用于二进制打包器的 Docker 镜像 [#7474](https://github.com/ClickHouse/ClickHouse/pull/7474) ([Ivan](https://github.com/abyss7))
* 修复 macOS Catalina 上的编译错误 [#7585](https://github.com/ClickHouse/ClickHouse/pull/7585) ([Ernest Poletaev](https://github.com/ernestp))
* 对查询分析逻辑进行了一些重构：将复杂类拆分为几个更简单的类。[#7454](https://github.com/ClickHouse/ClickHouse/pull/7454) ([Artem Zuikov](https://github.com/4ertus2))
* 修复无子模块时的构建问题 [#7295](https://github.com/ClickHouse/ClickHouse/pull/7295) ([proller](https://github.com/proller))
* 改进 CMake 文件中的 `add_globs` [#7418](https://github.com/ClickHouse/ClickHouse/pull/7418) ([Amos Bird](https://github.com/amosbird))
* 移除 `unwind` 目标中的硬编码路径 [#7460](https://github.com/ClickHouse/ClickHouse/pull/7460) ([Konstantin Podshumok](https://github.com/podshumok))
* 允许在不使用 SSL 的情况下使用 mysql 格式 [#7524](https://github.com/ClickHouse/ClickHouse/pull/7524) ([proller](https://github.com/proller))

<div id="other">
  #### 其他
</div>

* 新增了 ClickHouse SQL 方言的 ANTLR4 语法 [#7595](https://github.com/ClickHouse/ClickHouse/issues/7595) [#7596](https://github.com/ClickHouse/ClickHouse/pull/7596) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-v19-16">
  ## ClickHouse 发布 19.16
</div>

<div id="clickhouse-release-v19-16-14-65-2020-03-25">
  #### ClickHouse 发布 19.16.14.65，2020-03-25
</div>

* 修复了一个缺陷：对多个参数 (超过 10 个) 进行三元逻辑运算符的批量计算时会出错。[#8718](https://github.com/ClickHouse/ClickHouse/pull/8718) ([Alexander Kazakov](https://github.com/Akazz)) 应 Altinity 的特别请求，此修复已回移到 19.16 版本。

<div id="clickhouse-release-v19-16-14-65-2020-03-05">
  #### ClickHouse 发布 19.16.14.65，2020-03-05
</div>

* 修复了分布式子查询与旧版 ClickHouse 的兼容性问题。修复 [#7851](https://github.com/ClickHouse/ClickHouse/issues/7851)
  [(tabplubix)](https://github.com/tavplubix)
* 在执行 `CREATE` 查询时，会对存储引擎参数中的常量表达式进行折叠。将空数据库名替换为当前数据库。修复 [#6508](https://github.com/ClickHouse/ClickHouse/issues/6508)、[#3492](https://github.com/ClickHouse/ClickHouse/issues/3492)。同时还修复了 `ClickHouseDictionarySource` 中本地地址检查的问题。
  [#9262](https://github.com/ClickHouse/ClickHouse/pull/9262) [(tabplubix)](https://github.com/tavplubix)
* 现在，`*MergeTree` 表引擎家族中的后台合并能够更准确地保留存储策略中的卷顺序。
  [#8549](https://github.com/ClickHouse/ClickHouse/pull/8549) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了极少数情况下 `Kafka` 中数据丢失的问题：在读取 suffix 后、提交前发生异常时可能出现该问题。修复 [#9378](https://github.com/ClickHouse/ClickHouse/issues/9378)。相关：[#7175](https://github.com/ClickHouse/ClickHouse/issues/7175)
  [#9507](https://github.com/ClickHouse/ClickHouse/pull/9507) [(filimonov)](https://github.com/filimonov)
* 修复了一个问题：尝试使用或 drop 以错误参数创建的 `Kafka` 表时，可能导致服务器终止。修复 [#9494](https://github.com/ClickHouse/ClickHouse/issues/9494)。包含 [#9507](https://github.com/ClickHouse/ClickHouse/issues/9507)。
  [#9513](https://github.com/ClickHouse/ClickHouse/pull/9513) [(filimonov)](https://github.com/filimonov)
* 允许在 `Kafka` 表上使用带子查询的 `MaterializedView`。
  [#8197](https://github.com/ClickHouse/ClickHouse/pull/8197) ([filimonov](https://github.com/filimonov))

<div id="new-feature">
  #### 新功能
</div>

* 新增 `deduplicate_blocks_in_dependent_materialized_views` 选项，用于控制对带有 materialized view 的表执行幂等插入时的行为。应 Altinity 的特别要求，这项新功能被加入了这个 bugfix 版本。
  [#9070](https://github.com/ClickHouse/ClickHouse/pull/9070) [(urykhy)](https://github.com/urykhy)

<div id="clickhouse-release-v19-16-2-2-2019-10-30">
  ### ClickHouse 发布 19.16.2.2，2019-10-30
</div>

<div id="backward-incompatible-change">
  #### 向后不兼容的更改
</div>

* 为 count/counIf 补充缺失的参数数量校验。
  [#7095](https://github.com/ClickHouse/ClickHouse/issues/7095)
  [#7298](https://github.com/ClickHouse/ClickHouse/pull/7298) ([Vdimir](https://github.com/Vdimir))
* 移除遗留的 `asterisk_left_columns_only` 设置 (该设置默认已禁用) 。
  [#7335](https://github.com/ClickHouse/ClickHouse/pull/7335) ([Artem
  Zuikov](https://github.com/4ertus2))
* Template 数据格式的格式字符串现在在文件中指定。
  [#7118](https://github.com/ClickHouse/ClickHouse/pull/7118)
  ([tavplubix](https://github.com/tavplubix))

<div id="new-feature">
  #### 新功能
</div>

* 引入 uniqCombined64()，用于计算大于 UINT\_MAX 的基数。
  [#7213](https://github.com/ClickHouse/ClickHouse/pull/7213),
  [#7222](https://github.com/ClickHouse/ClickHouse/pull/7222) ([Azat
  Khuzhin](https://github.com/azat))
* 支持在 Array 列上使用 Bloom filter 索引。
  [#6984](https://github.com/ClickHouse/ClickHouse/pull/6984)
  ([achimbab](https://github.com/achimbab))
* 添加函数 `getMacro(name)`，返回服务器配置中对应 `<macros>`
  的值，类型为 String。 [#7240](https://github.com/ClickHouse/ClickHouse/pull/7240)
  ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为基于 HTTP 来源的字典添加两个配置选项：`credentials` 和
  `http-headers`。 [#7092](https://github.com/ClickHouse/ClickHouse/pull/7092) ([Guillaume
  Tassery](https://github.com/YiuRULE))
* 添加新的 ProfileEvent `Merge`，用于统计已启动的后台合并次数。
  [#7093](https://github.com/ClickHouse/ClickHouse/pull/7093) ([Mikhail
  Korotov](https://github.com/millb))
* 添加 fullHostName 函数，返回完全限定域名。
  [#7263](https://github.com/ClickHouse/ClickHouse/issues/7263)
  [#7291](https://github.com/ClickHouse/ClickHouse/pull/7291) ([sundyli](https://github.com/sundy-li))
* 添加函数 `arraySplit` 和 `arrayReverseSplit`，可按“切分”
  条件拆分数组。它们在处理时间序列时很有用。
  [#7294](https://github.com/ClickHouse/ClickHouse/pull/7294) ([hcz](https://github.com/hczhcz))
* 添加新函数，返回 multiMatch 家族函数中所有匹配索引组成的 Array。
  [#7299](https://github.com/ClickHouse/ClickHouse/pull/7299) ([Danila
  Kutenin](https://github.com/danlark1))
* 添加新的数据库引擎 `Lazy`，针对存储大量小型 -Log
  表进行了优化。 [#7171](https://github.com/ClickHouse/ClickHouse/pull/7171) ([Nikita
  Vasilev](https://github.com/nikvas0))
* 为 bitmap 列添加聚合函数 groupBitmapAnd、-Or、-Xor。 [#7109](https://github.com/ClickHouse/ClickHouse/pull/7109) ([Zhichang
  Yu](https://github.com/yuzhichang))
* 添加聚合函数组合器 -OrNull 和 -OrDefault，当没有可聚合内容时，
  返回 NULL 或默认值。
  [#7331](https://github.com/ClickHouse/ClickHouse/pull/7331)
  ([hcz](https://github.com/hczhcz))
* 引入支持自定义转义和
  分隔符规则的 CustomSeparated 数据格式。 [#7118](https://github.com/ClickHouse/ClickHouse/pull/7118)
  ([tavplubix](https://github.com/tavplubix))
* 支持将 Redis 用作外部字典的来源。 [#4361](https://github.com/ClickHouse/ClickHouse/pull/4361) [#6962](https://github.com/ClickHouse/ClickHouse/pull/6962) ([comunodi](https://github.com/comunodi), [Anton
  Popov](https://github.com/CurtizJ))

<div id="bug-fix">
  #### 问题修复
</div>

* 修复了当查询包含 `WHERE IN (SELECT ...)` 子句并使用 `optimize_read_in_order` 时，查询结果错误的问题。[#7371](https://github.com/ClickHouse/ClickHouse/pull/7371) ([Anton
  Popov](https://github.com/CurtizJ))
* 禁用了 MariaDB 身份验证插件，该插件依赖项目外部的文件。
  [#7140](https://github.com/ClickHouse/ClickHouse/pull/7140) ([Yuriy
  Baranov](https://github.com/yurriy))
* 修复了异常 `Cannot convert column ... because it is constant but values of constants are different in source and result`，该问题在使用函数 `now()`, `today()`,
  `yesterday()`, `randConstant()` 时极少发生。
  [#7156](https://github.com/ClickHouse/ClickHouse/pull/7156) ([Nikolai
  Kochetov](https://github.com/KochetovNicolai))
* 修复了将 HTTP Keep-Alive 超时误用为 TCP Keep-Alive 超时的问题。
  [#7351](https://github.com/ClickHouse/ClickHouse/pull/7351) ([Vasily
  Nemkov](https://github.com/Enmk))
* 修复了 groupBitmapOr 中的段错误 (问题 [#7109](https://github.com/ClickHouse/ClickHouse/issues/7109)) 。
  [#7289](https://github.com/ClickHouse/ClickHouse/pull/7289) ([Zhichang
  Yu](https://github.com/yuzhichang))
* 对于 materialized view，Kafka 的提交会在所有数据写入完成后才执行。
  [#7175](https://github.com/ClickHouse/ClickHouse/pull/7175) ([Ivan](https://github.com/abyss7))
* 修复了 `system.part_log` 表中错误的 `duration_ms` 值。此前该值偏差了十倍。
  [#7172](https://github.com/ClickHouse/ClickHouse/pull/7172) ([Vladimir
  Chebotarev](https://github.com/excitoon))
* 快速修复了 LIVE VIEW 表中的崩溃问题，并重新启用了所有 LIVE VIEW 测试。
  [#7201](https://github.com/ClickHouse/ClickHouse/pull/7201)
  ([vzakaznikov](https://github.com/vzakaznikov))
* 正确序列化 MergeTree parts 的最小/最大索引中的 NULL 值。
  [#7234](https://github.com/ClickHouse/ClickHouse/pull/7234) ([Alexander
  Kuzmenkov](https://github.com/akuzm))
* 修复了当表通过 `CREATE TABLE AS` 创建时，将虚拟列写入 .sql 元数据的问题。
  [#7183](https://github.com/ClickHouse/ClickHouse/pull/7183) ([Ivan](https://github.com/abyss7))
* 修复了 `ATTACH PART` 查询中的段错误。
  [#7185](https://github.com/ClickHouse/ClickHouse/pull/7185)
  ([alesapin](https://github.com/alesapin))
* 修复了由于对空 IN 子查询和空
  INNER/RIGHT JOIN 的优化而导致的部分查询结果错误问题。[#7284](https://github.com/ClickHouse/ClickHouse/pull/7284) ([Nikolai
  Kochetov](https://github.com/KochetovNicolai))
* 修复了 LIVE VIEW `getHeader()` 方法中的 AddressSanitizer 报错。
  [#7271](https://github.com/ClickHouse/ClickHouse/pull/7271)
  ([vzakaznikov](https://github.com/vzakaznikov))

<div id="improvement">
  #### 改进
</div>

* 在发生 queue\_wait\_max\_ms 等待时添加提示消息。
  [#7390](https://github.com/ClickHouse/ClickHouse/pull/7390) ([Azat
  Khuzhin](https://github.com/azat))
* 将设置 `s3_min_upload_part_size` 设为表级。
  [#7059](https://github.com/ClickHouse/ClickHouse/pull/7059) ([Vladimir
  Chebotarev](https://github.com/excitoon))
* 在 StorageFactory 中检查生存时间 (TTL)。 [#7304](https://github.com/ClickHouse/ClickHouse/pull/7304)
  ([sundyli](https://github.com/sundy-li))
* 在 partial merge join 中合并左侧块 (优化) 。
  [#7122](https://github.com/ClickHouse/ClickHouse/pull/7122) ([Artem
  Zuikov](https://github.com/4ertus2))
* 不允许在 Replicated 表引擎的变更中使用非确定性函数，因为这
  可能会导致各副本之间出现不一致。
  [#7247](https://github.com/ClickHouse/ClickHouse/pull/7247) ([Alexander
  Kazakov](https://github.com/Akazz))
* 在将异常堆栈跟踪转换为字符串时禁用内存跟踪器。这可以防止服务端丢失
  `Memory limit exceeded` 类型的错误消息，而该错误会导致客户端出现 `Attempt to read after eof` 异常。 [#7264](https://github.com/ClickHouse/ClickHouse/pull/7264)
  ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 杂项格式改进。解决了
  [#6033](https://github.com/ClickHouse/ClickHouse/issues/6033),
  [#2633](https://github.com/ClickHouse/ClickHouse/issues/2633),
  [#6611](https://github.com/ClickHouse/ClickHouse/issues/6611),
  [#6742](https://github.com/ClickHouse/ClickHouse/issues/6742)
  [#7215](https://github.com/ClickHouse/ClickHouse/pull/7215)
  ([tavplubix](https://github.com/tavplubix))
* ClickHouse 会忽略 IN 运算符右侧无法转换为左侧
  类型的值。现已使其对复合类型 (Array 和 Tuple) 也能正常工作。
  [#7283](https://github.com/ClickHouse/ClickHouse/pull/7283) ([Alexander
  Kuzmenkov](https://github.com/akuzm))
* 为 ASOF JOIN 支持缺失的不等式。现在可以在 ON 语法中，对 ASOF 列使用小于等于变体，以及严格大于和严格小于
  变体进行连接。
  [#7282](https://github.com/ClickHouse/ClickHouse/pull/7282) ([Artem
  Zuikov](https://github.com/4ertus2))
* 优化 partial merge join。 [#7070](https://github.com/ClickHouse/ClickHouse/pull/7070)
  ([Artem Zuikov](https://github.com/4ertus2))
* 使 uniqCombined 函数的内存占用不超过 98K。
  [#7236](https://github.com/ClickHouse/ClickHouse/pull/7236),
  [#7270](https://github.com/ClickHouse/ClickHouse/pull/7270) ([Azat
  Khuzhin](https://github.com/azat))
* 在 PartialMergeJoin 中将右侧连接表的 parts 刷写到磁盘 (如果内存不足
  ) 。需要时再将数据加载回来。 [#7186](https://github.com/ClickHouse/ClickHouse/pull/7186)
  ([Artem Zuikov](https://github.com/4ertus2))

<div id="performance-improvement">
  #### 性能改进
</div>

* 通过避免数据重复拷贝，加快带有常量参数的 joinGet。
  [#7359](https://github.com/ClickHouse/ClickHouse/pull/7359) ([Amos
  Bird](https://github.com/amosbird))
* 若子查询为空，则提前返回。
  [#7007](https://github.com/ClickHouse/ClickHouse/pull/7007) ([小路](https://github.com/nicelulu))
* 优化 Values 中 SQL 表达式的解析。
  [#6781](https://github.com/ClickHouse/ClickHouse/pull/6781)
  ([tavplubix](https://github.com/tavplubix))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 为适配 Mac OS 交叉编译，禁用了部分 contrib。
  [#7101](https://github.com/ClickHouse/ClickHouse/pull/7101) ([Ivan](https://github.com/abyss7))
* 为 clickhouse\_common\_io 补上缺失的 PocoXML 链接。
  [#7200](https://github.com/ClickHouse/ClickHouse/pull/7200) ([Azat
  Khuzhin](https://github.com/azat))
* clickhouse-test 现支持多个测试过滤器参数。
  [#7226](https://github.com/ClickHouse/ClickHouse/pull/7226) ([Alexander
  Kuzmenkov](https://github.com/akuzm))
* 为 ARM 平台启用 musl 和 jemalloc。[#7300](https://github.com/ClickHouse/ClickHouse/pull/7300)
  ([Amos Bird](https://github.com/amosbird))
* 为 `clickhouse-test` 新增了 `--client-option` 参数，用于向客户端传递额外参数。
  [#7277](https://github.com/ClickHouse/ClickHouse/pull/7277) ([Nikolai
  Kochetov](https://github.com/KochetovNicolai))
* 升级 rpm 软件包时保留现有配置。
  [#7103](https://github.com/ClickHouse/ClickHouse/pull/7103)
  ([filimonov](https://github.com/filimonov))
* 修复 PVS 检测到的错误。[#7153](https://github.com/ClickHouse/ClickHouse/pull/7153) ([Artem
  Zuikov](https://github.com/4ertus2))
* 修复 Darwin 平台的构建问题。[#7149](https://github.com/ClickHouse/ClickHouse/pull/7149)
  ([Ivan](https://github.com/abyss7))
* 支持 glibc 2.29。[#7142](https://github.com/ClickHouse/ClickHouse/pull/7142) ([Amos
  Bird](https://github.com/amosbird))
* 确保 dh\_clean 不会处理可能的源文件。
  [#7205](https://github.com/ClickHouse/ClickHouse/pull/7205) ([Amos
  Bird](https://github.com/amosbird))
* 尽量避免从 altinity rpm 更新时发生冲突——其配置文件是在
  clickhouse-server-common 中单独打包的。[#7073](https://github.com/ClickHouse/ClickHouse/pull/7073)
  ([filimonov](https://github.com/filimonov))
* 优化了一些头文件，以加快重新构建。
  [#7212](https://github.com/ClickHouse/ClickHouse/pull/7212),
  [#7231](https://github.com/ClickHouse/ClickHouse/pull/7231) ([Alexander
  Kuzmenkov](https://github.com/akuzm))
* 新增 Date 和 DateTime 的性能测试。[#7332](https://github.com/ClickHouse/ClickHouse/pull/7332) ([Vasily
  Nemkov](https://github.com/Enmk))
* 修复了一些包含非确定性变更操作的测试。
  [#7132](https://github.com/ClickHouse/ClickHouse/pull/7132) ([Alexander
  Kazakov](https://github.com/Akazz))
* 在 CI 中添加了使用 MemorySanitizer 的构建。[#7066](https://github.com/ClickHouse/ClickHouse/pull/7066)
  ([Alexander Kuzmenkov](https://github.com/akuzm))
* 避免在 MetricsTransmitter 中使用未初始化的值。
  [#7158](https://github.com/ClickHouse/ClickHouse/pull/7158) ([Azat
  Khuzhin](https://github.com/azat))
* 修复了 MemorySanitizer 在 Fields 中发现的一些问题。
  [#7135](https://github.com/ClickHouse/ClickHouse/pull/7135),
  [#7179](https://github.com/ClickHouse/ClickHouse/pull/7179) ([Alexander
  Kuzmenkov](https://github.com/akuzm)), [#7376](https://github.com/ClickHouse/ClickHouse/pull/7376)
  ([Amos Bird](https://github.com/amosbird))
* 修复 murmurhash32 中的未定义行为。[#7388](https://github.com/ClickHouse/ClickHouse/pull/7388) ([Amos
  Bird](https://github.com/amosbird))
* 修复了 StoragesInfoStream 中的未定义行为。[#7384](https://github.com/ClickHouse/ClickHouse/pull/7384)
  ([tavplubix](https://github.com/tavplubix))
* 修复了外部数据库引擎 (MySQL、ODBC、JDBC) 的常量表达式折叠问题。在之前的
  版本中，该功能对多个常量表达式无法生效，对 Date、
  DateTime 和 UUID 则完全无效。此修复解决了 [#7245](https://github.com/ClickHouse/ClickHouse/issues/7245)
  [#7252](https://github.com/ClickHouse/ClickHouse/pull/7252)
  ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 LIVE VIEW 在访问 no\_users\_thread 变量时触发的 ThreadSanitizer 数据竞争错误。
  [#7353](https://github.com/ClickHouse/ClickHouse/pull/7353)
  ([vzakaznikov](https://github.com/vzakaznikov))
* 移除 libcommon 中的 malloc 符号
  [#7134](https://github.com/ClickHouse/ClickHouse/pull/7134),
  [#7065](https://github.com/ClickHouse/ClickHouse/pull/7065) ([Amos
  Bird](https://github.com/amosbird))
* 新增全局标志 ENABLE\_LIBRARIES，用于禁用所有库。
  [#7063](https://github.com/ClickHouse/ClickHouse/pull/7063)
  ([proller](https://github.com/proller))

<div id="code-cleanup">
  #### 代码清理
</div>

* 将配置仓库通用化，为字典 DDL 做准备。[#7155](https://github.com/ClickHouse/ClickHouse/pull/7155)
  ([alesapin](https://github.com/alesapin))
* 用于字典 DDL 且不带任何语义分析的解析器。
  [#7209](https://github.com/ClickHouse/ClickHouse/pull/7209)
  ([alesapin](https://github.com/alesapin))
* 将 ParserCreateQuery 拆分为多个更小的解析器。
  [#7253](https://github.com/ClickHouse/ClickHouse/pull/7253)
  ([alesapin](https://github.com/alesapin))
* 对外部字典相关的一些代码进行了小幅重构和重命名。
  [#7111](https://github.com/ClickHouse/ClickHouse/pull/7111)
  ([alesapin](https://github.com/alesapin))
* 重构部分代码，为基于角色的访问控制做准备。[#7235](https://github.com/ClickHouse/ClickHouse/pull/7235) ([Vitaly
  Baranov](https://github.com/vitlibar))
* 对 DatabaseOrdinary 代码做了一些改进。
  [#7086](https://github.com/ClickHouse/ClickHouse/pull/7086) ([Nikita
  Vasilev](https://github.com/nikvas0))
* 在哈希表的 find() 和 emplace() 方法中不使用迭代器。
  [#7026](https://github.com/ClickHouse/ClickHouse/pull/7026) ([Alexander
  Kuzmenkov](https://github.com/akuzm))
* 修复了 parameter root 非空时 getMultipleValuesFromConfig 的问题。[#7374](https://github.com/ClickHouse/ClickHouse/pull/7374)
  ([Mikhail Korotov](https://github.com/millb))
* 移除一些重复代码 (TemporaryFile 和 TemporaryFileStream)
  [#7166](https://github.com/ClickHouse/ClickHouse/pull/7166) ([Artem
  Zuikov](https://github.com/4ertus2))
* 略微提升了代码可读性 (`MergeTreeData::getActiveContainingPart`) 。
  [#7361](https://github.com/ClickHouse/ClickHouse/pull/7361) ([Vladimir
  Chebotarev](https://github.com/excitoon))
* 如果 `ThreadPool::schedule(...)` 抛出
  异常，则等待所有使用本地对象的已调度作业完成。将 `ThreadPool::schedule(...)` 重命名为 `ThreadPool::scheduleOrThrowOnError(...)`，并
  修改注释，以明确说明它可能会抛出异常。
  [#7350](https://github.com/ClickHouse/ClickHouse/pull/7350)
  ([tavplubix](https://github.com/tavplubix))

<div id="clickhouse-release-19-15">
  ## ClickHouse 发布 19.15
</div>

<div id="clickhouse-release-19-15-4-10-2019-10-31">
  ### ClickHouse 发布 19.15.4.10，2019-10-31
</div>

<div id="bug-fix">
  #### 问题修复
</div>

* 在 ODBC Bridge 中新增了对 SQL\_TINYINT 和 SQL\_BIGINT 的处理，并修复了 SQL\_FLOAT 数据源类型的处理问题。
  [#7491](https://github.com/ClickHouse/ClickHouse/pull/7491) ([Denis Glazachev](https://github.com/traceon))
* 在 MOVE PARTITION 中，允许部分 parts 已位于目标磁盘或卷上。
  [#7434](https://github.com/ClickHouse/ClickHouse/pull/7434) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复了通过 ODBC-bridge 处理 Nullable 列中的 NULL 值的问题。
  [#7402](https://github.com/ClickHouse/ClickHouse/pull/7402) ([Vasily Nemkov](https://github.com/Enmk))
* 修复了向 Distributed 的非本地节点执行 INSERT 且包含 MATERIALIZED 列时的问题。
  [#7377](https://github.com/ClickHouse/ClickHouse/pull/7377) ([Azat Khuzhin](https://github.com/azat))
* 修复了函数 getMultipleValuesFromConfig。
  [#7374](https://github.com/ClickHouse/ClickHouse/pull/7374) ([Mikhail Korotov](https://github.com/millb))
* 修复了误用 HTTP Keep-Alive timeout 而非 TCP Keep-Alive timeout 的问题。
  [#7351](https://github.com/ClickHouse/ClickHouse/pull/7351) ([Vasily Nemkov](https://github.com/Enmk))
* 发生异常时会等待所有作业完成 (修复了罕见的段错误) 。
  [#7350](https://github.com/ClickHouse/ClickHouse/pull/7350) ([tavplubix](https://github.com/tavplubix))
* 向 Kafka 表插入数据时，不再向 MVs 推送。
  [#7265](https://github.com/ClickHouse/ClickHouse/pull/7265) ([Ivan](https://github.com/abyss7))
* 为异常堆栈禁用 memory tracker。
  [#7264](https://github.com/ClickHouse/ClickHouse/pull/7264) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了为外部数据库转换查询时的错误代码。
  [#7252](https://github.com/ClickHouse/ClickHouse/pull/7252) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 避免在 MetricsTransmitter 中使用未初始化的值。
  [#7158](https://github.com/ClickHouse/ClickHouse/pull/7158) ([Azat Khuzhin](https://github.com/azat))
* 为测试添加了带宏的示例配置 ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-15-3-6-2019-10-09">
  ### ClickHouse 发行版 19.15.3.6，2019-10-09
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了哈希字典中的 bad\_variant 问题。
  ([alesapin](https://github.com/alesapin))
* 修复了 ATTACH PART 查询中的段错误。
  ([alesapin](https://github.com/alesapin))
* 修复了 `MergeTreeData` 中的时间计算问题。
  ([Vladimir Chebotarev](https://github.com/excitoon))
* 在写入完成后，显式向 Kafka 提交。
  [#7175](https://github.com/ClickHouse/ClickHouse/pull/7175) ([Ivan](https://github.com/abyss7))
* 正确序列化 MergeTree parts 的 min/max 索引中的 NULL 值。
  [#7234](https://github.com/ClickHouse/ClickHouse/pull/7234) ([Alexander Kuzmenkov](https://github.com/akuzm))

<div id="clickhouse-release-19-15-2-2-2019-10-01">
  ### ClickHouse 发行版 19.15.2.2，2019-10-01
</div>

<div id="new-feature">
  #### 新功能
</div>

* 分层存储：支持为使用 MergeTree 引擎的表使用多个存储卷。可以将新数据存储在 SSD 上，并自动将旧数据迁移到 HDD。[#4918](https://github.com/ClickHouse/ClickHouse/pull/4918) ([Igr](https://github.com/ObjatieGroba)) [#6489](https://github.com/ClickHouse/ClickHouse/pull/6489) ([alesapin](https://github.com/alesapin))
* 添加表函数 `input`，用于在 `INSERT SELECT` 查询中读取传入数据。[#5450](https://github.com/ClickHouse/ClickHouse/pull/5450) ([palasonic1](https://github.com/palasonic1)) [#6832](https://github.com/ClickHouse/ClickHouse/pull/6832) ([Anton Popov](https://github.com/CurtizJ))
* 添加 `sparse_hashed` 字典布局，其功能上等同于 `hashed` 布局，但更节省内存。它大约只占用一半内存，但代价是值检索速度更慢。[#6894](https://github.com/ClickHouse/ClickHouse/pull/6894) ([Azat Khuzhin](https://github.com/azat))
* 实现了可为访问字典定义用户列表的能力。仅供当前已连接的数据库使用。[#6907](https://github.com/ClickHouse/ClickHouse/pull/6907) ([Guillaume Tassery](https://github.com/YiuRULE))
* 为 `SHOW` 查询添加 `LIMIT` 选项。[#6944](https://github.com/ClickHouse/ClickHouse/pull/6944) ([Philipp Malkovsky](https://github.com/malkfilipp))
* 添加 `bitmapSubsetLimit(bitmap, range_start, limit)` 函数，返回集合中不小于 `range_start` 的最小 `limit` 个值组成的子集。[#6957](https://github.com/ClickHouse/ClickHouse/pull/6957) ([Zhichang Yu](https://github.com/yuzhichang))
* 添加 `bitmapMin` 和 `bitmapMax` 函数。[#6970](https://github.com/ClickHouse/ClickHouse/pull/6970) ([Zhichang Yu](https://github.com/yuzhichang))
* 添加与 [issue-6648](https://github.com/ClickHouse/ClickHouse/issues/6648) 相关的 `repeat` 函数。[#6999](https://github.com/ClickHouse/ClickHouse/pull/6999) ([flynn](https://github.com/ucasFL))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 实现了一种在内存中执行且不会改变当前管道的 Merge Join 变体。结果将按 merge key 部分有序。将 `partial_merge_join = 1` 设为使用此功能。Merge Join 仍在开发中。[#6940](https://github.com/ClickHouse/ClickHouse/pull/6940) ([Artem Zuikov](https://github.com/4ertus2))
* 添加了 `S3` 引擎和表函数。该功能仍在开发中 (尚不支持身份验证) 。[#5596](https://github.com/ClickHouse/ClickHouse/pull/5596) ([Vladimir Chebotarev](https://github.com/excitoon))

<div id="improvement">
  #### 改进
</div>

* 从 Kafka 读取的每条消息都会以原子方式插入。这解决了 Kafka 引擎几乎所有已知问题。[#6950](https://github.com/ClickHouse/ClickHouse/pull/6950) ([Ivan](https://github.com/abyss7))
* 改进了 Distributed 查询的故障转移机制。缩短了恢复时间，且现在可进行配置，并可在 `system.clusters` 中查看。[#6399](https://github.com/ClickHouse/ClickHouse/pull/6399) ([Vasily Nemkov](https://github.com/Enmk))
* 支持在 `IN` 子句中直接使用枚举的数值。#6766 [#6941](https://github.com/ClickHouse/ClickHouse/pull/6941) ([dimarub2000](https://github.com/dimarub2000))
* URL 存储现支持重定向 (可选，默认禁用) 。[#6914](https://github.com/ClickHouse/ClickHouse/pull/6914) ([maqroll](https://github.com/maqroll))
* 当旧版本客户端连接到服务器时，添加提示信息。[#6893](https://github.com/ClickHouse/ClickHouse/pull/6893) ([Philipp Malkovsky](https://github.com/malkfilipp))
* 移除了分布式表发送数据时 backoff 最大休眠时间的限制 [#6895](https://github.com/ClickHouse/ClickHouse/pull/6895) ([Azat Khuzhin](https://github.com/azat))
* 新增了向 Graphite 发送累积值形式的 profile events (计数器) 的功能。可在服务器的 `config.xml` 中通过 `<events_cumulative>` 启用。[#6969](https://github.com/ClickHouse/ClickHouse/pull/6969) ([Azat Khuzhin](https://github.com/azat))
* 新增功能：通过 HTTP 以 Native 格式向类型为 `LowCardinality(T)` 的列插入数据时，会自动将类型 `T` 转换为 `LowCardinality(T)`。[#6891](https://github.com/ClickHouse/ClickHouse/pull/6891) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 新增功能：对 `Float32`、`Float64` 使用函数 `hex` 时，无需再使用 `reinterpretAsString`。[#7024](https://github.com/ClickHouse/ClickHouse/pull/7024) ([Mikhail Korotov](https://github.com/millb))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 为带有调试信息的 `clickhouse` 二进制文件添加 gdb-index。这将加快 `gdb` 的启动速度。[#6947](https://github.com/ClickHouse/ClickHouse/pull/6947) ([alesapin](https://github.com/alesapin))
* 使用打过补丁并采用 `pigz` 的 dpkg-deb，加快 deb 打包速度。[#6960](https://github.com/ClickHouse/ClickHouse/pull/6960) ([alesapin](https://github.com/alesapin))
* 设置 `enable_fuzzing = 1`，以启用对整个项目代码的 libfuzzer 插桩。[#7042](https://github.com/ClickHouse/ClickHouse/pull/7042) ([kyprizel](https://github.com/kyprizel))
* 在 CI 中添加拆分构建的冒烟测试。[#7061](https://github.com/ClickHouse/ClickHouse/pull/7061) ([alesapin](https://github.com/alesapin))
* 在 CI 中添加启用 MemorySanitizer 的构建。[#7066](https://github.com/ClickHouse/ClickHouse/pull/7066) ([Alexander Kuzmenkov](https://github.com/akuzm))
* 将 `libsparsehash` 替换为 `sparsehash-c11` [#6965](https://github.com/ClickHouse/ClickHouse/pull/6965) ([Azat Khuzhin](https://github.com/azat))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了在大型表上对复杂键进行索引分析时出现的性能下降问题。此修复解决了 #6924。[#7075](https://github.com/ClickHouse/ClickHouse/pull/7075) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从 Kafka 空 topic 中查询时因逻辑错误导致的段错误。[#6909](https://github.com/ClickHouse/ClickHouse/pull/6909) ([Ivan](https://github.com/abyss7))
* 修复了 `MySQLBlockInputStream.cpp` 中 MySQL 连接过早关闭的问题。[#6882](https://github.com/ClickHouse/ClickHouse/pull/6882) ([Clément Rodriguez](https://github.com/clemrodriguez))
* 恢复了对非常旧的 Linux 内核的支持 (修复了 [#6841](https://github.com/ClickHouse/ClickHouse/issues/6841)) [#6853](https://github.com/ClickHouse/ClickHouse/pull/6853) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在输入流中出现空块时，`insert select` 查询可能造成数据丢失的问题。#6834 #6862 [#6911](https://github.com/ClickHouse/ClickHouse/pull/6911) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了函数 `АrrayEnumerateUniqRanked` 在参数中包含空数组时的问题 [#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller))
* 修复了包含 array join 和全局子查询的复杂查询。[#6934](https://github.com/ClickHouse/ClickHouse/pull/6934) ([Ivan](https://github.com/abyss7))
* 修复了在包含多个 JOIN 的 ORDER BY 和 GROUP BY 中出现 `Unknown identifier` 错误的问题 [#7022](https://github.com/ClickHouse/ClickHouse/pull/7022) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了执行带有 `LowCardinality` 参数的函数时出现的 `MSan` 警告。[#7062](https://github.com/ClickHouse/ClickHouse/pull/7062) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="backward-incompatible-change-2">
  #### 不向后兼容的变更
</div>

* 为提升性能，更改了 bitmap\* aggregate function 状态的 serialization format。无法读取旧版本中序列化的 bitmap\* 状态。[#6908](https://github.com/ClickHouse/ClickHouse/pull/6908) ([Zhichang Yu](https://github.com/yuzhichang))

<div id="clickhouse-release-19-14">
  ## ClickHouse 发行版 19.14
</div>

<div id="clickhouse-release-19-14-7-15-2019-10-02">
  ### ClickHouse 发行版 19.14.7.15，2019-10-02
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本还包含 19.11.12.69 中的所有问题修复。
* 修复了 19.14 与更早版本之间的分布式查询兼容性问题。此修复解决了 [#7068](https://github.com/ClickHouse/ClickHouse/issues/7068)。[#7069](https://github.com/ClickHouse/ClickHouse/pull/7069) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-14-6-12-2019-09-19">
  ### ClickHouse 发行版 19.14.6.12，2019-09-19
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了函数 `АrrayEnumerateUniqRanked` 在参数包含空数组时的问题。[#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller))
* 修复了带有 `ARRAY JOIN` 以及使用别名的 `GLOBAL IN subquery` 的查询中子查询名称的问题。如果指定了子查询别名，则使用该别名作为外部表名称。[#6934](https://github.com/ClickHouse/ClickHouse/pull/6934) ([Ivan](https://github.com/abyss7))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 将不稳定的 flapping 测试 `00715_fetch_merged_or_mutated_part_zookeeper` 重写为 shell 脚本，修复了该问题，因为它需要等待变更生效。 [#6977](https://github.com/ClickHouse/ClickHouse/pull/6977) ([Alexander Kazakov](https://github.com/Akazz))
* 修复了函数 `groupUniqArray` 在空 Array 参数下触发的 UBSan 和 MemSan 失败。原因是空的 `PaddedPODArray` 被放入了哈希表的零单元中，因为零单元值的构造函数未被调用。 [#6937](https://github.com/ClickHouse/ClickHouse/pull/6937) ([Amos Bird](https://github.com/amosbird))

<div id="clickhouse-release-19-14-3-3-2019-09-10">
  ### ClickHouse 发行版 19.14.3.3，2019-09-10
</div>

<div id="new-feature">
  #### 新功能
</div>

* `ORDER BY` 的 `WITH FILL` 修饰符。 (续 [#5069](https://github.com/ClickHouse/ClickHouse/issues/5069)) [#6610](https://github.com/ClickHouse/ClickHouse/pull/6610) ([Anton Popov](https://github.com/CurtizJ))
* `LIMIT` 的 `WITH TIES` 修饰符。 (延续 [#5069](https://github.com/ClickHouse/ClickHouse/issues/5069))  [#6610](https://github.com/ClickHouse/ClickHouse/pull/6610) ([Anton Popov](https://github.com/CurtizJ))
* 将未加引号的 `NULL` 字面量解析为 NULL (如果设置了 `format_csv_unquoted_null_literal_as_null=1`) 。如果该字段的数据类型不是 Nullable，则将空字段初始化为默认值 (如果设置了 `input_format_null_as_default=1`) 。[#5990](https://github.com/ClickHouse/ClickHouse/issues/5990) [#6055](https://github.com/ClickHouse/ClickHouse/pull/6055) ([tavplubix](https://github.com/tavplubix))
* 表函数 `file` 和 `hdfs` 的路径现已支持通配符。如果路径中包含通配符，则该表为只读。用法示例：`select * from hdfs('hdfs://hdfs1:9000/some_dir/another_dir/*/file{0..9}{0..9}')` 和 `select * from file('some_dir/{some_file,another_file,yet_another}.tsv', 'TSV', 'value UInt32')`。[#6092](https://github.com/ClickHouse/ClickHouse/pull/6092) ([Olga Khvostikova](https://github.com/stavrolia))
* 新增 `system.metric_log` 表，用于以指定的时间间隔存储 `system.events` 和 `system.metrics` 的值。[#6363](https://github.com/ClickHouse/ClickHouse/issues/6363) [#6467](https://github.com/ClickHouse/ClickHouse/pull/6467) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) [#6530](https://github.com/ClickHouse/ClickHouse/pull/6530) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 支持将 ClickHouse 文本日志写入 `system.text_log` 表。 [#6037](https://github.com/ClickHouse/ClickHouse/issues/6037) [#6103](https://github.com/ClickHouse/ClickHouse/pull/6103) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) [#6164](https://github.com/ClickHouse/ClickHouse/pull/6164) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在堆栈跟踪中显示私有符号 (这是通过解析 ELF 文件的符号表实现的) 。如果存在调试信息，则会在堆栈跟踪中增加文件名和行号信息。通过为程序中的符号建立索引，加快了符号名称查找。新增了用于内部信息的 SQL 函数：`demangle` 和 `addressToLine`。为保持一致性，将函数 `symbolizeAddress` 重命名为 `addressToSymbol`。出于性能考虑，函数 `addressToSymbol` 将返回修饰名，你需要再调用 `demangle`。新增设置 `allow_introspection_functions`，默认关闭。[#6201](https://github.com/ClickHouse/ClickHouse/pull/6201) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 表函数 `values` (名称不区分大小写) 。它允许从 [#5984](https://github.com/ClickHouse/ClickHouse/issues/5984) 中提出的 `VALUES` 列表中读取数据。示例：`SELECT * FROM VALUES('a UInt64, s String', (1, 'one'), (2, 'two'), (3, 'three'))`。[#6217](https://github.com/ClickHouse/ClickHouse/issues/6217)。[#6209](https://github.com/ClickHouse/ClickHouse/pull/6209) ([dimarub2000](https://github.com/dimarub2000))
* 新增了修改存储设置的能力。语法：`ALTER TABLE <table> MODIFY SETTING <setting> = <value>`。[#6366](https://github.com/ClickHouse/ClickHouse/pull/6366) [#6669](https://github.com/ClickHouse/ClickHouse/pull/6669) [#6685](https://github.com/ClickHouse/ClickHouse/pull/6685) ([alesapin](https://github.com/alesapin))
* 支持删除 detached parts。语法：`ALTER TABLE <table_name> DROP DETACHED PART '<part_id>'`。 [#6158](https://github.com/ClickHouse/ClickHouse/pull/6158) ([tavplubix](https://github.com/tavplubix))
* 表约束。允许在表定义中添加约束，并在插入时进行检查。[#5273](https://github.com/ClickHouse/ClickHouse/pull/5273) ([Gleb Novikov](https://github.com/NanoBjorn)) [#6652](https://github.com/ClickHouse/ClickHouse/pull/6652) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增对级联 materialized view 的支持。[#6324](https://github.com/ClickHouse/ClickHouse/pull/6324) ([Amos Bird](https://github.com/amosbird))
* 默认开启查询分析器，每秒对每个查询执行线程采样一次。[#6283](https://github.com/ClickHouse/ClickHouse/pull/6283) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 输入格式 `ORC`。 [#6454](https://github.com/ClickHouse/ClickHouse/pull/6454) [#6703](https://github.com/ClickHouse/ClickHouse/pull/6703) ([akonyaev90](https://github.com/akonyaev90))
* 新增了两个函数：`sigmoid` 和 `tanh` (对机器学习应用很有帮助) 。[#6254](https://github.com/ClickHouse/ClickHouse/pull/6254) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 函数 `hasToken(haystack, token)`、`hasTokenCaseInsensitive(haystack, token)` 用于检查给定的标记是否存在于 haystack 中。标记是指由两个非 ASCII 字母数字字符 (或 haystack 的边界) 分隔的最长子串。标记必须是常量字符串。支持 tokenbf\_v1 索引特化。[#6596](https://github.com/ClickHouse/ClickHouse/pull/6596), [#6662](https://github.com/ClickHouse/ClickHouse/pull/6662) ([Vasily Nemkov](https://github.com/Enmk))
* 新函数 `neighbor(value, offset[, default_value])`。允许在数据块内访问某列中的前一个/后一个值。[#5925](https://github.com/ClickHouse/ClickHouse/pull/5925) ([Alex Krash](https://github.com/alex-krash)) [6685365ab8c5b74f9650492c88a012596eb1b0c6](https://github.com/ClickHouse/ClickHouse/commit/6685365ab8c5b74f9650492c88a012596eb1b0c6) [341e2e4587a18065c2da1ca888c73389f48ce36c](https://github.com/ClickHouse/ClickHouse/commit/341e2e4587a18065c2da1ca888c73389f48ce36c) [Alexey Milovidov](https://github.com/alexey-milovidov)
* 创建了函数 `currentUser()`，返回已获授权用户的登录名。为兼容 MySQL，新增了别名 `user()`。[#6470](https://github.com/ClickHouse/ClickHouse/pull/6470) ([Alex Krash](https://github.com/alex-krash))
* 新增聚合函数 `quantilesExactInclusive` 和 `quantilesExactExclusive`，它们在 [#5885](https://github.com/ClickHouse/ClickHouse/issues/5885) 中提出。[#6477](https://github.com/ClickHouse/ClickHouse/pull/6477) ([dimarub2000](https://github.com/dimarub2000))
* 函数 `bitmapRange(bitmap, range_begin, range_end)`，返回包含指定范围的新集合 (不包含 `range_end`) 。[#6314](https://github.com/ClickHouse/ClickHouse/pull/6314) ([Zhichang Yu](https://github.com/yuzhichang))
* 函数 `geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision)`，用于创建一个由长度为 precision 的字符串组成的数组，这些字符串表示覆盖给定区域的 geohash 方框。[#6127](https://github.com/ClickHouse/ClickHouse/pull/6127) ([Vasily Nemkov](https://github.com/Enmk))
* 为 `Kafka` 表增加对 INSERT 查询的支持。[#6012](https://github.com/ClickHouse/ClickHouse/pull/6012) ([Ivan](https://github.com/abyss7))
* Kafka 引擎现已支持 `_partition` 和 `_timestamp` 虚拟列。[#6400](https://github.com/ClickHouse/ClickHouse/pull/6400) ([Ivan](https://github.com/abyss7))
* 支持使用基于正则表达式的规则，从 `query_log`、服务器日志和进程列表中移除敏感数据。[#5710](https://github.com/ClickHouse/ClickHouse/pull/5710) ([filimonov](https://github.com/filimonov))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 输入和输出数据格式 `Template`。它允许为输入和输出指定自定义格式字符串。[#4354](https://github.com/ClickHouse/ClickHouse/issues/4354) [#6727](https://github.com/ClickHouse/ClickHouse/pull/6727) ([tavplubix](https://github.com/tavplubix))
* 实现了 `LIVE VIEW` 表，这一功能最初在 [#2898](https://github.com/ClickHouse/ClickHouse/pull/2898) 中提出，在 [#3925](https://github.com/ClickHouse/ClickHouse/issues/3925) 中完成准备，随后又在 [#5541](https://github.com/ClickHouse/ClickHouse/issues/5541) 中更新。详细说明请参见 [#5541](https://github.com/ClickHouse/ClickHouse/issues/5541)。[#5541](https://github.com/ClickHouse/ClickHouse/issues/5541) ([vzakaznikov](https://github.com/vzakaznikov)) [#6425](https://github.com/ClickHouse/ClickHouse/pull/6425) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) [#6656](https://github.com/ClickHouse/ClickHouse/pull/6656) ([vzakaznikov](https://github.com/vzakaznikov)) 请注意，`LIVE VIEW` 功能可能会在后续版本中移除。

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本还包含了 19.13 和 19.11 版本中的所有缺陷修复。
* 修复了表包含跳数索引且发生垂直合并时出现的段错误。[#6723](https://github.com/ClickHouse/ClickHouse/pull/6723) ([alesapin](https://github.com/alesapin))
* 修复了带有非简单列默认值的按列生存时间 (TTL) 问题。此前，在使用 `OPTIMIZE ... FINAL` 查询强制执行 TTL merge 时，过期值会被替换为类型默认值，而不是用户指定的列默认值。[#6796](https://github.com/ClickHouse/ClickHouse/pull/6796) ([Anton Popov](https://github.com/CurtizJ))
* 修复服务器正常重启时 Kafka 消息重复的问题。[#6597](https://github.com/ClickHouse/ClickHouse/pull/6597) ([Ivan](https://github.com/abyss7))
* 修复了读取 Kafka 消息时出现的无限循环。订阅时完全不要暂停/恢复消费者，否则在某些场景下它可能会被无限期暂停。[#6354](https://github.com/ClickHouse/ClickHouse/pull/6354) ([Ivan](https://github.com/abyss7))
* 修复 `bitmapContains` 函数中出现的 `Key expression contains comparison between inconvertible types` 异常。[#6136](https://github.com/ClickHouse/ClickHouse/issues/6136) [#6146](https://github.com/ClickHouse/ClickHouse/issues/6146) [#6156](https://github.com/ClickHouse/ClickHouse/pull/6156) ([dimarub2000](https://github.com/dimarub2000))
* 修复了启用 `optimize_skip_unused_shards` 且缺少分片键时的段错误。[#6384](https://github.com/ClickHouse/ClickHouse/pull/6384) ([Anton Popov](https://github.com/CurtizJ))
* 修复了变更中的错误代码，该问题可能导致内存损坏。修复了读取地址 `0x14c0` 时发生的段错误，该问题可能由并发执行 `DROP TABLE` 以及从 `system.parts` 或 `system.parts_columns` 进行 `SELECT` 引起。修复了在准备变更查询时的竞态条件。修复了对复制表执行 `OPTIMIZE` 以及并发修改操作 (如 `ALTER`) 导致的死锁。 [#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 移除了 MySQL 接口中的额外详细日志 [#6389](https://github.com/ClickHouse/ClickHouse/pull/6389) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 恢复了在配置文件中将 'true' 和 'false' 解析为布尔型设置值的能力。[#6278](https://github.com/ClickHouse/ClickHouse/pull/6278) ([alesapin](https://github.com/alesapin))
* 修复 `quantile` 和 `median` 函数处理 `Nullable(Decimal128)` 时的崩溃问题。[#6378](https://github.com/ClickHouse/ClickHouse/pull/6378) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了一个可能导致结果不完整的问题：当 `SELECT` 查询的 `WHERE` 条件基于主键且包含向 Float 类型的转换时，返回结果可能不完整。该问题是由于 `toFloat` 函数中的单调性检查不正确导致的。[#6248](https://github.com/ClickHouse/ClickHouse/issues/6248) [#6374](https://github.com/ClickHouse/ClickHouse/pull/6374) ([dimarub2000](https://github.com/dimarub2000))
* 检查变更的 `max_expanded_ast_elements` 设置。在 `TRUNCATE TABLE` 后清除变更。[#6205](https://github.com/ClickHouse/ClickHouse/pull/6205) ([Winter Zhang](https://github.com/zhang2014))
* 修复了在使用 `join_use_nulls` 时键列的 JOIN 结果。使用 NULL 值而不是列默认值。[#6249](https://github.com/ClickHouse/ClickHouse/pull/6249) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了垂直合并和 ALTER 操作中的跳过索引问题。修复了 `Bad size of marks file` 异常。[#6594](https://github.com/ClickHouse/ClickHouse/issues/6594) [#6713](https://github.com/ClickHouse/ClickHouse/pull/6713) ([alesapin](https://github.com/alesapin))
* 修复了在 `ALTER MODIFY COLUMN` 和垂直合并过程中，当被合并或修改的 parts 之一为空 (0 行) 时偶发的崩溃问题 [#6746](https://github.com/ClickHouse/ClickHouse/issues/6746) [#6780](https://github.com/ClickHouse/ClickHouse/pull/6780) ([alesapin](https://github.com/alesapin))
* 修复了 `AggregateFunctionFactory` 中 `LowCardinality` 类型转换的问题。此修复解决了 [#6257](https://github.com/ClickHouse/ClickHouse/issues/6257)。[#6281](https://github.com/ClickHouse/ClickHouse/pull/6281) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了聚合函数 `topK` 和 `topKWeighted` 的异常行为，以及可能导致段错误的问题。[#6404](https://github.com/ClickHouse/ClickHouse/pull/6404) ([Anton Popov](https://github.com/CurtizJ))
* 修复了与 `getIdentifier` 函数相关的不安全代码。[#6401](https://github.com/ClickHouse/ClickHouse/issues/6401) [#6409](https://github.com/ClickHouse/ClickHouse/pull/6409) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 MySQL wire 协议中的一个问题 (从 MySQL 客户端连接到 ClickHouse 时会使用该协议) 。该问题是由 `PacketPayloadWriteBuffer` 中的堆缓冲区溢出引起的。[#6212](https://github.com/ClickHouse/ClickHouse/pull/6212) ([Yuriy Baranov](https://github.com/yurriy))
* 修复了 `bitmapSubsetInRange` 函数的内存泄漏问题。[#6819](https://github.com/ClickHouse/ClickHouse/pull/6819) ([Zhichang Yu](https://github.com/yuzhichang))
* 修复了在更改粒度后执行变更时出现的一个罕见 bug。[#6816](https://github.com/ClickHouse/ClickHouse/pull/6816) ([alesapin](https://github.com/alesapin))
* 默认允许带有所有字段的 protobuf 消息。 [#6132](https://github.com/ClickHouse/ClickHouse/pull/6132) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了 `nullIf` 函数的一个缺陷：当第二个参数传入 `NULL` 时会出现该问题。[#6446](https://github.com/ClickHouse/ClickHouse/pull/6446) ([Guillaume Tassery](https://github.com/YiuRULE))
* 修复了一个罕见问题：在包含 String 字段的复合键缓存字典中，错误的内存分配/释放会导致内存占用无限增长 (看起来像内存泄漏) 。当字符串大小为从 8 开始的 2 的幂 (8、16、32 等) 时，该问题会复现。[#6447](https://github.com/ClickHouse/ClickHouse/pull/6447) ([alesapin](https://github.com/alesapin))
* 修复了 Gorilla 编码在短序列上的问题，该问题会导致异常 `Cannot write after end of buffer`。[#6398](https://github.com/ClickHouse/ClickHouse/issues/6398) [#6444](https://github.com/ClickHouse/ClickHouse/pull/6444) ([Vasily Nemkov](https://github.com/Enmk))
* 允许在启用 `join_use_nulls` 的情况下，在 JOIN 中使用非 Nullable 类型。[#6705](https://github.com/ClickHouse/ClickHouse/pull/6705) ([Artem Zuikov](https://github.com/4ertus2))
* 禁用 `clickhouse-client` 中查询内的 `Poco::AbstractConfiguration` 替换。 [#6706](https://github.com/ClickHouse/ClickHouse/pull/6706) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 `REPLACE PARTITION` 中的死锁问题。[#6677](https://github.com/ClickHouse/ClickHouse/pull/6677) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 对常量参数使用 `arrayReduce` 可能会导致段错误。[#6242](https://github.com/ClickHouse/ClickHouse/issues/6242) [#6326](https://github.com/ClickHouse/ClickHouse/pull/6326) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在执行 `DROP PARTITION` 后恢复副本时可能出现的 parts 不一致问题。[#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix))
* 修复了 `JSONExtractRaw` 函数卡住的问题。[#6195](https://github.com/ClickHouse/ClickHouse/issues/6195) [#6198](https://github.com/ClickHouse/ClickHouse/pull/6198) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 skip 索引序列化不正确以及自适应粒度下的聚合问题。[#6594](https://github.com/ClickHouse/ClickHouse/issues/6594)。[#6748](https://github.com/ClickHouse/ClickHouse/pull/6748) ([alesapin](https://github.com/alesapin))
* 修复了在两级聚合情况下，`GROUP BY` 的 `WITH ROLLUP` 和 `WITH CUBE` 修饰符相关问题。[#6225](https://github.com/ClickHouse/ClickHouse/pull/6225) ([Anton Popov](https://github.com/CurtizJ))
* 修复了在自适应粒度下写入二级索引标记时的错误。 [#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alesapin](https://github.com/alesapin))
* 修复 server 启动期间的初始化顺序问题。由于 `StorageMergeTree::background_task_handle` 是在 `startup()` 中初始化的，`MergeTreeBlockOutputStream::write()` 可能会在它初始化之前就尝试使用它。只需检查它是否已经初始化即可。[#6080](https://github.com/ClickHouse/ClickHouse/pull/6080) ([Ivan](https://github.com/abyss7))
* 清除上一次因错误结束的读取操作遗留的数据缓冲区。[#6026](https://github.com/ClickHouse/ClickHouse/pull/6026) ([Nikolay](https://github.com/bopohaa))
* 修复了为 Replicated\*MergeTree 表创建新副本时无法启用自适应粒度的问题。[#6394](https://github.com/ClickHouse/ClickHouse/issues/6394) [#6452](https://github.com/ClickHouse/ClickHouse/pull/6452) ([alesapin](https://github.com/alesapin))
* 修复了服务器启动期间的一处潜在崩溃问题：如果在访问未初始化的 `ThreadStatus` 结构时触发异常，且异常处理过程中 `libunwind` 又发生异常，可能会导致崩溃。[#6456](https://github.com/ClickHouse/ClickHouse/pull/6456) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))
* 修复 `yandexConsistentHash` 函数中的崩溃问题。通过模糊测试发现。[#6304](https://github.com/ClickHouse/ClickHouse/issues/6304) [#6305](https://github.com/ClickHouse/ClickHouse/pull/6305) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了当服务器过载且全局线程池接近满载时，查询可能挂起的问题。该问题在拥有大量分片 (数百个) 的集群中更容易发生，因为分布式查询会为到每个分片的每个连接分配一个线程。例如，如果一个包含 330 个分片的集群正在处理 30 个并发分布式查询，就可能复现此问题。该问题影响自 19.2 起的所有版本。[#6301](https://github.com/ClickHouse/ClickHouse/pull/6301) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `arrayEnumerateUniqRanked` 函数的逻辑问题。[#6423](https://github.com/ClickHouse/ClickHouse/pull/6423) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了解码符号表时发生的段错误。[#6603](https://github.com/ClickHouse/ClickHouse/pull/6603) ([Amos Bird](https://github.com/amosbird))
* 修复了在将 `LowCardinality(Nullable)` 转换为非 `Nullable` 列时，即使其中不包含 NULL 值也会抛出无关异常的问题 (例如在 `SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String)` 这样的查询中) 。 [#6094](https://github.com/ClickHouse/ClickHouse/issues/6094) [#6119](https://github.com/ClickHouse/ClickHouse/pull/6119) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 移除了 `system.settings` 表中 description 的多余引号。[#6696](https://github.com/ClickHouse/ClickHouse/issues/6696) [#6699](https://github.com/ClickHouse/ClickHouse/pull/6699) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 避免在 Replicated 表上执行 `TRUNCATE` 时可能出现的死锁。[#6695](https://github.com/ClickHouse/ClickHouse/pull/6695) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了按 sorting key 顺序读取的问题。[#6189](https://github.com/ClickHouse/ClickHouse/pull/6189) ([Anton Popov](https://github.com/CurtizJ))
* 修复了在 `enable_mixed_granularity_parts=1` 的表上执行 `ALTER TABLE ... UPDATE` 查询时的问题。[#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin))
* 修复了由 [#4405](https://github.com/ClickHouse/ClickHouse/pull/4405) 引入的 bug (自 19.4.0 起) 。在查询基于 MergeTree 表的分布式表且未查询任何列 (`SELECT 1`) 时可复现。 [#6236](https://github.com/ClickHouse/ClickHouse/pull/6236) ([alesapin](https://github.com/alesapin))
* 修复了有符号类型与无符号类型相除时整数除法中的溢出问题。此前的行为与 C 或 C++ 语言完全一致 (遵循整数提升规则) ，这可能会让人感到意外。请注意，当较大的有符号数除以较大的无符号数，或反过来时，仍然可能发生溢出 (不过这种情况较为少见) 。该问题存在于所有 server 版本中。[#6214](https://github.com/ClickHouse/ClickHouse/issues/6214) [#6233](https://github.com/ClickHouse/ClickHouse/pull/6233) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 设置了 `max_execution_speed` 或 `max_execution_speed_bytes` 时，限制限流的最长休眠时间。修复了误报错误的问题，例如 `Estimated query execution time (inf seconds) is too long`。[#5547](https://github.com/ClickHouse/ClickHouse/issues/5547) [#6232](https://github.com/ClickHouse/ClickHouse/pull/6232) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `MaterializedView` 中使用 `MATERIALIZED` 列和别名时的相关问题。[#448](https://github.com/ClickHouse/ClickHouse/issues/448) [#3484](https://github.com/ClickHouse/ClickHouse/issues/3484) [#3450](https://github.com/ClickHouse/ClickHouse/issues/3450) [#2878](https://github.com/ClickHouse/ClickHouse/issues/2878) [#2285](https://github.com/ClickHouse/ClickHouse/issues/2285) [#3796](https://github.com/ClickHouse/ClickHouse/pull/3796) ([Amos Bird](https://github.com/amosbird)) [#6316](https://github.com/ClickHouse/ClickHouse/pull/6316) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 `FormatFactory` 在处理未实现为处理器的输入流时的行为问题。[#6495](https://github.com/ClickHouse/ClickHouse/pull/6495) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了拼写错误。[#6631](https://github.com/ClickHouse/ClickHouse/pull/6631) ([Alex Ryndin](https://github.com/alexryndin))
* 修正错误消息中的拼写错误 (is -> are) 。[#6839](https://github.com/ClickHouse/ClickHouse/pull/6839) ([Denis Zhuravlev](https://github.com/den-crane))
* 修复了从字符串解析列列表时，若类型中包含逗号会导致报错的问题 (该问题与 `File`、`URL` 和 `HDFS` 存储有关) [#6217](https://github.com/ClickHouse/ClickHouse/issues/6217)。[#6209](https://github.com/ClickHouse/ClickHouse/pull/6209) ([dimarub2000](https://github.com/dimarub2000))

<div id="security-fix">
  #### 安全修复
</div>

* 此版本还包含了 19.13 和 19.11 中的所有安全修复。
* 修复了特制查询可能因 SQL 解析器中的栈溢出导致服务器崩溃的问题。还修复了 Merge 和 Distributed 表、materialized view 以及涉及子查询的行级安全条件中可能发生栈溢出的问题。[#6433](https://github.com/ClickHouse/ClickHouse/pull/6433) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="improvement">
  #### 改进
</div>

* 正确实现 `AND/OR` 的三值逻辑。[#6048](https://github.com/ClickHouse/ClickHouse/pull/6048) ([Alexander Kazakov](https://github.com/Akazz))
* 现在，对于不含 TTL 信息或 TTL 信息已过期的旧 parts，在执行 `OPTIMIZE ... FINAL` 查询后，已过期生存时间 (TTL) 的值和行将被移除，例如在执行 `ALTER ... MODIFY TTL` 查询之后。新增了查询 `SYSTEM STOP/START TTL MERGES`，用于禁止/允许分配带 TTL 的合并，并在所有合并中过滤掉已过期的值。[#6274](https://github.com/ClickHouse/ClickHouse/pull/6274) ([Anton Popov](https://github.com/CurtizJ))
* 支持通过 `CLICKHOUSE_HISTORY_FILE` 环境变量更改客户端使用的 ClickHouse 历史记录文件位置。[#6840](https://github.com/ClickHouse/ClickHouse/pull/6840) ([filimonov](https://github.com/filimonov))
* 从 `InterpreterSelectQuery` 中移除 `dry_run` 标记。 ... [#6375](https://github.com/ClickHouse/ClickHouse/pull/6375) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 支持在 `ASOF JOIN` 中使用 `ON` 子句。[#6211](https://github.com/ClickHouse/ClickHouse/pull/6211) ([Artem Zuikov](https://github.com/4ertus2))
* 增强了跳过索引对变更和复制的支持。支持 `MATERIALIZE/CLEAR INDEX ... IN PARTITION` 查询。`UPDATE x = x` 会重新计算所有使用列 `x` 的索引。[#5053](https://github.com/ClickHouse/ClickHouse/pull/5053) ([Nikita Vasilev](https://github.com/nikvas0))
* 允许 `ATTACH` live views (例如在服务器启动时) ，而不受 `allow_experimental_live_view` 设置影响。[#6754](https://github.com/ClickHouse/ClickHouse/pull/6754) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 对于由 query profiler 收集的堆栈跟踪，不应包含 query profiler 自身生成的堆栈帧。[#6250](https://github.com/ClickHouse/ClickHouse/pull/6250) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 现在，表函数 `values`、`file`、`url` 和 `hdfs` 已支持 ALIAS 列。[#6255](https://github.com/ClickHouse/ClickHouse/pull/6255) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 如果 `config.d` 文件与配置文件的根元素不对应，则抛出异常。[#6123](https://github.com/ClickHouse/ClickHouse/pull/6123) ([dimarub2000](https://github.com/dimarub2000))
* 在 `no space left on device` 异常消息中输出更多信息。[#6182](https://github.com/ClickHouse/ClickHouse/issues/6182), [#6252](https://github.com/ClickHouse/ClickHouse/issues/6252) [#6352](https://github.com/ClickHouse/ClickHouse/pull/6352) ([tavplubix](https://github.com/tavplubix))
* 在确定读查询 (当 `optimize_skip_unused_shards` = 1 时) 需要访问哪些 `Distributed` 表分片时，ClickHouse 现在会同时检查 SELECT 语句中 `prewhere` 和 `where` 子句的条件。[#6521](https://github.com/ClickHouse/ClickHouse/pull/6521) ([Alexander Kazakov](https://github.com/Akazz))
* 为不支持 AVX2、但支持 SSE 4.2 和 PCLMUL 指令集的机器启用了 `SIMDJSON`。[#6285](https://github.com/ClickHouse/ClickHouse/issues/6285) [#6320](https://github.com/ClickHouse/ClickHouse/pull/6320) ([alexey-milovidov](https://github.com/alexey-milovidov))
* ClickHouse 可在无需额外调优的情况下运行于不支持 `O_DIRECT` 的文件系统 (如 ZFS 和 BtrFS) 上。[#4449](https://github.com/ClickHouse/ClickHouse/issues/4449) [#6730](https://github.com/ClickHouse/ClickHouse/pull/6730) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 支持将谓词下推到 FINAL 子查询中。[#6120](https://github.com/ClickHouse/ClickHouse/pull/6120) ([TCeason](https://github.com/TCeason)) [#6162](https://github.com/ClickHouse/ClickHouse/pull/6162) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 改进了 `JOIN ON` 键的提取 [#6131](https://github.com/ClickHouse/ClickHouse/pull/6131) ([Artem Zuikov](https://github.com/4ertus2))
* 已更新 `SIMDJSON`。[#6285](https://github.com/ClickHouse/ClickHouse/issues/6285)。[#6306](https://github.com/ClickHouse/ClickHouse/pull/6306) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 优化 `SELECT count()` 查询时最小列的选择。[#6344](https://github.com/ClickHouse/ClickHouse/pull/6344) ([Amos Bird](https://github.com/amosbird))
* 在 `windowFunnel()` 中新增了 `strict` 参数。设置 `strict` 后，`windowFunnel()` 仅对唯一值应用条件。[#6548](https://github.com/ClickHouse/ClickHouse/pull/6548) ([achimbab](https://github.com/achimbab))
* 更安全的 `mysqlxx::Pool` 接口。[#6150](https://github.com/ClickHouse/ClickHouse/pull/6150) ([avasiliev](https://github.com/avasiliev))
* 执行 `--help` 选项时，选项行宽现在会自动适配终端大小。[#6590](https://github.com/ClickHouse/ClickHouse/pull/6590) ([dimarub2000](https://github.com/dimarub2000))
* 为无键聚合禁用“按顺序读取”优化。[#6599](https://github.com/ClickHouse/ClickHouse/pull/6599) ([Anton Popov](https://github.com/CurtizJ))
* `INCORRECT_DATA` 和 `TYPE_MISMATCH` 错误代码对应的 HTTP 状态码已从默认的 `500 Internal Server Error` 调整为 `400 Bad Request`。[#6271](https://github.com/ClickHouse/ClickHouse/pull/6271) ([Alexander Rodin](https://github.com/a-rodin))
* 将 Join 对象从 `ExpressionAction` 移至 `AnalyzedJoin`。`ExpressionAnalyzer` 和 `ExpressionAction` 不再感知 `Join` 类。其逻辑由 `AnalyzedJoin` 接口封装。[#6801](https://github.com/ClickHouse/ClickHouse/pull/6801) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了一个可能导致分布式查询死锁的问题：当某个分片为 localhost，但查询是通过网络连接发送时。[#6759](https://github.com/ClickHouse/ClickHouse/pull/6759) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 调整了多个表 `RENAME` 的语义，以避免可能出现的死锁。[#6757](https://github.com/ClickHouse/ClickHouse/issues/6757)。[#6756](https://github.com/ClickHouse/ClickHouse/pull/6756) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 重写了 MySQL 兼容性 server，避免将整个数据包载荷加载到内存中。将每个 connection 的内存占用降至约 `2 * DBMS_DEFAULT_BUFFER_SIZE` (读/写缓冲区) 。[#5811](https://github.com/ClickHouse/ClickHouse/pull/5811) ([Yuriy Baranov](https://github.com/yurriy))
* 将 AST 别名解释逻辑移出解析器，因为解析器无需了解任何查询语义。[#6108](https://github.com/ClickHouse/ClickHouse/pull/6108) ([Artem Zuikov](https://github.com/4ertus2))
* `NamesAndTypesList` 的解析更加安全了一些。[#6408](https://github.com/ClickHouse/ClickHouse/issues/6408)。[#6410](https://github.com/ClickHouse/ClickHouse/pull/6410) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `clickhouse-copier`：允许在检查分区是否存在的查询中，使用配置中的 `where_condition`，并配合 `partition_key` 别名 (此前它仅用于读取数据的查询) 。[#6577](https://github.com/ClickHouse/ClickHouse/pull/6577) ([proller](https://github.com/proller))
* 在 `throwIf` 中新增了可选的消息参数。([#5772](https://github.com/ClickHouse/ClickHouse/issues/5772)) [#6329](https://github.com/ClickHouse/ClickHouse/pull/6329) ([Vdimir](https://github.com/Vdimir))
* 发送插入数据时发生的服务器异常现在也会由客户端处理。[#5891](https://github.com/ClickHouse/ClickHouse/issues/5891) [#6711](https://github.com/ClickHouse/ClickHouse/pull/6711) ([dimarub2000](https://github.com/dimarub2000))
* 新增指标 `DistributedFilesToInsert`，用于显示文件系统中由分布式表选中并发送到远程服务器的文件总数。该数值会汇总所有分片。[#6600](https://github.com/ClickHouse/ClickHouse/pull/6600) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将大部分 JOIN 的准备逻辑从 `ExpressionAction/ExpressionAnalyzer` 移至 `AnalyzedJoin`。[#6785](https://github.com/ClickHouse/ClickHouse/pull/6785) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 TSan 警告 'lock-order-inversion'。 [#6740](https://github.com/ClickHouse/ClickHouse/pull/6740) ([Vasily Nemkov](https://github.com/Enmk))
* 改进了在缺少 Linux 能力时的信息提示。以 "fatal" 级别记录致命错误，使其更容易在 `system.text_log` 中找到。[#6441](https://github.com/ClickHouse/ClickHouse/pull/6441) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 启用在 `GROUP BY`、`ORDER BY` 期间将临时数据转储到磁盘以限制内存使用量时，此前不会检查磁盘剩余空间。此次修复新增了一个设置 `min_free_disk_space`：当磁盘剩余空间小于阈值时，查询会停止并抛出 `ErrorCodes::NOT_ENOUGH_SPACE`。[#6678](https://github.com/ClickHouse/ClickHouse/pull/6678) ([Weiqing Xu](https://github.com/weiqxu)) [#6691](https://github.com/ClickHouse/ClickHouse/pull/6691) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 移除了按线程递归的 rwlock。这样设计没有意义，因为线程会在不同查询之间复用。`SELECT` 查询可能在一个线程中获取锁，由另一个线程继续持有锁，并在第一个线程中退出。同时，第一个线程可能又被 `DROP` 查询复用。这会导致误报 "Attempt to acquire exclusive lock recursively" 消息。[#6771](https://github.com/ClickHouse/ClickHouse/pull/6771) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 `ExpressionAnalyzer.appendJoin()` 拆分出来。在 `ExpressionAnalyzer` 中为 `MergeJoin` 预留位置。[#6524](https://github.com/ClickHouse/ClickHouse/pull/6524) ([Artem Zuikov](https://github.com/4ertus2))
* 在 MySQL 兼容服务器中新增了 `mysql_native_password` 身份验证插件。[#6194](https://github.com/ClickHouse/ClickHouse/pull/6194) ([Yuriy Baranov](https://github.com/yurriy))
* 减少了 `clock_gettime` 的调用次数；修复了 `Allocator` 中 debug/release 版本之间的 ABI 兼容性问题 (影响很小) 。[#6197](https://github.com/ClickHouse/ClickHouse/pull/6197) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 `collectUsedColumns` 从 `ExpressionAnalyzer` 移至 `SyntaxAnalyzer`。现在由 `SyntaxAnalyzer` 自行生成 `required_source_columns`。[#6416](https://github.com/ClickHouse/ClickHouse/pull/6416) ([Artem Zuikov](https://github.com/4ertus2))
* 新增设置 `joined_subquery_requires_alias`，要求当 `FROM` 中存在多个表时 (即带有 JOIN 的查询) ，子查询和表函数必须指定别名。[#6733](https://github.com/ClickHouse/ClickHouse/pull/6733) ([Artem Zuikov](https://github.com/4ertus2))
* 将 `GetAggregatesVisitor` 类从 `ExpressionAnalyzer` 中拆分出来。[#6458](https://github.com/ClickHouse/ClickHouse/pull/6458) ([Artem Zuikov](https://github.com/4ertus2))
* `system.query_log`：将 `type` 列的数据类型改为 `Enum`。[#6265](https://github.com/ClickHouse/ClickHouse/pull/6265) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))
* 将 `sha256_password` 身份验证插件静态链接。[#6512](https://github.com/ClickHouse/ClickHouse/pull/6512) ([Yuriy Baranov](https://github.com/yurriy))
* 避免为使设置 `compile` 生效而引入额外依赖。在早期版本中，用户可能会遇到 `cannot open crti.o`、`unable to find library -lc` 等错误。[#6309](https://github.com/ClickHouse/ClickHouse/pull/6309) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 进一步加强了对可能来自恶意副本的输入的验证。[#6303](https://github.com/ClickHouse/ClickHouse/pull/6303) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 现在，`clickhouse-client` 软件包中已包含 `clickhouse-obfuscator` 文件。在早期版本中，它的名称是 `clickhouse obfuscator` (中间有空格) 。[#5816](https://github.com/ClickHouse/ClickHouse/issues/5816) [#6609](https://github.com/ClickHouse/ClickHouse/pull/6609) ([dimarub2000](https://github.com/dimarub2000))
* 修复了一种死锁问题：当至少有两个查询以不同顺序读取至少两个表，且另一个查询对其中一个表执行 DDL 操作时，就可能出现该死锁。还修复了另一种非常罕见的死锁。[#6764](https://github.com/ClickHouse/ClickHouse/pull/6764) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在 `system.processes` 和 `system.query_log` 中新增了 `os_thread_ids` 列，以便更好地进行调试。[#6763](https://github.com/ClickHouse/ClickHouse/pull/6763) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 针对 PHP mysqlnd 扩展中这样一个 bug 的临时解决方法：当 `sha256_password` 被用作默认身份验证插件时会出现该问题 (见 [#6031](https://github.com/ClickHouse/ClickHouse/issues/6031)) 。[#6113](https://github.com/ClickHouse/ClickHouse/pull/6113) ([Yuriy Baranov](https://github.com/yurriy))
* 移除可空性发生变化的列中不需要的位置。[#6693](https://github.com/ClickHouse/ClickHouse/pull/6693) ([Artem Zuikov](https://github.com/4ertus2))
* 将 `queue_max_wait_ms` 的默认值设为零，因为当前值 (5 秒) 并不合理。这个设置只有在极少数情况下才有用。新增了 `replace_running_query_max_wait_ms`、`kafka_max_wait_ms` 和 `connection_pool_max_wait_ms` 设置，以消除歧义。[#6692](https://github.com/ClickHouse/ClickHouse/pull/6692) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 从 `ExpressionAnalyzer` 中提取出 `SelectQueryExpressionAnalyzer`。保留 `ExpressionAnalyzer` 用于非 `SELECT` 查询。[#6499](https://github.com/ClickHouse/ClickHouse/pull/6499) ([Artem Zuikov](https://github.com/4ertus2))
* 删除了重复的输入和输出格式。[#6239](https://github.com/ClickHouse/ClickHouse/pull/6239) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 允许用户在连接级别覆盖 `poll_interval` 和 `idle_connection_timeout` 设置。[#6230](https://github.com/ClickHouse/ClickHouse/pull/6230) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `MergeTree` 现新增一个选项 `ttl_only_drop_parts` (默认禁用) ，用于避免对 parts 进行部分剪枝；当某个 part 中的所有行都已过期时，会将该 part 整体删除。[#6191](https://github.com/ClickHouse/ClickHouse/pull/6191) ([Sergi Vladykin](https://github.com/svladykin))
* 为 set 索引函数添加类型检查。如果函数接收到错误的类型，则抛出异常。此修复解决了 UBSan 模糊测试中发现的问题。[#6511](https://github.com/ClickHouse/ClickHouse/pull/6511) ([Nikita Vasilev](https://github.com/nikvas0))

<div id="performance-improvement">
  #### 性能改进
</div>

* 优化了在 `MergeTree` 表中对带有 `ORDER BY expressions` 子句的查询：当 `expressions` 与排序键具有相同前缀时可应用此优化。该优化由 `optimize_read_in_order` 设置控制。[#6054](https://github.com/ClickHouse/ClickHouse/pull/6054) [#6629](https://github.com/ClickHouse/ClickHouse/pull/6629) ([Anton Popov](https://github.com/CurtizJ))
* 允许在 parts 加载和删除期间使用多个线程。[#6372](https://github.com/ClickHouse/ClickHouse/issues/6372) [#6074](https://github.com/ClickHouse/ClickHouse/issues/6074) [#6438](https://github.com/ClickHouse/ClickHouse/pull/6438) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 实现了以批次方式更新聚合函数状态的变体，可能带来性能提升。[#6435](https://github.com/ClickHouse/ClickHouse/pull/6435) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 对 `exp`、`log`、`sigmoid`、`tanh` 函数使用 `FastOps` 库。FastOps 是 Michael Parakhin (Yandex CTO) 开发的快速向量数学库。`exp` 和 `log` 函数的性能提升超过 6 倍。接受 `Float32` 参数的 `exp` 和 `log` 函数将返回 `Float32` (在之前的版本中它们始终返回 `Float64`) 。现在 `exp(nan)` 可能返回 `inf`。`exp` 和 `log` 函数的结果可能不是最接近真实值的机器可表示数。[#6254](https://github.com/ClickHouse/ClickHouse/pull/6254) ([alexey-milovidov](https://github.com/alexey-milovidov)) 使用 Danila Kutenin 的变体使 fastops 正常工作 [#6317](https://github.com/ClickHouse/ClickHouse/pull/6317) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 `UInt8/16` 禁用连续键优化。[#6298](https://github.com/ClickHouse/ClickHouse/pull/6298) [#6701](https://github.com/ClickHouse/ClickHouse/pull/6701) ([akuzm](https://github.com/akuzm))
* 通过消除 `ParsedJson::Iterator` 中的动态内存分配，提升了 `simdjson` 库的性能。[#6479](https://github.com/ClickHouse/ClickHouse/pull/6479) ([Vitaly Baranov](https://github.com/vitlibar))
* 在使用 `mmap()` 分配内存时预先触发缺页。[#6667](https://github.com/ClickHouse/ClickHouse/pull/6667) ([akuzm](https://github.com/akuzm))
* 修复了 `Decimal` 比较中的性能问题。[#6380](https://github.com/ClickHouse/ClickHouse/pull/6380) ([Artem Zuikov](https://github.com/4ertus2))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 移除 Compiler (runtime 模板实例化) ，因为我们在性能方面已经超过了它。[#6646](https://github.com/ClickHouse/ClickHouse/pull/6646) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了性能测试，以更独立的方式展示 gcc-9 中性能的下降。[#6302](https://github.com/ClickHouse/ClickHouse/pull/6302) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了表函数 `numbers_mt`，它是 `numbers` 的多线程版本。更新了使用哈希函数的性能测试。[#6554](https://github.com/ClickHouse/ClickHouse/pull/6554) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* `clickhouse-benchmark` 的比较模式 [#6220](https://github.com/ClickHouse/ClickHouse/issues/6220) [#6343](https://github.com/ClickHouse/ClickHouse/pull/6343) ([dimarub2000](https://github.com/dimarub2000))
* 尽力打印堆栈跟踪。同时新增将 `SIGPROF` 作为调试信号，用于打印正在运行线程的堆栈跟踪。[#6529](https://github.com/ClickHouse/ClickHouse/pull/6529) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 每个函数各自独立成文件，第 10 部分。 [#6321](https://github.com/ClickHouse/ClickHouse/pull/6321) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 移除重复定义的 const `TABLE_IS_READ_ONLY`。[#6566](https://github.com/ClickHouse/ClickHouse/pull/6566) ([filimonov](https://github.com/filimonov))
* `StringHashMap` 格式调整，PR [#5417](https://github.com/ClickHouse/ClickHouse/issues/5417)。[#6700](https://github.com/ClickHouse/ClickHouse/pull/6700) ([akuzm](https://github.com/akuzm))
* `ExpressionAnalyzer` 中用于创建 join 的子查询得到了改进。[#6824](https://github.com/ClickHouse/ClickHouse/pull/6824) ([Artem Zuikov](https://github.com/4ertus2))
* 移除了一个冗余条件 (由 PVS Studio 发现) 。[#6775](https://github.com/ClickHouse/ClickHouse/pull/6775) ([akuzm](https://github.com/akuzm))
* 将 `ReverseIndex` 的哈希表接口拆分出来。[#6672](https://github.com/ClickHouse/ClickHouse/pull/6672) ([akuzm](https://github.com/akuzm))
* 重构了设置相关部分。[#6689](https://github.com/ClickHouse/ClickHouse/pull/6689) ([alesapin](https://github.com/alesapin))
* 为 `set` 索引函数添加注释。[#6319](https://github.com/ClickHouse/ClickHouse/pull/6319) ([Nikita Vasilev](https://github.com/nikvas0))
* 提高 Linux 下调试版本的 OOM 分数。[#6152](https://github.com/ClickHouse/ClickHouse/pull/6152) ([akuzm](https://github.com/akuzm))
* HDFS HA 现在可在调试构建中运行。[#6650](https://github.com/ClickHouse/ClickHouse/pull/6650) ([Weiqing Xu](https://github.com/weiqxu))
* 为 `transform_query_for_external_database` 新增了一项测试。[#6388](https://github.com/ClickHouse/ClickHouse/pull/6388) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 Kafka 表添加多个 materialized view 的测试。[#6509](https://github.com/ClickHouse/ClickHouse/pull/6509) ([Ivan](https://github.com/abyss7))
* 优化构建方案。 [#6500](https://github.com/ClickHouse/ClickHouse/pull/6500) ([Ivan](https://github.com/abyss7))
* 修复了在非 root 用户下执行 `test_external_dictionaries` 集成时出现的问题。[#6507](https://github.com/ClickHouse/ClickHouse/pull/6507) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 当已写入数据包的总大小超过 `DBMS_DEFAULT_BUFFER_SIZE` 时，会复现该问题。[#6204](https://github.com/ClickHouse/ClickHouse/pull/6204) ([Yuriy Baranov](https://github.com/yurriy))
* 新增了针对 `RENAME` 表竞态条件的测试 [#6752](https://github.com/ClickHouse/ClickHouse/pull/6752) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 避免 `KILL QUERY` 中的 Settings 出现数据竞争。[#6753](https://github.com/ClickHouse/ClickHouse/pull/6753) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为缓存字典处理错误的情况添加集成测试。[#6755](https://github.com/ClickHouse/ClickHouse/pull/6755) ([Vitaly Baranov](https://github.com/vitlibar))
* 在 Mac OS 上禁用 ELF 目标文件解析，因为这没有意义。[#6578](https://github.com/ClickHouse/ClickHouse/pull/6578) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 改进更新日志生成器。[#6327](https://github.com/ClickHouse/ClickHouse/pull/6327) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 GCC 添加 `-Wshadow` 选项。[#6325](https://github.com/ClickHouse/ClickHouse/pull/6325) ([kreuzerkrieg](https://github.com/kreuzerkrieg))
* 移除了已弃用的 `mimalloc` 支持代码。[#6715](https://github.com/ClickHouse/ClickHouse/pull/6715) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `zlib-ng` 会检测 x86 特性，并将这些信息保存到全局变量中。此操作原本在调用 defalteInit 时完成，但该调用可能会被不同线程同时执行。为避免多线程写入，应在库启动时完成此操作。[#6141](https://github.com/ClickHouse/ClickHouse/pull/6141) ([akuzm](https://github.com/akuzm))
* 针对 [#5192](https://github.com/ClickHouse/ClickHouse/issues/5192) 中修复的 join 缺陷的回归测试。[#6147](https://github.com/ClickHouse/ClickHouse/pull/6147) ([Bakhtiyor Ruziev](https://github.com/theruziev))
* 修复了 MSan 报告中的问题。[#6144](https://github.com/ClickHouse/ClickHouse/pull/6144) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复不稳定的生存时间 (TTL) 测试。[#6782](https://github.com/ClickHouse/ClickHouse/pull/6782) ([Anton Popov](https://github.com/CurtizJ))
* 修复了 `MergeTreeDataPart::is_frozen` 字段中误报的数据竞争问题。[#6583](https://github.com/ClickHouse/ClickHouse/pull/6583) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了模糊测试中的超时问题。在之前的版本中，它曾在查询 `SELECT * FROM numbers_mt(gccMurmurHash(''))` 中误报挂起。[#6582](https://github.com/ClickHouse/ClickHouse/pull/6582) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为列的 `static_cast` 添加了调试检查。[#6581](https://github.com/ClickHouse/ClickHouse/pull/6581) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 官方 RPM 软件包现已支持 Oracle Linux。[#6356](https://github.com/ClickHouse/ClickHouse/issues/6356) [#6585](https://github.com/ClickHouse/ClickHouse/pull/6585) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 json perftests 的类型从 `once` 改为 `loop`。[#6536](https://github.com/ClickHouse/ClickHouse/pull/6536) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* `odbc-bridge.cpp` 中定义了 `main()`，因此不应将其包含到 `clickhouse-lib` 中。[#6538](https://github.com/ClickHouse/ClickHouse/pull/6538) ([Orivej Desh](https://github.com/orivej))
* 新增了一个测试，用于检测在 `FULL|RIGHT JOIN` 中右侧表的连接键包含空值时发生的崩溃。 [#6362](https://github.com/ClickHouse/ClickHouse/pull/6362) ([Artem Zuikov](https://github.com/4ertus2))
* 以防万一，新增了别名展开限制测试。[#6442](https://github.com/ClickHouse/ClickHouse/pull/6442) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在适当情况下，已将 `boost::filesystem` 替换为 `std::filesystem`。[#6253](https://github.com/ClickHouse/ClickHouse/pull/6253) [#6385](https://github.com/ClickHouse/ClickHouse/pull/6385) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在网站上添加了 RPM 软件包。[#6251](https://github.com/ClickHouse/ClickHouse/pull/6251) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 `IN` 部分中已修复的 `Unknown identifier` 异常新增测试。[#6708](https://github.com/ClickHouse/ClickHouse/pull/6708) ([Artem Zuikov](https://github.com/4ertus2))
* 简化 `shared_ptr_helper`，因为很多人难以理解它。[#6675](https://github.com/ClickHouse/ClickHouse/pull/6675) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为修复后的 Gorilla 和 DoubleDelta 编解码器添加了性能测试。[#6179](https://github.com/ClickHouse/ClickHouse/pull/6179) ([Vasily Nemkov](https://github.com/Enmk))
* 将集成测试 `test_dictionaries` 拆分成 4 个单独的测试。[#6776](https://github.com/ClickHouse/ClickHouse/pull/6776) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复 `PipelineExecutor` 中的 PVS-Studio 警告。[#6777](https://github.com/ClickHouse/ClickHouse/pull/6777) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 允许 `library` 字典源与 ASan 配合使用。[#6482](https://github.com/ClickHouse/ClickHouse/pull/6482) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了一个可根据 PR 列表生成更新日志的选项。[#6350](https://github.com/ClickHouse/ClickHouse/pull/6350) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 读取时锁定 `TinyLog` 存储。[#6226](https://github.com/ClickHouse/ClickHouse/pull/6226) ([akuzm](https://github.com/akuzm))
* 在 CI 中检查失效的符号链接。[#6634](https://github.com/ClickHouse/ClickHouse/pull/6634) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 由于在调试版本中该测试可能耗时较长，因此增加了 "stack overflow" 测试的超时时间。[#6637](https://github.com/ClickHouse/ClickHouse/pull/6637) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了对连续两个空白字符的检查。[#6643](https://github.com/ClickHouse/ClickHouse/pull/6643) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复使用 sanitizers 构建时 `new/delete` 的内存跟踪问题。该跟踪并不完善，只是为了避免测试中出现内存限制异常。[#6450](https://github.com/ClickHouse/ClickHouse/pull/6450) ([Artem Zuikov](https://github.com/4ertus2))
* 重新启用链接时对未定义符号的检查。[#6453](https://github.com/ClickHouse/ClickHouse/pull/6453) ([Ivan](https://github.com/abyss7))
* 避免每天都重新构建 `hyperscan`。 [#6307](https://github.com/ClickHouse/ClickHouse/pull/6307) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `ProtobufWriter` 中的 UBSan 报错。[#6163](https://github.com/ClickHouse/ClickHouse/pull/6163) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 禁止将 query profiler 与 sanitizers 一起使用，因为它们不兼容。[#6769](https://github.com/ClickHouse/ClickHouse/pull/6769) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 添加了一个测试，用于验证在定时器触发失败后重新加载字典。[#6114](https://github.com/ClickHouse/ClickHouse/pull/6114) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复 `PipelineExecutor::prepareProcessor` 参数类型的前后不一致问题。[#6494](https://github.com/ClickHouse/ClickHouse/pull/6494) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 新增了针对错误 URI 的测试。[#6493](https://github.com/ClickHouse/ClickHouse/pull/6493) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 `CAST` 函数增加了更多检查，以便获取关于模糊测试中段错误的更多信息。[#6346](https://github.com/ClickHouse/ClickHouse/pull/6346) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 为本地构建镜像的 `docker/builder` 容器新增了对 `gcc-9` 的支持。[#6333](https://github.com/ClickHouse/ClickHouse/pull/6333) ([Gleb Novikov](https://github.com/NanoBjorn))
* 增加了对使用 `LowCardinality(String)` 作为主键的测试。[#5044](https://github.com/ClickHouse/ClickHouse/issues/5044) [#6219](https://github.com/ClickHouse/ClickHouse/pull/6219) ([dimarub2000](https://github.com/dimarub2000))
* 修复了因堆栈跟踪打印缓慢而受影响的测试。[#6315](https://github.com/ClickHouse/ClickHouse/pull/6315) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 添加一个测试用例，覆盖 [#6029](https://github.com/ClickHouse/ClickHouse/pull/6029) 中修复的 `groupUniqArray` 崩溃问题。 [#4402](https://github.com/ClickHouse/ClickHouse/issues/4402) [#6129](https://github.com/ClickHouse/ClickHouse/pull/6129) ([akuzm](https://github.com/akuzm))
* 修复了索引变更相关测试。[#6645](https://github.com/ClickHouse/ClickHouse/pull/6645) ([Nikita Vasilev](https://github.com/nikvas0))
* 在性能测试中，不要读取并未运行的查询的查询日志。[#6427](https://github.com/ClickHouse/ClickHouse/pull/6427) ([akuzm](https://github.com/akuzm))
* 现在，无论关于可疑低基数类型的设置如何，都可以使用任何低基数类型创建 materialized view。[#6428](https://github.com/ClickHouse/ClickHouse/pull/6428) ([Olga Khvostikova](https://github.com/stavrolia))
* 更新了 `send_logs_level` 设置相关的测试。[#6207](https://github.com/ClickHouse/ClickHouse/pull/6207) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了 gcc-8.2 下的构建问题。 [#6196](https://github.com/ClickHouse/ClickHouse/pull/6196) ([Max Akhmedov](https://github.com/zlobober))
* 修复使用内部 libc++ 时的构建问题。[#6724](https://github.com/ClickHouse/ClickHouse/pull/6724) ([Ivan](https://github.com/abyss7))
* 修复与 `rdkafka` 库共享构建的问题 [#6101](https://github.com/ClickHouse/ClickHouse/pull/6101) ([Ivan](https://github.com/abyss7))
* Mac OS 构建修复 (不完整) 。[#6390](https://github.com/ClickHouse/ClickHouse/pull/6390) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#6429](https://github.com/ClickHouse/ClickHouse/pull/6429) ([alex-zaitsev](https://github.com/alex-zaitsev))
* 修复“拆分式”构建。[#6618](https://github.com/ClickHouse/ClickHouse/pull/6618) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 其他构建修复项：[#6186](https://github.com/ClickHouse/ClickHouse/pull/6186) ([Amos Bird](https://github.com/amosbird)) [#6486](https://github.com/ClickHouse/ClickHouse/pull/6486) [#6348](https://github.com/ClickHouse/ClickHouse/pull/6348) ([vxider](https://github.com/Vxider)) [#6744](https://github.com/ClickHouse/ClickHouse/pull/6744) ([Ivan](https://github.com/abyss7)) [#6016](https://github.com/ClickHouse/ClickHouse/pull/6016) [#6421](https://github.com/ClickHouse/ClickHouse/pull/6421) [#6491](https://github.com/ClickHouse/ClickHouse/pull/6491) ([proller](https://github.com/proller))

<div id="backward-incompatible-change-2">
  #### 不向后兼容的变更
</div>

* 已移除很少使用的表函数 `catBoostPool` 和存储 `CatBoostPool`。如果您使用过此表函数，请发送电子邮件至 `feedback@clickhouse.com`。请注意，CatBoost 集成仍然保留，并将继续受支持。[#6279](https://github.com/ClickHouse/ClickHouse/pull/6279) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 默认禁用 `ANY RIGHT JOIN` 和 `ANY FULL JOIN`。将 `any_join_distinct_right_table_keys` 设置设为启用即可使用它们。[#5126](https://github.com/ClickHouse/ClickHouse/issues/5126) [#6351](https://github.com/ClickHouse/ClickHouse/pull/6351) ([Artem Zuikov](https://github.com/4ertus2))

<div id="clickhouse-release-19-13">
  ## ClickHouse 版本 19.13
</div>

<div id="clickhouse-release-19-13-6-51-2019-10-02">
  ### ClickHouse 发行版 19.13.6.51，2019-10-02 发布
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本还包含 19.11.12.69 版本中的所有缺陷修复。

<div id="clickhouse-release-19-13-5-44-2019-09-20">
  ### ClickHouse 版本 19.13.5.44，2019-09-20
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本还包含 19.14.6.12 中的所有 bug 修复。
* 修复了在 ZooKeeper 不可访问时，对 replicated table 执行 `DROP` 查询期间表可能出现状态不一致的问题。[#6045](https://github.com/ClickHouse/ClickHouse/issues/6045) [#6413](https://github.com/ClickHouse/ClickHouse/pull/6413) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))
* 修复了 StorageMerge 中的数据竞争问题。[#6717](https://github.com/ClickHouse/ClickHouse/pull/6717) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 query profiler 中引入的一个 bug，该问题会导致从套接字无休止地接收数据。[#6386](https://github.com/ClickHouse/ClickHouse/pull/6386) ([alesapin](https://github.com/alesapin))
* 修复了对布尔值执行 `JSONExtractRaw` 函数时 CPU 使用过高的问题。[#6208](https://github.com/ClickHouse/ClickHouse/pull/6208) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了写入 materialized view 时的回归问题。[#6415](https://github.com/ClickHouse/ClickHouse/pull/6415) ([Ivan](https://github.com/abyss7))
* 表函数 `url` 曾存在一个漏洞，允许攻击者在请求中注入任意 HTTP 请求头。此问题由 [Nikita Tikhomirov](https://github.com/NSTikhomirov) 发现。[#6466](https://github.com/ClickHouse/ClickHouse/pull/6466) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 Set 索引中无用的 `AST` 检查。[#6510](https://github.com/ClickHouse/ClickHouse/issues/6510) [#6651](https://github.com/ClickHouse/ClickHouse/pull/6651) ([Nikita Vasilev](https://github.com/nikvas0))
* 修复了嵌入在查询中的 `AggregateFunction` 值的解析问题。[#6575](https://github.com/ClickHouse/ClickHouse/issues/6575) [#6773](https://github.com/ClickHouse/ClickHouse/pull/6773) ([Zhichang Yu](https://github.com/yuzhichang))
* 修复了 `trim` 函数家族行为异常的问题。[#6647](https://github.com/ClickHouse/ClickHouse/pull/6647) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-13-4-32-2019-09-10">
  ### ClickHouse 版本 19.13.4.32，2019-09-10
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本还包含了 19.11.9.52 和 19.11.10.54 中的所有安全漏洞修复。
* 修复了 `system.parts` 表和 `ALTER` 查询中的数据竞争问题。[#6245](https://github.com/ClickHouse/ClickHouse/issues/6245) [#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在对带有 sample 和 prewhere 的空分布式表进行读取时，流中的头信息不匹配问题。[#6167](https://github.com/ClickHouse/ClickHouse/issues/6167) ([Lixiang Qian](https://github.com/fancyqlx)) [#6823](https://github.com/ClickHouse/ClickHouse/pull/6823) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了在 `IN` 子句中使用包含 Tuple 的子查询时发生崩溃的问题。[#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix))
* 修复了 `GLOBAL JOIN ON` 部分中列名相同的情况导致的问题。[#6181](https://github.com/ClickHouse/ClickHouse/pull/6181) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了将不支持转换的类型转换为 `Decimal` 时发生崩溃的问题，改为抛出异常。[#6297](https://github.com/ClickHouse/ClickHouse/pull/6297) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 `extractAll()` 函数中的崩溃问题。[#6644](https://github.com/ClickHouse/ClickHouse/pull/6644) ([Artem Zuikov](https://github.com/4ertus2))
* `MySQL`、`ODBC`、`JDBC` 表函数的查询转换现在可以正确处理带有多个 `AND` 表达式的 `SELECT WHERE` 查询。[#6381](https://github.com/ClickHouse/ClickHouse/issues/6381) [#6676](https://github.com/ClickHouse/ClickHouse/pull/6676) ([dimarub2000](https://github.com/dimarub2000))
* 为 MySQL 8 集成添加了对先前声明的检查。[#6569](https://github.com/ClickHouse/ClickHouse/pull/6569) ([Rafael David Tinoco](https://github.com/rafaeldtinoco))

<div id="security-fix">
  #### 安全修复
</div>

* 修复了解压缩阶段 codec 中的两个漏洞 (恶意用户可构造压缩数据，导致解压缩时发生缓冲区溢出) 。[#6670](https://github.com/ClickHouse/ClickHouse/pull/6670) ([Artem Zuikov](https://github.com/4ertus2))

<div id="clickhouse-release-19-13-3-26-2019-08-22">
  ### ClickHouse 版本 19.13.3.26，2019-08-22
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了在启用 `enable_mixed_granularity_parts=1` 的表上执行 `ALTER TABLE ... UPDATE` 查询时的问题。[#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin))
* 修复了在 IN 子句中使用包含 Tuple 的子查询时出现的 NPE。[#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix))
* 修复了一个问题：过期副本重新恢复后，仍可能保留已被 DROP PARTITION 删除的数据分区片段。[#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix))
* 修复了 CSV 解析问题 [#6426](https://github.com/ClickHouse/ClickHouse/issues/6426) [#6559](https://github.com/ClickHouse/ClickHouse/pull/6559) ([tavplubix](https://github.com/tavplubix))
* 修复了 system.parts 表和 ALTER 查询中的数据竞争问题。该修复解决了 [#6245](https://github.com/ClickHouse/ClickHouse/issues/6245)。[#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了变更 中的错误代码，该问题可能导致内存损坏。修复了读取地址 `0x14c0` 时出现的段错误，这可能由并发执行 `DROP TABLE` 以及从 `system.parts` 或 `system.parts_columns` 查询 `SELECT` 引起。修复了准备 mutation queries 时的竞态条件。修复了由对 Replicated 表执行 `OPTIMIZE` 与 ALTER 等并发修改操作引发的死锁。[#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在带有跳过索引的表上执行 `ALTER DELETE` 查询后可能发生的数据丢失问题。[#6224](https://github.com/ClickHouse/ClickHouse/issues/6224) [#6282](https://github.com/ClickHouse/ClickHouse/pull/6282) ([Nikita Vasilev](https://github.com/nikvas0))

<div id="security-fix">
  #### 安全修复
</div>

* 如果攻击者对 ZooKeeper 具有写权限，并且能够在 ClickHouse 所在网络中运行自定义服务器，就可以构造一个恶意服务器，令其充当 ClickHouse 副本并注册到 ZooKeeper 中。当另一个副本从恶意副本拉取数据分区片段时，它可以强制 clickhouse-server 向文件系统中的任意路径写入。由 Yandex 信息安全团队的 Eldar Zaitov 发现。[#6247](https://github.com/ClickHouse/ClickHouse/pull/6247) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-13-2-19-2019-08-14">
  ### ClickHouse 版本 19.13.2.19，2019-08-14
</div>

<div id="new-feature">
  #### 新功能
</div>

* 查询级别的采样分析器。[示例](https://gist.github.com/alexey-milovidov/92758583dd41c24c360fdb8d6a4da194)。[#4247](https://github.com/ClickHouse/ClickHouse/issues/4247) ([laplab](https://github.com/laplab)) [#6124](https://github.com/ClickHouse/ClickHouse/pull/6124) ([alexey-milovidov](https://github.com/alexey-milovidov)) [#6250](https://github.com/ClickHouse/ClickHouse/pull/6250) [#6283](https://github.com/ClickHouse/ClickHouse/pull/6283) [#6386](https://github.com/ClickHouse/ClickHouse/pull/6386)
* 允许使用 `COLUMNS('regexp')` 表达式指定列列表，其作用类似于比 `*` 星号更灵活的形式。[#5951](https://github.com/ClickHouse/ClickHouse/pull/5951) ([mfridental](https://github.com/mfridental)), ([alexey-milovidov](https://github.com/alexey-milovidov))
* 现在支持 `CREATE TABLE AS table_function()` [#6057](https://github.com/ClickHouse/ClickHouse/pull/6057) ([dimarub2000](https://github.com/dimarub2000))
* `stochasticLinearRegression()` 和 `stochasticLogisticRegression()` 聚合函数默认使用 Adam 优化器进行随机梯度下降，因为它几乎无需调优也能取得良好效果。[#6000](https://github.com/ClickHouse/ClickHouse/pull/6000) ([Quid37](https://github.com/Quid37))
* 新增了用于处理自定义周数的函数 [#5212](https://github.com/ClickHouse/ClickHouse/pull/5212) ([Andy Yang](https://github.com/andyyzh))
* `RENAME` 查询现在可用于所有存储引擎。[#5953](https://github.com/ClickHouse/ClickHouse/pull/5953) ([Ivan](https://github.com/abyss7))
* 现在客户端可通过设置 `send_logs_level` 接收服务器发送的任意级别日志，而不受服务器设置中指定的日志级别限制。[#5964](https://github.com/ClickHouse/ClickHouse/pull/5964) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))

<div id="backward-incompatible-change">
  #### 向后不兼容的更改
</div>

* 设置 `input_format_defaults_for_omitted_fields` 现已默认启用。对于分布式表的插入操作，需要在整个 cluster 上保持此设置一致 (需要在滚动更新前完成设置) 。该设置会对 `JSONEachRow` 和 `CSV*` 格式中省略字段的复杂默认 expression 进行计算。这本应是符合预期的行为，但可能会带来可忽略的性能差异。[#6043](https://github.com/ClickHouse/ClickHouse/pull/6043) ([Artem Zuikov](https://github.com/4ertus2)), [#5625](https://github.com/ClickHouse/ClickHouse/pull/5625) ([akuzm](https://github.com/akuzm))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 新的查询处理管道。使用 `experimental_use_processors=1` 选项启用。使用风险自负。[#4914](https://github.com/ClickHouse/ClickHouse/pull/4914) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本已修复 Kafka 集成。
* 修复了在 `DoubleDelta` 值较大时 `Int64` 的 `DoubleDelta` 编码问题，并改进了针对随机数据的 `Int32` `DoubleDelta` 编码。[#5998](https://github.com/ClickHouse/ClickHouse/pull/5998) ([Vasily Nemkov](https://github.com/Enmk))
* 修复了在将设置 `merge_tree_uniform_read_distribution` 设为 0 时，`max_rows_to_read` 被高估的问题。[#6019](https://github.com/ClickHouse/ClickHouse/pull/6019) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="improvement">
  #### 改进
</div>

* 如果 `config.d` 文件与配置文件没有对应的根元素，则会抛出异常 [#6123](https://github.com/ClickHouse/ClickHouse/pull/6123) ([dimarub2000](https://github.com/dimarub2000))

<div id="performance-improvement">
  #### 性能改进
</div>

* 优化 `count()`。现在会尽可能使用最小的列。[#6028](https://github.com/ClickHouse/ClickHouse/pull/6028) ([Amos Bird](https://github.com/amosbird))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 在性能测试中报告内存使用情况。[#5899](https://github.com/ClickHouse/ClickHouse/pull/5899) ([akuzm](https://github.com/akuzm))
* 修复使用外部 `libcxx` 时的构建问题 [#6010](https://github.com/ClickHouse/ClickHouse/pull/6010) ([Ivan](https://github.com/abyss7))
* 修复使用 `rdkafka` 库时的共享构建问题 [#6101](https://github.com/ClickHouse/ClickHouse/pull/6101) ([Ivan](https://github.com/abyss7))

<div id="clickhouse-release-19-11">
  ## ClickHouse 版本 19.11
</div>

<div id="clickhouse-release-19-11-13-74-2019-11-01">
  ### ClickHouse 19.11.13.74 版本，2019-11-01
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 `ALTER MODIFY COLUMN` 和垂直合并中的一个罕见崩溃问题：当被合并或修改的 parts 之一为空 (0 行) 时会触发该问题。[#6780](https://github.com/ClickHouse/ClickHouse/pull/6780) ([alesapin](https://github.com/alesapin))
* 手动更新了 `SIMDJSON`。这修复了 stderr 文件可能被错误的 JSON 诊断消息刷屏的问题。[#7548](https://github.com/ClickHouse/ClickHouse/pull/7548) ([Alexander Kazakov](https://github.com/Akazz))
* 修复了变更中 `mrk` 文件扩展名相关的问题 ([alesapin](https://github.com/alesapin))

<div id="clickhouse-release-19-11-12-69-2019-10-02">
  ### ClickHouse 版本 19.11.12.69，2019-10-02
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了大型表中复杂键上的索引分析性能下降问题。此修复对应 [#6924](https://github.com/ClickHouse/ClickHouse/issues/6924)。[#7075](https://github.com/ClickHouse/ClickHouse/pull/7075) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 避免了在使用 Distributed engine 的表中发送数据时偶发的 SIGSEGV (`Failed to send batch: file with index XXXXX is absent`) 。[#7032](https://github.com/ClickHouse/ClickHouse/pull/7032) ([Azat Khuzhin](https://github.com/azat))
* 修复了使用多个 JOIN 时出现 `Unknown identifier` 的问题。此修复对应 [#5254](https://github.com/ClickHouse/ClickHouse/issues/5254)。[#7022](https://github.com/ClickHouse/ClickHouse/pull/7022) ([Artem Zuikov](https://github.com/4ertus2))

<div id="clickhouse-release-19-11-11-57-2019-09-13">
  ### ClickHouse 版本 19.11.11.57，2019-09-13
</div>

* 修复了从 Kafka 空 topic 读取数据时因逻辑错误导致的段错误。[#6902](https://github.com/ClickHouse/ClickHouse/issues/6902) [#6909](https://github.com/ClickHouse/ClickHouse/pull/6909) ([Ivan](https://github.com/abyss7))
* 修复了函数 `АrrayEnumerateUniqRanked` 在参数包含空数组时的问题。[#6928](https://github.com/ClickHouse/ClickHouse/pull/6928) ([proller](https://github.com/proller))

<div id="clickhouse-release-19-11-10-54-2019-09-10">
  ### ClickHouse 版本 19.11.10.54，2019-09-10
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 手动存储 Kafka 消息的偏移量，以便一次性提交所有分区的偏移量。修复了“一个消费者 - 多个分区”场景下可能发生的重复问题。[#6872](https://github.com/ClickHouse/ClickHouse/pull/6872) ([Ivan](https://github.com/abyss7))

<div id="clickhouse-release-19-11-9-52-2019-09-6">
  ### ClickHouse 版本 19.11.9.52，2019-09-6
</div>

* 改进了 cache 字典中的错误处理。[#6737](https://github.com/ClickHouse/ClickHouse/pull/6737) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了函数 `arrayEnumerateUniqRanked` 中的 bug。[#6779](https://github.com/ClickHouse/ClickHouse/pull/6779) ([proller](https://github.com/proller))
* 修复了从 JSON 中提取 `Tuple` 时 `JSONExtract` 函数的问题。[#6718](https://github.com/ClickHouse/ClickHouse/pull/6718) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了在带有跳过索引的表上执行 `ALTER DELETE` 查询后可能发生的数据丢失问题。[#6224](https://github.com/ClickHouse/ClickHouse/issues/6224) [#6282](https://github.com/ClickHouse/ClickHouse/pull/6282) ([Nikita Vasilev](https://github.com/nikvas0))
* 修复了性能测试。[#6392](https://github.com/ClickHouse/ClickHouse/pull/6392) ([alexey-milovidov](https://github.com/alexey-milovidov))
* Parquet：修复了读取布尔列时的问题。[#6579](https://github.com/ClickHouse/ClickHouse/pull/6579) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `nullIf` 函数在常量参数下行为错误的问题。[#6518](https://github.com/ClickHouse/ClickHouse/pull/6518) ([Guillaume Tassery](https://github.com/YiuRULE)) [#6580](https://github.com/ClickHouse/ClickHouse/pull/6580) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 server 正常重启时 Kafka 消息重复的问题。[#6597](https://github.com/ClickHouse/ClickHouse/pull/6597) ([Ivan](https://github.com/abyss7))
* 修复了一个问题：长时间运行的 `ALTER UPDATE` 或 `ALTER DELETE` 可能会阻止常规合并操作运行；如果没有足够的空闲线程，则阻止变更操作执行。[#6502](https://github.com/ClickHouse/ClickHouse/issues/6502) [#6617](https://github.com/ClickHouse/ClickHouse/pull/6617) ([tavplubix](https://github.com/tavplubix))
* 修复了在服务器配置文件中处理 "timezone" 时的错误。[#6709](https://github.com/ClickHouse/ClickHouse/pull/6709) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 Kafka 测试。[#6805](https://github.com/ClickHouse/ClickHouse/pull/6805) ([Ivan](https://github.com/abyss7))

<div id="security-fix">
  #### 安全修复
</div>

* 如果攻击者对 ZooKeeper 具有写入权限，并且能够运行一台可从 ClickHouse 所在网络访问的自定义服务器，那么其就可以构造一台特制的恶意服务器，使其充当 ClickHouse 副本并注册到 ZooKeeper 中。当另一个副本从恶意副本拉取数据分区片段时，它就可以强制 clickhouse-server 向文件系统中的任意路径写入数据。由 Yandex 信息安全团队的 Eldar Zaitov 发现。[#6247](https://github.com/ClickHouse/ClickHouse/pull/6247) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-11-8-46-2019-08-22">
  ### ClickHouse 版本 19.11.8.46，2019-08-22
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了在启用 `enable_mixed_granularity_parts=1` 的表上执行 `ALTER TABLE ... UPDATE` 查询时的问题。[#6543](https://github.com/ClickHouse/ClickHouse/pull/6543) ([alesapin](https://github.com/alesapin))
* 修复了在 IN 子句中使用包含 Tuple 的子查询时出现的 NPE 问题。[#6125](https://github.com/ClickHouse/ClickHouse/issues/6125) [#6550](https://github.com/ClickHouse/ClickHouse/pull/6550) ([tavplubix](https://github.com/tavplubix))
* 修复了一个问题：如果过期副本重新恢复在线状态，仍可能保留已被 DROP PARTITION 删除的数据分区片段。[#6522](https://github.com/ClickHouse/ClickHouse/issues/6522) [#6523](https://github.com/ClickHouse/ClickHouse/pull/6523) ([tavplubix](https://github.com/tavplubix))
* 修复了 CSV 解析问题 [#6426](https://github.com/ClickHouse/ClickHouse/issues/6426) [#6559](https://github.com/ClickHouse/ClickHouse/pull/6559) ([tavplubix](https://github.com/tavplubix))
* 修复了 system.parts 表和 ALTER 查询中的数据竞争问题。此修复解决了 [#6245](https://github.com/ClickHouse/ClickHouse/issues/6245)。[#6513](https://github.com/ClickHouse/ClickHouse/pull/6513) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了变更 中可能导致内存损坏的错误代码。修复了读取地址 `0x14c0` 时的段错误，该问题可能由并发执行 `DROP TABLE` 以及从 `system.parts` 或 `system.parts_columns` 中执行 `SELECT` 引起。修复了准备 mutation queries 时的竞态条件。修复了对 Replicated 表执行 `OPTIMIZE` 与并发修改操作 (如 ALTER) 同时发生时导致的死锁。[#6514](https://github.com/ClickHouse/ClickHouse/pull/6514) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-11-7-40-2019-08-14">
  ### 发行版 19.11.7.40，2019-08-14
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 此版本修复了 Kafka 集成问题。
* 修复对常量参数使用 `arrayReduce` 时出现的段错误。 [#6326](https://github.com/ClickHouse/ClickHouse/pull/6326) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 `toFloat()` 的单调性问题。 [#6374](https://github.com/ClickHouse/ClickHouse/pull/6374) ([dimarub2000](https://github.com/dimarub2000))
* 修复在启用 `optimize_skip_unused_shards` 且缺少分片键时出现的段错误。 [#6384](https://github.com/ClickHouse/ClickHouse/pull/6384) ([CurtizJ](https://github.com/CurtizJ))
* 修复 `arrayEnumerateUniqRanked` 函数的逻辑问题。 [#6423](https://github.com/ClickHouse/ClickHouse/pull/6423) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 移除了 MySQL 处理程序中过于冗长的额外日志。 [#6389](https://github.com/ClickHouse/ClickHouse/pull/6389) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复聚合函数 `topK` 和 `topKWeighted` 中的错误行为以及可能发生的段错误。 [#6404](https://github.com/ClickHouse/ClickHouse/pull/6404) ([CurtizJ](https://github.com/CurtizJ))
* 不再在 `system.columns` 表中暴露虚拟列。这是保持向后兼容所必需的。 [#6406](https://github.com/ClickHouse/ClickHouse/pull/6406) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复复杂键缓存字典中字符串字段的内存分配问题。 [#6447](https://github.com/ClickHouse/ClickHouse/pull/6447) ([alesapin](https://github.com/alesapin))
* 修复为 `Replicated*MergeTree` 表创建新副本时启用自适应粒度的问题。 [#6452](https://github.com/ClickHouse/ClickHouse/pull/6452) ([alesapin](https://github.com/alesapin))
* 修复读取 Kafka 消息时出现的无限循环。 [#6354](https://github.com/ClickHouse/ClickHouse/pull/6354) ([abyss7](https://github.com/abyss7))
* 修复了恶意构造的查询可能因 SQL 解析器中的栈溢出导致服务器崩溃的问题，以及 `Merge` 和 `Distributed` 表中可能发生栈溢出的问题 [#6433](https://github.com/ClickHouse/ClickHouse/pull/6433) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复小序列上的 Gorilla 编码错误。 [#6444](https://github.com/ClickHouse/ClickHouse/pull/6444) ([Enmk](https://github.com/Enmk))

<div id="improvement">
  #### 改进
</div>

* 允许用户在连接级别覆盖 `poll_interval` 和 `idle_connection_timeout` 设置。[#6230](https://github.com/ClickHouse/ClickHouse/pull/6230) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-11-5-28-2019-08-05">
  ### ClickHouse 发行版 19.11.5.28，2019-08-05
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了服务器过载时查询可能挂起的问题。[#6301](https://github.com/ClickHouse/ClickHouse/pull/6301) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 yandexConsistentHash 函数中的 FPE 问题。此修复解决了 [#6304](https://github.com/ClickHouse/ClickHouse/issues/6304)。[#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `AggregateFunctionFactory` 中 `LowCardinality` 类型转换的缺陷。此修复解决了 [#6257](https://github.com/ClickHouse/ClickHouse/issues/6257)。[#6281](https://github.com/ClickHouse/ClickHouse/pull/6281) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了配置文件中将 `true` 和 `false` 字符串解析为 `bool` 设置值时的问题。[#6278](https://github.com/ClickHouse/ClickHouse/pull/6278) ([alesapin](https://github.com/alesapin))
* 修复了一个罕见问题：当 `WHERE` 的一部分被移到 `PREWHERE` 时，针对基于 `MergeTree` 表的 `Distributed` 表发起查询时，可能会出现不兼容的流请求头。[#6236](https://github.com/ClickHouse/ClickHouse/pull/6236) ([alesapin](https://github.com/alesapin))
* 修复了有符号类型与无符号类型进行整数除法时的溢出问题。此修复解决了 [#6214](https://github.com/ClickHouse/ClickHouse/issues/6214)。[#6233](https://github.com/ClickHouse/ClickHouse/pull/6233) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* `Kafka` 仍未修复。

<div id="clickhouse-release-19-11-4-24-2019-08-01">
  ### 发行版 19.11.4.24，2019-08-01
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了使用自适应粒度时写入二级索引标记的 bug。[#6126](https://github.com/ClickHouse/ClickHouse/pull/6126) ([alesapin](https://github.com/alesapin))
* 修复了两级聚合时，`GROUP BY` 的 `WITH ROLLUP` 和 `WITH CUBE` 修饰符的问题。[#6225](https://github.com/ClickHouse/ClickHouse/pull/6225) ([Anton Popov](https://github.com/CurtizJ))
* 修复了 `JSONExtractRaw` 函数卡死的问题。修复了 [#6195](https://github.com/ClickHouse/ClickHouse/issues/6195) [#6198](https://github.com/ClickHouse/ClickHouse/pull/6198) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 ExternalLoader::reloadOutdated() 中的段错误。[#6082](https://github.com/ClickHouse/ClickHouse/pull/6082) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了一种情况：服务器可能会关闭监听套接字，但自身并未关闭，且仍继续处理剩余查询。最终可能会出现两个正在运行的 clickhouse-server 进程。有时，服务器还会对剩余查询返回 `bad_function_call` 错误。[#6231](https://github.com/ClickHouse/ClickHouse/pull/6231) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了通过 ODBC、MySQL、ClickHouse 和 HTTP 对外部字典进行初始加载时，update 字段上的一个无用且错误的条件。这修复了 [#6069](https://github.com/ClickHouse/ClickHouse/issues/6069) [#6083](https://github.com/ClickHouse/ClickHouse/pull/6083) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在不包含 NULL 的情况下，将 `LowCardinality(Nullable)` 转换为非 Nullable 列时出现的不必要异常 (例如在 `SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String)` 这样的查询中) 。[#6094](https://github.com/ClickHouse/ClickHouse/issues/6094) [#6119](https://github.com/ClickHouse/ClickHouse/pull/6119) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了 `"uniq"` 聚合函数在极少数情况下结果不确定的问题。该 bug 存在于所有 ClickHouse 版本中。[#6058](https://github.com/ClickHouse/ClickHouse/pull/6058) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在函数 `IPv6CIDRToRange` 中设置稍高一些的 CIDR 时会发生段错误。[#6068](https://github.com/ClickHouse/ClickHouse/pull/6068) ([Guillaume Tassery](https://github.com/YiuRULE))
* 修复了服务器在许多不同上下文中抛出大量异常时出现的轻微内存泄漏问题。[#6144](https://github.com/ClickHouse/ClickHouse/pull/6144) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一种情况：消费者在订阅前被暂停，之后却没有恢复。[#6075](https://github.com/ClickHouse/ClickHouse/pull/6075) ([Ivan](https://github.com/abyss7)) 请注意，此版本中的 Kafka 有问题。
* 清理了上一次读取操作因错误结束后遗留的 Kafka 数据缓冲区 [#6026](https://github.com/ClickHouse/ClickHouse/pull/6026) ([Nikolay](https://github.com/bopohaa)) 请注意，此版本中的 Kafka 有问题。
* 由于 `StorageMergeTree::background_task_handle` 在 `startup()` 中才初始化，`MergeTreeBlockOutputStream::write()` 可能会在它初始化之前尝试使用它。现在会先检查它是否已初始化。[#6080](https://github.com/ClickHouse/ClickHouse/pull/6080) ([Ivan](https://github.com/abyss7))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增官方 `rpm` 包。[#5740](https://github.com/ClickHouse/ClickHouse/pull/5740) ([proller](https://github.com/proller)) ([alesapin](https://github.com/alesapin))
* 新增了通过 `packager` 脚本构建 `.rpm` 和 `.tgz` 包的能力。[#5769](https://github.com/ClickHouse/ClickHouse/pull/5769) ([alesapin](https://github.com/alesapin))
* 修复了 “Arcadia” 构建系统中的相关问题。[#6223](https://github.com/ClickHouse/ClickHouse/pull/6223) ([proller](https://github.com/proller))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* 此版本中的 `Kafka` 无法正常工作。

<div id="clickhouse-release-19-11-3-11-2019-07-18">
  ### ClickHouse 发行版 19.11.3.11，2019-07-18
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增对预处理语句的支持。[#5331](https://github.com/ClickHouse/ClickHouse/pull/5331/) ([Alexander](https://github.com/sanych73)) [#5630](https://github.com/ClickHouse/ClickHouse/pull/5630) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `DoubleDelta` 和 `Gorilla` 列编解码器 [#5600](https://github.com/ClickHouse/ClickHouse/pull/5600) ([Vasily Nemkov](https://github.com/Enmk))
* 新增 `os_thread_priority` 设置，可用于控制查询处理线程的 “nice” 值，操作系统会使用该值调整动态调度优先级。要使其生效，需要 `CAP_SYS_NICE` 能力。此项实现了 [#5858](https://github.com/ClickHouse/ClickHouse/issues/5858) [#5909](https://github.com/ClickHouse/ClickHouse/pull/5909) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 Kafka engine 实现了 `_topic`、`_offset`、`_key` 列 [#5382](https://github.com/ClickHouse/ClickHouse/pull/5382) ([Ivan](https://github.com/abyss7)) 请注意，Kafka 在此版本中无法正常工作。
* 新增聚合函数组合器 `-Resample` [#5590](https://github.com/ClickHouse/ClickHouse/pull/5590) ([hcz](https://github.com/hczhcz))
* 新增聚合函数 `groupArrayMovingSum(win_size)(x)` 和 `groupArrayMovingAvg(win_size)(x)`，可在限制或不限制窗口大小的情况下计算移动和/平均值。[#5595](https://github.com/ClickHouse/ClickHouse/pull/5595) ([inv2004](https://github.com/inv2004))
* 添加别名 `arrayFlatten` \<-> `flatten` [#5764](https://github.com/ClickHouse/ClickHouse/pull/5764) ([hcz](https://github.com/hczhcz))
* 集成了来自 Uber 的 H3 函数 `geoToH3`。[#4724](https://github.com/ClickHouse/ClickHouse/pull/4724) ([Remen Ivan](https://github.com/BHYCHIK)) [#5805](https://github.com/ClickHouse/ClickHouse/pull/5805) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 实现支持异步更新的 DNS 缓存。由单独的线程解析所有主机，并按周期更新 DNS 缓存 (设置 `dns_cache_update_period`) 。当主机 IP 经常变化时，这会有所帮助。[#5857](https://github.com/ClickHouse/ClickHouse/pull/5857) ([Anton Popov](https://github.com/CurtizJ))
* 修复了 `Delta` 编解码器中的段错误问题，该问题会影响值位宽小于 32 位的列。该缺陷会导致随机内存损坏。[#5786](https://github.com/ClickHouse/ClickHouse/pull/5786) ([alesapin](https://github.com/alesapin))
* 修复了块中包含非物理列时生存时间 (TTL) 合并导致的段错误。[#5819](https://github.com/ClickHouse/ClickHouse/pull/5819) ([Anton Popov](https://github.com/CurtizJ))
* 修复了检查包含 `LowCardinality` 列的分片时的一个罕见 bug。此前，`checkDataPart` 在处理包含 `LowCardinality` 列的分片时总是失败。[#5832](https://github.com/ClickHouse/ClickHouse/pull/5832) ([alesapin](https://github.com/alesapin))
* 避免在服务器线程池已满时出现连接挂起。在连接超时时间较长时，这对于来自 `remote` 表函数的连接，或连接到没有副本的分片的连接尤为重要。此修复解决了 [#5878](https://github.com/ClickHouse/ClickHouse/issues/5878) [#5881](https://github.com/ClickHouse/ClickHouse/pull/5881) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 支持为 `evalMLModel` 函数提供常量参数。此修复解决了 [#5817](https://github.com/ClickHouse/ClickHouse/issues/5817) [#5820](https://github.com/ClickHouse/ClickHouse/pull/5820) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 ClickHouse 将默认时区识别为 `UCT` 而非 `UTC` 的问题。此修复解决了 [#5804](https://github.com/ClickHouse/ClickHouse/issues/5804)。[#5828](https://github.com/ClickHouse/ClickHouse/pull/5828) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `visitParamExtractRaw` 中的缓冲区下溢问题。该修复解决了 [#5901](https://github.com/ClickHouse/ClickHouse/issues/5901) [#5902](https://github.com/ClickHouse/ClickHouse/pull/5902) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 现在，分布式 `DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER` 查询将直接在 leader 副本上执行。[#5757](https://github.com/ClickHouse/ClickHouse/pull/5757) ([alesapin](https://github.com/alesapin))
* 修复 `ColumnConst` 与 `ColumnNullable` 组合时 `coalesce` 的问题，并作了相关修改。[#5755](https://github.com/ClickHouse/ClickHouse/pull/5755) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `ReadBufferFromKafkaConsumer`：即使在 `commit()` 之前已发生停滞，也能在 `commit()` 之后继续读取新消息 [#5852](https://github.com/ClickHouse/ClickHouse/pull/5852) ([Ivan](https://github.com/abyss7))
* 修复了在对右表中的 `Nullable` 键进行连接时，`FULL` 和 `RIGHT` JOIN 结果不正确的问题。[#5859](https://github.com/ClickHouse/ClickHouse/pull/5859) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了低优先级查询可能无限休眠的问题。[#5842](https://github.com/ClickHouse/ClickHouse/pull/5842) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个竞态条件，导致执行 `SYSTEM FLUSH LOGS` 查询后，某些查询可能不会出现在 query\_log 中。[#5456](https://github.com/ClickHouse/ClickHouse/issues/5456) [#5685](https://github.com/ClickHouse/ClickHouse/pull/5685) ([Anton Popov](https://github.com/CurtizJ))
* 修复了 ClusterCopier 中的 `heap-use-after-free` ASan 警告，该警告是由于 `watch` 试图使用已被移除的 copier 对象而导致的。 [#5871](https://github.com/ClickHouse/ClickHouse/pull/5871) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了某些 `IColumn::deserializeAndInsertFromArena` 实现返回错误 `StringRef` 指针的问题。该 bug 仅影响单元测试。[#5973](https://github.com/ClickHouse/ClickHouse/pull/5973) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 防止源列和中间 ARRAY JOIN 列遮蔽同名列。[#5941](https://github.com/ClickHouse/ClickHouse/pull/5941) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 MySQL engine 在使用 MySQL 风格的标识符引号时的 insert 和 select 查询问题。[#5704](https://github.com/ClickHouse/ClickHouse/pull/5704) ([Winter Zhang](https://github.com/zhang2014))
* 现在，`CHECK TABLE` 查询已可用于 MergeTree 引擎家族。它会返回每个分片 (对于更简单的引擎则为文件) 的检查状态以及相应消息 (如果有) 。此外，还修复了拉取损坏分片时的 bug。[#5865](https://github.com/ClickHouse/ClickHouse/pull/5865) ([alesapin](https://github.com/alesapin))
* 修复 SPLIT\_SHARED\_LIBRARIES 的运行时问题 [#5793](https://github.com/ClickHouse/ClickHouse/pull/5793) ([Danila Kutenin](https://github.com/danlark1))
* 修复了在 `/etc/localtime` 为类似 `../usr/share/zoneinfo/Asia/Istanbul` 的相对符号链接时的时区初始化问题 [#5922](https://github.com/ClickHouse/ClickHouse/pull/5922) ([alexey-milovidov](https://github.com/alexey-milovidov))
* clickhouse-copier：修复关闭时释放后仍被使用的问题 [#5752](https://github.com/ClickHouse/ClickHouse/pull/5752) ([proller](https://github.com/proller))
* 已更新 `simdjson`。修复了某些包含零字节的无效 JSON 仍可被成功解析的问题。[#5938](https://github.com/ClickHouse/ClickHouse/pull/5938) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 SystemLogs 关闭时的问题 [#5802](https://github.com/ClickHouse/ClickHouse/pull/5802) ([Anton Popov](https://github.com/CurtizJ))
* 修复了当 invalidate\_query 中的条件依赖于字典时发生卡住的问题。[#6011](https://github.com/ClickHouse/ClickHouse/pull/6011) ([Vitaly Baranov](https://github.com/vitlibar))

<div id="improvement">
  #### 改进
</div>

* 允许在集群配置中存在无法解析的地址。它们会被视为不可用，并在每次尝试建立连接时重新解析。这对 Kubernetes 尤其有用。此项修复见 [#5714](https://github.com/ClickHouse/ClickHouse/issues/5714) [#5924](https://github.com/ClickHouse/ClickHouse/pull/5924) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 关闭空闲的 TCP 连接 (默认超时时间为一小时) 。这对于每台服务器上都有多个分布式表的大型集群尤为重要，因为每台服务器都可能与其他所有服务器维持一个连接池，而在查询并发高峰过后，这些连接会处于停滞状态。此修复参见 [#5879](https://github.com/ClickHouse/ClickHouse/issues/5879) [#5880](https://github.com/ClickHouse/ClickHouse/pull/5880) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 改进了 `topK` 函数的效果。调整了 SavingSpace 集合的行为：如果新元素的权重更大，则移除最后一个元素。[#5833](https://github.com/ClickHouse/ClickHouse/issues/5833) [#5850](https://github.com/ClickHouse/ClickHouse/pull/5850) ([Guillaume Tassery](https://github.com/YiuRULE))
* 用于处理域名的 URL 函数现在也支持不带协议的非完整 URL [#5725](https://github.com/ClickHouse/ClickHouse/pull/5725) ([alesapin](https://github.com/alesapin))
* 向 `system.parts_columns` 表中添加了校验和。[#5874](https://github.com/ClickHouse/ClickHouse/pull/5874) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))
* 新增 `Enum` 数据类型，作为 `Enum8` 或 `Enum16` 的别名。[#5886](https://github.com/ClickHouse/ClickHouse/pull/5886) ([dimarub2000](https://github.com/dimarub2000))
* `T64` codec 的完整按位转置变体。配合 `zstd` 时可获得更好的压缩效果。 [#5742](https://github.com/ClickHouse/ClickHouse/pull/5742) ([Artem Zuikov](https://github.com/4ertus2))
* 基于 `startsWith` 函数的条件现在可以利用主键。这修复了 [#5310](https://github.com/ClickHouse/ClickHouse/issues/5310) 和 [#5882](https://github.com/ClickHouse/ClickHouse/issues/5882) [#5919](https://github.com/ClickHouse/ClickHouse/pull/5919) ([dimarub2000](https://github.com/dimarub2000))
* 通过允许数据库名为空，使 `clickhouse-copier` 可用于跨复制集群拓扑。[#5745](https://github.com/ClickHouse/ClickHouse/pull/5745) ([nvartolomei](https://github.com/nvartolomei))
* 在没有 `tzdata` 的系统上 (例如裸 Docker 容器) 默认使用 `UTC` 时区。在此补丁之前，会打印错误消息 `Could not determine local time zone`，并导致 server 或客户端无法启动。[#5827](https://github.com/ClickHouse/ClickHouse/pull/5827) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为保持向后兼容，重新支持了函数 `quantileTiming` 的浮点参数。[#5911](https://github.com/ClickHouse/ClickHouse/pull/5911) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在错误消息中显示缺少列的是哪张表。[#5768](https://github.com/ClickHouse/ClickHouse/pull/5768) ([Ivan](https://github.com/abyss7))
* 禁止不同用户使用相同的 query\_id 执行查询 [#5430](https://github.com/ClickHouse/ClickHouse/pull/5430) ([proller](https://github.com/proller))
* 向 Graphite 发送指标的代码更加稳健，即使在长时间执行多个 `RENAME TABLE` 操作期间也能正常工作。[#5875](https://github.com/ClickHouse/ClickHouse/pull/5875) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 当 ThreadPool 无法调度任务执行时，将显示更详细的错误消息。此修复见 [#5305](https://github.com/ClickHouse/ClickHouse/issues/5305) [#5801](https://github.com/ClickHouse/ClickHouse/pull/5801) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 ngramSearch 取反，使其更直观 [#5807](https://github.com/ClickHouse/ClickHouse/pull/5807) ([Danila Kutenin](https://github.com/danlark1))
* 在 HDFS engine 构建器中添加对用户的解析支持 [#5946](https://github.com/ClickHouse/ClickHouse/pull/5946) ([akonyaev90](https://github.com/akonyaev90))
* 更新 `max_ast_elements 参数` 的默认值 [#5933](https://github.com/ClickHouse/ClickHouse/pull/5933) ([Artem Konovalov](https://github.com/izebit))
* 新增了“已废弃设置”这一概念。已废弃设置 `allow_experimental_low_cardinality_type` 即使使用也不会产生任何效果。[0f15c01c6802f7ce1a1494c12c846be8c98944cd](https://github.com/ClickHouse/ClickHouse/commit/0f15c01c6802f7ce1a1494c12c846be8c98944cd) [Alexey Milovidov](https://github.com/alexey-milovidov)

<div id="performance-improvement">
  #### 性能改进
</div>

* 增加从 Merge 表执行 SELECT 时的流数量，使线程分布更加均匀。新增设置 `max_streams_multiplier_for_merge_tables`。此项修复解决了 [#5797](https://github.com/ClickHouse/ClickHouse/issues/5797) [#5915](https://github.com/ClickHouse/ClickHouse/pull/5915) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 为不同版本 ClickHouse 之间的客户端与服务器交互新增一项向后兼容性测试。[#5868](https://github.com/ClickHouse/ClickHouse/pull/5868) ([alesapin](https://github.com/alesapin))
* 在每次提交和拉取请求中提供测试覆盖率信息。[#5896](https://github.com/ClickHouse/ClickHouse/pull/5896) ([alesapin](https://github.com/alesapin))
* 与 address sanitizer 配合，以支持我们的自定义分配器 (`Arena` 和 `ArenaWithFreeLists`) ，从而更好地调试“释放后使用”错误。 [#5728](https://github.com/ClickHouse/ClickHouse/pull/5728) ([akuzm](https://github.com/akuzm))
* 改用 [LLVM libunwind implementation](https://github.com/llvm-mirror/libunwind) 来进行 C++ 异常处理和打印堆栈跟踪 [#4828](https://github.com/ClickHouse/ClickHouse/pull/4828) ([Nikita Lapkov](https://github.com/laplab))
* 从 -Weverything 中再启用两条警告 [#5923](https://github.com/ClickHouse/ClickHouse/pull/5923) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 支持使用 Memory Sanitizer 构建 ClickHouse。[#3949](https://github.com/ClickHouse/ClickHouse/pull/3949) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了模糊测试中 `bitTest` 函数的 ubsan 报告问题。[#5943](https://github.com/ClickHouse/ClickHouse/pull/5943) ([alexey-milovidov](https://github.com/alexey-milovidov))
* Docker：新增了对需进行身份验证的 ClickHouse 实例进行初始化的功能。[#5727](https://github.com/ClickHouse/ClickHouse/pull/5727) ([Korviakov Andrey](https://github.com/shurshun))
* 将 librdkafka 升级到 1.1.0 版本 [#5872](https://github.com/ClickHouse/ClickHouse/pull/5872) ([Ivan](https://github.com/abyss7))
* 为集成测试添加全局超时，并在测试代码中禁用部分测试。[#5741](https://github.com/ClickHouse/ClickHouse/pull/5741) ([alesapin](https://github.com/alesapin))
* 修复了一些 ThreadSanitizer 相关故障。[#5854](https://github.com/ClickHouse/ClickHouse/pull/5854) ([akuzm](https://github.com/akuzm))
* `--no-undefined` 选项会强制链接器在链接时检查所有外部名称是否都已定义。它对于在 split 构建模式下跟踪库之间的实际依赖关系非常有用。[#5855](https://github.com/ClickHouse/ClickHouse/pull/5855) ([Ivan](https://github.com/abyss7))
* 新增了 [#5797](https://github.com/ClickHouse/ClickHouse/issues/5797) 的性能测试 [#5914](https://github.com/ClickHouse/ClickHouse/pull/5914) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 gcc-7 兼容性问题。[#5840](https://github.com/ClickHouse/ClickHouse/pull/5840) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了对 gcc-9 的支持。此项修复见 [#5717](https://github.com/ClickHouse/ClickHouse/issues/5717) [#5774](https://github.com/ClickHouse/ClickHouse/pull/5774) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 libunwind 可能被错误链接时产生的错误。[#5948](https://github.com/ClickHouse/ClickHouse/pull/5948) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 PVS-Studio 检测出的几项警告。[#5921](https://github.com/ClickHouse/ClickHouse/pull/5921) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了对 `clang-tidy` 静态分析工具的初步支持。[#5806](https://github.com/ClickHouse/ClickHouse/pull/5806) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 BSD/Linux 字节序宏 ('be64toh' 和 'htobe64') 转换为 Mac OS X 的等效版本 [#5785](https://github.com/ClickHouse/ClickHouse/pull/5785) ([Fu Chen](https://github.com/fredchenbj))
* 完善了集成测试指南。[#5796](https://github.com/ClickHouse/ClickHouse/pull/5796) ([Vladimir Chebotarev](https://github.com/excitoon))
* 修复 macOS + gcc9 下的构建问题 [#5822](https://github.com/ClickHouse/ClickHouse/pull/5822) ([filimonov](https://github.com/filimonov))
* 修复一个不易察觉的拼写错误：aggreAGte -> aggregate。 [#5753](https://github.com/ClickHouse/ClickHouse/pull/5753) ([akuzm](https://github.com/akuzm))
* 修复 FreeBSD 构建问题 [#5760](https://github.com/ClickHouse/ClickHouse/pull/5760) ([proller](https://github.com/proller))
* 向网站添加 Experimental YouTube 频道链接 [#5845](https://github.com/ClickHouse/ClickHouse/pull/5845) ([Ivan Blinkov](https://github.com/blinkov))
* CMake：添加覆盖率标志选项：WITH\_COVERAGE [#5776](https://github.com/ClickHouse/ClickHouse/pull/5776) ([proller](https://github.com/proller))
* 修复了一些内联 PODArray 的初始大小问题。 [#5787](https://github.com/ClickHouse/ClickHouse/pull/5787) ([akuzm](https://github.com/akuzm))
* clickhouse-server.postinst：修复对 CentOS 6 的操作系统检测 [#5788](https://github.com/ClickHouse/ClickHouse/pull/5788) ([proller](https://github.com/proller))
* 新增了 Arch Linux 软件包生成功能。[#5719](https://github.com/ClickHouse/ClickHouse/pull/5719) ([Vladimir Chebotarev](https://github.com/excitoon))
* 按库 (dbms) 拆分 Common/config.h [#5715](https://github.com/ClickHouse/ClickHouse/pull/5715) ([proller](https://github.com/proller))
* 修复“Arcadia”构建平台相关问题 [#5795](https://github.com/ClickHouse/ClickHouse/pull/5795) ([proller](https://github.com/proller))
* 修复非常规构建 (gcc9、无子模块) 相关问题 [#5792](https://github.com/ClickHouse/ClickHouse/pull/5792) ([proller](https://github.com/proller))
* 要求在 `unalignedStore` 中显式指定类型，因为这已被证明容易引发 bug [#5791](https://github.com/ClickHouse/ClickHouse/pull/5791) ([akuzm](https://github.com/akuzm))
* 修复 macOS 构建 [#5830](https://github.com/ClickHouse/ClickHouse/pull/5830) ([filimonov](https://github.com/filimonov))
* 按此处请求，对更大数据集上的新 JIT 功能进行了性能测试 [#5263](https://github.com/ClickHouse/ClickHouse/issues/5263) [#5887](https://github.com/ClickHouse/ClickHouse/pull/5887) ([Guillaume Tassery](https://github.com/YiuRULE))
* 在压力测试中运行有状态测试 [12693e568722f11e19859742f56428455501fd2a](https://github.com/ClickHouse/ClickHouse/commit/12693e568722f11e19859742f56428455501fd2a) ([alesapin](https://github.com/alesapin))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* `Kafka` 在此版本中不可用。
* 默认对新的 `MergeTree` 表启用 `adaptive_index_granularity` = 10MB。如果你在 19.11+ 版本中创建了新的 MergeTree 表，将无法降级到 19.6 之前的版本。[#5628](https://github.com/ClickHouse/ClickHouse/pull/5628) ([alesapin](https://github.com/alesapin))
* 移除了 Yandex.Metrica 使用的、已废弃且未文档说明的嵌入式字典。函数 `OSIn`、`SEIn`、`OSToRoot`、`SEToRoot`、`OSHierarchy`、`SEHierarchy` 已不再可用。如果你正在使用这些函数，请发送电子邮件至 [clickhouse-feedback@yandex-team.com](mailto:clickhouse-feedback@yandex-team.com)。注意：在最后时刻，我们决定暂时继续保留这些函数。[#5780](https://github.com/ClickHouse/ClickHouse/pull/5780) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-10">
  ## ClickHouse 19.10 发行版
</div>

<div id="clickhouse-release-19-10-1-5-2019-07-12">
  ### ClickHouse 发行版 19.10.1.5，2019-07-12
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增列编解码器：`T64`。专为 (U)IntX/EnumX/Data(Time)/DecimalX 列设计，适用于值恒定或取值范围较小的列。该编解码器支持在无需重新压缩的情况下扩大或缩小数据类型。[#5557](https://github.com/ClickHouse/ClickHouse/pull/5557) ([Artem Zuikov](https://github.com/4ertus2))
* 新增数据库引擎 `MySQL`，可查看远程 MySQL 服务器上的所有表 [#5599](https://github.com/ClickHouse/ClickHouse/pull/5599) ([Winter Zhang](https://github.com/zhang2014))
* 实现了 `bitmapContains`。如果第二个 bitmap 只包含一个元素，它的速度比 `bitmapHasAny` 快 2 倍。[#5535](https://github.com/ClickHouse/ClickHouse/pull/5535) ([Zhichang Yu](https://github.com/yuzhichang))
* 支持 `crc32` 函数 (其行为与 MySQL 或 PHP 中完全一致) 。如果你需要的是哈希函数，请不要使用它。[#5661](https://github.com/ClickHouse/ClickHouse/pull/5661) ([Remen Ivan](https://github.com/BHYCHIK))
* 实现了 `SYSTEM START/STOP DISTRIBUTED SENDS` 查询，用于控制向 `Distributed` 表的异步插入。[#4935](https://github.com/ClickHouse/ClickHouse/pull/4935) ([Winter Zhang](https://github.com/zhang2014))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 在执行变更时，merge 限制将忽略查询执行限制和 max parts size。 [#5659](https://github.com/ClickHouse/ClickHouse/pull/5659) ([Anton Popov](https://github.com/CurtizJ))
* 修复了一个缺陷：该问题可能导致普通块被去重 (极其罕见) ，以及重复块被插入 (更常见) 。 [#5549](https://github.com/ClickHouse/ClickHouse/pull/5549) ([alesapin](https://github.com/alesapin))
* 修复了函数 `arrayEnumerateUniqRanked` 在参数为空数组时的问题 [#5559](https://github.com/ClickHouse/ClickHouse/pull/5559) ([proller](https://github.com/proller))
* 不再订阅无意拉取任何消息的 Kafka topic。 [#5698](https://github.com/ClickHouse/ClickHouse/pull/5698) ([Ivan](https://github.com/abyss7))
* 使设置 `join_use_nulls` 对无法包含在 Nullable 中的类型不生效 [#5700](https://github.com/ClickHouse/ClickHouse/pull/5700) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了 `Incorrect size of index granularity` 错误 [#5720](https://github.com/ClickHouse/ClickHouse/pull/5720) ([coraxster](https://github.com/coraxster))
* 修复了 Float 转 Decimal 时的溢出问题 [#5607](https://github.com/ClickHouse/ClickHouse/pull/5607) ([coraxster](https://github.com/coraxster))
* 在调用 `WriteBufferFromHDFS` 的析构函数时刷新 buffer。这修复了向 `HDFS` 写入的问题。 [#5684](https://github.com/ClickHouse/ClickHouse/pull/5684) ([Xindong Peng](https://github.com/eejoin))

<div id="improvement">
  #### 改进
</div>

* 启用设置 `input_format_defaults_for_omitted_fields` 时，将 `CSV` 中的空单元格视为默认值。[#5625](https://github.com/ClickHouse/ClickHouse/pull/5625) ([akuzm](https://github.com/akuzm))
* 以非阻塞方式加载外部字典。[#5567](https://github.com/ClickHouse/ClickHouse/pull/5567) ([Vitaly Baranov](https://github.com/vitlibar))
* 已建立的连接可根据设置动态调整网络超时。[#4558](https://github.com/ClickHouse/ClickHouse/pull/4558) ([Konstantin Podshumok](https://github.com/podshumok))
* 函数 `firstSignificantSubdomain` 和 `cutToFirstSignificantSubdomain` 使用 "public\_suffix\_list"。它使用由 `gperf` 生成的完美哈希表，列表来自以下文件：[https://publicsuffix.org/list/public\&#95;suffix\&#95;list.dat。](https://publicsuffix.org/list/public\&#95;suffix\&#95;list.dat。) (例如，现在我们会将域 `ac.uk` 识别为非显著域) 。[#5030](https://github.com/ClickHouse/ClickHouse/pull/5030) ([Guillaume Tassery](https://github.com/YiuRULE))
* 在系统表中采用 `IPv6` 数据类型；统一了 `system.processes` 和 `system.query_log` 中的客户端信息列。[#5640](https://github.com/ClickHouse/ClickHouse/pull/5640) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 对使用 MySQL 兼容协议的连接使用会话。#5476 [#5646](https://github.com/ClickHouse/ClickHouse/pull/5646) ([Yuriy Baranov](https://github.com/yurriy))
* 支持更多带 `ON CLUSTER` 的 `ALTER` 查询。[#5593](https://github.com/ClickHouse/ClickHouse/pull/5593) [#5613](https://github.com/ClickHouse/ClickHouse/pull/5613) ([sundyli](https://github.com/sundy-li))
* 在 `clickhouse-local` 配置文件中支持 `<logger>` 节。[#5540](https://github.com/ClickHouse/ClickHouse/pull/5540) ([proller](https://github.com/proller))
* 允许在 `clickhouse-local` 中使用 `remote` 表函数运行查询。[#5627](https://github.com/ClickHouse/ClickHouse/pull/5627) ([proller](https://github.com/proller))

<div id="performance-improvement">
  #### 性能改进
</div>

* 新增了在 MergeTree 列末尾写入最终标记的功能。这样可避免对超出表数据范围的键进行无效读取。仅在使用自适应索引粒度时启用。[#5624](https://github.com/ClickHouse/ClickHouse/pull/5624) ([alesapin](https://github.com/alesapin))
* 通过减少 `stat` 系统调用次数，提升了 MergeTree 表在非常慢的文件系统上的性能。[#5648](https://github.com/ClickHouse/ClickHouse/pull/5648) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从 MergeTree 表读取数据时的性能下降问题，该问题是在 19.6 版本中引入的。修复了 #5631。[#5633](https://github.com/ClickHouse/ClickHouse/pull/5633) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 实现了 `TestKeeper`，作为测试中使用的 ZooKeeper 接口实现 [#5643](https://github.com/ClickHouse/ClickHouse/pull/5643) ([alexey-milovidov](https://github.com/alexey-milovidov)) ([levushkin aleksej](https://github.com/alexey-milovidov))
* 从现在起，`.sql` 测试可以按服务器隔离、并行运行，并使用随机 database。这样既能加快运行速度，也能添加带有自定义服务器配置的新测试，并确保不同测试之间互不影响。 [#5554](https://github.com/ClickHouse/ClickHouse/pull/5554) ([Ivan](https://github.com/abyss7))
* 从性能测试中移除了 `<name>` 和 `<metrics>` [#5672](https://github.com/ClickHouse/ClickHouse/pull/5672) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了适用于 `Pretty` format 的 "select\_format" 性能测试 [#5642](https://github.com/ClickHouse/ClickHouse/pull/5642) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-9">
  ## ClickHouse 19.9 发行版发布
</div>

<div id="clickhouse-release-19-9-3-31-2019-07-05">
  ### ClickHouse 发行版 19.9.3.31，2019-07-05
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 Delta 编解码器中的段错误，该问题会影响值大小小于 32 位的列，并导致随机内存损坏。[#5786](https://github.com/ClickHouse/ClickHouse/pull/5786) ([alesapin](https://github.com/alesapin))
* 修复了检查带有 LowCardinality 列的分片时出现的一个罕见缺陷。[#5832](https://github.com/ClickHouse/ClickHouse/pull/5832) ([alesapin](https://github.com/alesapin))
* 修复了在块中包含非物理列时，TTL 合并过程中的段错误。[#5819](https://github.com/ClickHouse/ClickHouse/pull/5819) ([Anton Popov](https://github.com/CurtizJ))
* 修复了低优先级查询可能无限休眠的潜在问题。[#5842](https://github.com/ClickHouse/ClickHouse/pull/5842) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 ClickHouse 将默认时区识别为 UCT 而非 UTC 的问题。[#5828](https://github.com/ClickHouse/ClickHouse/pull/5828) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个缺陷：分布式执行的 DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER 查询会先在 follower 副本上执行，而不是在 leader 副本上执行。现在这些查询将直接在 leader 副本上执行。[#5757](https://github.com/ClickHouse/ClickHouse/pull/5757) ([alesapin](https://github.com/alesapin))
* 修复了一个竞态条件：执行 SYSTEM FLUSH LOGS 查询后，某些查询可能不会立即出现在 query\_log 中。[#5685](https://github.com/ClickHouse/ClickHouse/pull/5685) ([Anton Popov](https://github.com/CurtizJ))
* 为 `evalMLModel` 函数补充了对常量参数的支持。[#5820](https://github.com/ClickHouse/ClickHouse/pull/5820) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-9-2-4-2019-06-24">
  ### ClickHouse 发行版 19.9.2.4，2019-06-24
</div>

<div id="new-feature">
  #### 新功能
</div>

* 在 `system.parts` 表中输出有关冻结 parts 的信息。[#5471](https://github.com/ClickHouse/ClickHouse/pull/5471) ([proller](https://github.com/proller))
* 如果未在参数中设置密码，则在 tty 上启动 clickhouse-client 时提示输入客户端密码 [#5092](https://github.com/ClickHouse/ClickHouse/pull/5092) ([proller](https://github.com/proller))
* 为 Decimal 类型实现 `dictGet` 和 `dictGetOrDefault` 函数。[#5394](https://github.com/ClickHouse/ClickHouse/pull/5394) ([Artem Zuikov](https://github.com/4ertus2))

<div id="improvement">
  #### 改进
</div>

* Debian init：添加服务停止超时设置 [#5522](https://github.com/ClickHouse/ClickHouse/pull/5522) ([proller](https://github.com/proller))
* 新增一项设置，默认禁止创建包含可疑 LowCardinality 类型的表 [#5448](https://github.com/ClickHouse/ClickHouse/pull/5448) ([Olga Khvostikova](https://github.com/stavrolia))
* 当未在函数 `evalMLMethod` 中作为 State 使用时，回归函数将返回模型权重。 [#5411](https://github.com/ClickHouse/ClickHouse/pull/5411) ([Quid37](https://github.com/Quid37))
* 重命名并改进回归方法。 [#5492](https://github.com/ClickHouse/ClickHouse/pull/5492) ([Quid37](https://github.com/Quid37))
* 让字符串搜索器的接口更清晰。 [#5586](https://github.com/ClickHouse/ClickHouse/pull/5586) ([Danila Kutenin](https://github.com/danlark1))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复 Kafka 中可能发生的数据丢失问题 [#5445](https://github.com/ClickHouse/ClickHouse/pull/5445) ([Ivan](https://github.com/abyss7))
* 修复 `PrettySpace` 格式在以零列调用时可能陷入无限循环的问题 [#5560](https://github.com/ClickHouse/ClickHouse/pull/5560) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了线性模型中的 UInt32 溢出问题。允许在模型 argument 非常量时对 ML 模型执行 eval。 [#5516](https://github.com/ClickHouse/ClickHouse/pull/5516) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* `ALTER TABLE ... DROP INDEX IF EXISTS ...` 在指定的索引不存在时不应抛出异常 [#5524](https://github.com/ClickHouse/ClickHouse/pull/5524) ([Gleb Novikov](https://github.com/NanoBjorn))
* 修复标量子查询中 `bitmapHasAny` 引发的段错误 [#5528](https://github.com/ClickHouse/ClickHouse/pull/5528) ([Zhichang Yu](https://github.com/yuzhichang))
* 修复了一个错误：即使 DNS 缓存已清除，复制连接池在解析主机时也不会重试。[#5534](https://github.com/ClickHouse/ClickHouse/pull/5534) ([alesapin](https://github.com/alesapin))
* 修复了 ReplicatedMergeTree 中的 `ALTER ... MODIFY TTL` 问题。[#5539](https://github.com/ClickHouse/ClickHouse/pull/5539) ([Anton Popov](https://github.com/CurtizJ))
* 修复向带有 MATERIALIZED 列的 Distributed 表中执行 INSERT 时的问题 [#5429](https://github.com/ClickHouse/ClickHouse/pull/5429) ([Azat Khuzhin](https://github.com/azat))
* 修复 TRUNCATE Join 存储时出现 bad alloc 的问题 [#5437](https://github.com/ClickHouse/ClickHouse/pull/5437) ([TCeason](https://github.com/TCeason))
* 在 tzdata 软件包的较新版本中，部分文件现在是符号链接。当前检测默认时区的机制因此会失效，并为某些时区返回错误的名称。现在，至少在提供了 `TZ` 时，我们会强制将时区名称设为 `TZ` 的内容。[#5443](https://github.com/ClickHouse/ClickHouse/pull/5443) ([Ivan](https://github.com/abyss7))
* 修复了 MultiVolnitsky 搜索器中的一些极其罕见的问题：当常量 needle 的总长度至少为 16KB 时，算法可能会漏掉或覆盖先前的结果，从而导致 `multiSearchAny` 返回错误结果。[#5588](https://github.com/ClickHouse/ClickHouse/pull/5588) ([Danila Kutenin](https://github.com/danlark1))
* 修复了 ExternalData 请求中的设置无法使用 ClickHouse 设置的问题。此外，由于名称存在歧义，当前还无法使用设置 `date_time_input_format` 和 `low_cardinality_allow_in_native_format` (在外部数据中，它可能会被解释为表格式；而在查询中，它又可能是一个设置项) 。[#5455](https://github.com/ClickHouse/ClickHouse/pull/5455) ([Danila Kutenin](https://github.com/danlark1))
* 修复了这样一个 bug：当 parts 仅从 FS 中移除、而未从 Zookeeper 中删除时，会出现问题。[#5520](https://github.com/ClickHouse/ClickHouse/pull/5520) ([alesapin](https://github.com/alesapin))
* 移除 MySQL 协议中的调试日志 [#5478](https://github.com/ClickHouse/ClickHouse/pull/5478) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在 DDL 查询处理过程中跳过 ZNONODE [#5489](https://github.com/ClickHouse/ClickHouse/pull/5489) ([Azat Khuzhin](https://github.com/azat))
* 修复混用 `UNION ALL` 时结果列类型的问题。此前在某些情况下，结果列的数据与列类型会不一致。[#5503](https://github.com/ClickHouse/ClickHouse/pull/5503) ([Artem Zuikov](https://github.com/4ertus2))
* 在 `dictGetT` 函数中，遇到错误的整数值时会抛出异常，而不是崩溃。[#5446](https://github.com/ClickHouse/ClickHouse/pull/5446) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `system.dictionaries` 表中哈希字典的 element\_count 和 load\_factor 错误。 [#5440](https://github.com/ClickHouse/ClickHouse/pull/5440) ([Azat Khuzhin](https://github.com/azat))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 修复了在禁用 `Brotli` HTTP 压缩支持时的构建问题 (`ENABLE_BROTLI=OFF` cmake 变量) 。[#5521](https://github.com/ClickHouse/ClickHouse/pull/5521) ([Anton Yuzhaninov](https://github.com/citrin))
* 将 roaring.h 以 roaring/roaring.h 的形式包含 [#5523](https://github.com/ClickHouse/ClickHouse/pull/5523) ([Orivej Desh](https://github.com/orivej))
* 修复了 hyperscan 中的 gcc9 警告 (#line 指令太坑人了！) [#5546](https://github.com/ClickHouse/ClickHouse/pull/5546) ([Danila Kutenin](https://github.com/danlark1))
* 修复了使用 gcc-9 编译时的所有警告，修复了一些 contrib 问题，修复了 gcc9 ICE 并将其提交到 bugzilla。[#5498](https://github.com/ClickHouse/ClickHouse/pull/5498) ([Danila Kutenin](https://github.com/danlark1))
* 修复了与 lld 链接时的问题 [#5477](https://github.com/ClickHouse/ClickHouse/pull/5477) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 移除了字典中未使用的特化实现 [#5452](https://github.com/ClickHouse/ClickHouse/pull/5452) ([Artem Zuikov](https://github.com/4ertus2))
* 改进了针对不同文件类型表的格式化和解析的性能测试 [#5497](https://github.com/ClickHouse/ClickHouse/pull/5497) ([Olga Khvostikova](https://github.com/stavrolia))
* 修复了并行运行测试时的问题 [#5506](https://github.com/ClickHouse/ClickHouse/pull/5506) ([proller](https://github.com/proller))
* Docker：使用来自 clickhouse-test 的配置 [#5531](https://github.com/ClickHouse/ClickHouse/pull/5531) ([proller](https://github.com/proller))
* 修复了在 FreeBSD 上的编译问题 [#5447](https://github.com/ClickHouse/ClickHouse/pull/5447) ([proller](https://github.com/proller))
* 将 boost 升级到 1.70 [#5570](https://github.com/ClickHouse/ClickHouse/pull/5570) ([proller](https://github.com/proller))
* 修复了将 clickhouse 作为子模块进行构建时的问题 [#5574](https://github.com/ClickHouse/ClickHouse/pull/5574) ([proller](https://github.com/proller))
* 改进了 JSONExtract 的性能测试 [#5444](https://github.com/ClickHouse/ClickHouse/pull/5444) ([Vitaly Baranov](https://github.com/vitlibar))

<div id="clickhouse-release-19-8">
  ## ClickHouse 发行版 19.8
</div>

<div id="clickhouse-release-19-8-3-8-2019-06-11">
  ### ClickHouse 发行版 19.8.3.8，2019-06-11
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增了用于处理 JSON 的函数 [#4686](https://github.com/ClickHouse/ClickHouse/pull/4686) ([hcz](https://github.com/hczhcz)) [#5124](https://github.com/ClickHouse/ClickHouse/pull/5124)。 ([Vitaly Baranov](https://github.com/vitlibar))
* 新增函数 basename，其行为与许多语言中的 basename 函数类似 (如 Python 中的 `os.path.basename`、PHP 中的 `basename` 等) 。同时支持类 UNIX path 和 Windows path。[#5136](https://github.com/ClickHouse/ClickHouse/pull/5136) ([Guillaume Tassery](https://github.com/YiuRULE))
* 新增 `LIMIT n, m BY` 或 `LIMIT m OFFSET n BY` 语法，用于为 LIMIT BY 子句设置 n 的偏移量。[#5138](https://github.com/ClickHouse/ClickHouse/pull/5138) ([Anton Popov](https://github.com/CurtizJ))
* 新增了数据类型 `SimpleAggregateFunction`，支持在 `AggregatingMergeTree` 中使用轻量聚合列。它只能与 `any`、`anyLast`、`sum`、`min`、`max` 等简单函数配合使用。[#4629](https://github.com/ClickHouse/ClickHouse/pull/4629) ([Boris Granveaud](https://github.com/bgranvea))
* 新增了对函数 `ngramDistance` 中非常量参数的支持 [#5198](https://github.com/ClickHouse/ClickHouse/pull/5198) ([Danila Kutenin](https://github.com/danlark1))
* 新增函数 `skewPop`、`skewSamp`、`kurtPop` 和 `kurtSamp`，分别用于计算总体偏度、样本偏度、峰度和样本峰度。[#5200](https://github.com/ClickHouse/ClickHouse/pull/5200) ([hcz](https://github.com/hczhcz))
* 支持重命名 `MaterializeView` 存储。[#5209](https://github.com/ClickHouse/ClickHouse/pull/5209) ([Guillaume Tassery](https://github.com/YiuRULE))
* 新增了一个支持通过 MySQL 客户端连接到 ClickHouse 的 server。[#4715](https://github.com/ClickHouse/ClickHouse/pull/4715) ([Yuriy Baranov](https://github.com/yurriy))
* 新增 `toDecimal*OrZero` 和 `toDecimal*OrNull` 函数。[#5291](https://github.com/ClickHouse/ClickHouse/pull/5291) ([Artem Zuikov](https://github.com/4ertus2))
* 函数 `quantile`、`quantiles`、`median`、`quantileExactWeighted`、`quantilesExactWeighted`、medianExactWeighted 现已支持 Decimal 类型。[#5304](https://github.com/ClickHouse/ClickHouse/pull/5304) ([Artem Zuikov](https://github.com/4ertus2))
* 新增了 `toValidUTF8` 函数，可将所有无效的 UTF-8 字符替换为替换字符 � (U+FFFD)。 [#5322](https://github.com/ClickHouse/ClickHouse/pull/5322) ([Danila Kutenin](https://github.com/danlark1))
* 新增了 `format` 函数。可使用参数中列出的字符串对常量模式 (简化版 Python format 模式) 进行格式化。[#5330](https://github.com/ClickHouse/ClickHouse/pull/5330) ([Danila Kutenin](https://github.com/danlark1))
* 新增了 `system.detached_parts` 表，其中包含有关 `MergeTree` 表中 detached parts 的信息。[#5353](https://github.com/ClickHouse/ClickHouse/pull/5353) ([akuzm](https://github.com/akuzm))
* 添加了 `ngramSearch` 函数，用于计算 needle 与 haystack 之间的非对称差。[#5418](https://github.com/ClickHouse/ClickHouse/pull/5418)[#5422](https://github.com/ClickHouse/ClickHouse/pull/5422) ([Danila Kutenin](https://github.com/danlark1))
* 通过聚合函数接口实现了基础机器学习方法 (随机线性回归和逻辑回归) 。支持多种模型权重更新策略 (简单梯度下降、动量法、Nesterov 方法) ，还支持自定义大小的小批次。[#4943](https://github.com/ClickHouse/ClickHouse/pull/4943) ([Quid37](https://github.com/Quid37))
* 新增了 `geohashEncode` 和 `geohashDecode` 函数。[#5003](https://github.com/ClickHouse/ClickHouse/pull/5003) ([Vasily Nemkov](https://github.com/Enmk))
* 新增聚合函数 `timeSeriesGroupSum`，可对样本时间戳不对齐的不同时间序列进行聚合。它会在两个样本时间戳之间使用线性插值，然后将各个时间序列求和。新增聚合函数 `timeSeriesGroupRateSum`，用于计算时间序列的速率，并将各个速率求和。[#4542](https://github.com/ClickHouse/ClickHouse/pull/4542) ([Yangkuan Liu](https://github.com/LiuYangkuan))
* 新增了函数 `IPv4CIDRtoIPv4Range` 和 `IPv6CIDRtoIPv6Range`，用于根据 CIDR 计算子网中某个 IP 的下界和上界。[#5095](https://github.com/ClickHouse/ClickHouse/pull/5095) ([Guillaume Tassery](https://github.com/YiuRULE))
* 当通过 HTTP 发送查询并启用设置 `send_progress_in_http_headers` 时，新增 X-ClickHouse-Summary 请求头。它会返回 X-ClickHouse-Progress 的常规信息，并附带额外信息，例如该查询插入了多少行和多少字节。[#5116](https://github.com/ClickHouse/ClickHouse/pull/5116) ([Guillaume Tassery](https://github.com/YiuRULE))

<div id="improvement">
  #### 改进
</div>

* 为 MergeTree 家族表新增了 `max_parts_in_total` 设置 (默认值：100 000) ，用于防止以不安全的方式指定分区键 #5166。[#5171](https://github.com/ClickHouse/ClickHouse/pull/5171) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `clickhouse-obfuscator`：通过将初始 seed 与列名而非列位置组合，为各列派生 seed。此举旨在转换包含多个相关表的数据集，从而使这些表在转换后仍可进行 JOIN。[#5178](https://github.com/ClickHouse/ClickHouse/pull/5178) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了函数 `JSONExtractRaw`、`JSONExtractKeyAndValues`。将函数 `jsonExtract<type>` 重命名为 `JSONExtract<type>`。当出现问题时，这些函数会返回相应的值，而不是 `NULL`。修改了函数 `JSONExtract`，现在它会从最后一个参数获取返回类型，且不再注入 `Nullable`。实现了在 AVX2 指令不可用时回退到 RapidJSON。Simdjson 库已更新到新版本。[#5235](https://github.com/ClickHouse/ClickHouse/pull/5235) ([Vitaly Baranov](https://github.com/vitlibar))
* 现在，`if` 和 `multiIf` 函数不再取决于条件的 `Nullable`，而是出于 SQL 兼容性考虑，取决于各分支。 [#5238](https://github.com/ClickHouse/ClickHouse/pull/5238) ([Jian Wu](https://github.com/janplus))
* `In` 谓词现在会像 `Equal` 函数一样，对 `Null` 输入返回 `Null` 结果。[#5152](https://github.com/ClickHouse/ClickHouse/pull/5152) ([Jian Wu](https://github.com/janplus))
* 每从 Kafka 读取 (flush\_interval / poll\_timeout) 行数据，就检查一次时间限制。这样可以更频繁地中断 Kafka 消费者的读取过程，并检查顶层流的时间限制 [#5249](https://github.com/ClickHouse/ClickHouse/pull/5249) ([Ivan](https://github.com/abyss7))
* 将 rdkafka 与内置的 SASL 链接。这样即可使用 SASL SCRAM 身份验证 [#5253](https://github.com/ClickHouse/ClickHouse/pull/5253) ([Ivan](https://github.com/abyss7))
* 为所有 JOIN 提供了 RowRefList 的批次版本。[#5267](https://github.com/ClickHouse/ClickHouse/pull/5267) ([Artem Zuikov](https://github.com/4ertus2))
* clickhouse-server：监听错误消息提供了更多信息。 [#5268](https://github.com/ClickHouse/ClickHouse/pull/5268) ([proller](https://github.com/proller))
* 支持在 clickhouse-copier 的 `<sharding_key>` 函数中使用字典 [#5270](https://github.com/ClickHouse/ClickHouse/pull/5270) ([proller](https://github.com/proller))
* 新增设置 `kafka_commit_every_batch`，用于控制 Kafka 的提交策略。
  它支持设置提交模式：每处理完一个消息批次后提交，或在整个块写入存储后再提交。这是在某些极端情况下丢失部分消息与重复读取消息之间做出的权衡。[#5308](https://github.com/ClickHouse/ClickHouse/pull/5308) ([Ivan](https://github.com/abyss7))
* 让 `windowFunnel` 支持其他无符号整数类型。[#5320](https://github.com/ClickHouse/ClickHouse/pull/5320) ([sundyli](https://github.com/sundy-li))
* 允许在 Merge 引擎中遮蔽虚拟列 `_table`。[#5325](https://github.com/ClickHouse/ClickHouse/pull/5325) ([Ivan](https://github.com/abyss7))
* 为 `sequenceMatch` 聚合函数增加对其他无符号整数类型的支持 [#5339](https://github.com/ClickHouse/ClickHouse/pull/5339) ([sundyli](https://github.com/sundy-li))
* 如果校验和不匹配很可能是由硬件故障引起的，错误信息会更明确。[#5355](https://github.com/ClickHouse/ClickHouse/pull/5355) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 检查底层表是否支持 `StorageMerge` 的采样 [#5366](https://github.com/ClickHouse/ClickHouse/pull/5366) ([Ivan](https://github.com/abyss7))
* 在外部字典中使用完 MySQL 连接后关闭连接。这与问题 #893 相关。[#5395](https://github.com/ClickHouse/ClickHouse/pull/5395) ([Clément Rodriguez](https://github.com/clemrodriguez))
* 改进了 MySQL wire 协议。将格式名称改为 MySQLWire。使用 RAII 调用 RSA\_free。若无法创建 SSL 上下文，则禁用 SSL。[#5419](https://github.com/ClickHouse/ClickHouse/pull/5419) ([Yuriy Baranov](https://github.com/yurriy))
* clickhouse-client：允许在历史文件无法访问时运行 (只读、磁盘空间不足、文件是目录等) 。[#5431](https://github.com/ClickHouse/ClickHouse/pull/5431) ([proller](https://github.com/proller))
* 在向分布式表进行异步 INSERT 时遵循查询设置。[#4936](https://github.com/ClickHouse/ClickHouse/pull/4936) ([TCeason](https://github.com/TCeason))
* 将函数 `leastSqr` 重命名为 `simpleLinearRegression`，`LinearRegression` 重命名为 `linearRegression`，`LogisticRegression` 重命名为 `logisticRegression`。[#5391](https://github.com/ClickHouse/ClickHouse/pull/5391) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="performance-improvement">
  #### 性能改进
</div>

* 在 ALTER MODIFY 查询中，支持并行处理非复制的 MergeTree 表的 parts。 [#4639](https://github.com/ClickHouse/ClickHouse/pull/4639) ([Ivan Kush](https://github.com/IvanKush))
* 优化了正则表达式提取。 [#5193](https://github.com/ClickHouse/ClickHouse/pull/5193) [#5191](https://github.com/ClickHouse/ClickHouse/pull/5191) ([Danila Kutenin](https://github.com/danlark1))
* 如果右侧 join 键列仅在 JOIN ON 子句中使用，则不再将其添加到 JOIN 结果中。 [#5260](https://github.com/ClickHouse/ClickHouse/pull/5260) ([Artem Zuikov](https://github.com/4ertus2))
* 在首次收到空响应后冻结 Kafka 缓冲区。这可以避免在某些行解析流中对空结果多次调用 `ReadBuffer::next()`。 [#5283](https://github.com/ClickHouse/ClickHouse/pull/5283) ([Ivan](https://github.com/abyss7))
* 优化了 `concat` 函数在多个参数场景下的性能。 [#5357](https://github.com/ClickHouse/ClickHouse/pull/5357) ([Danila Kutenin](https://github.com/danlark1))
* 查询优化：在将 comma/cross join 重写为 inner join 时，允许下推 IN 语句。 [#5396](https://github.com/ClickHouse/ClickHouse/pull/5396) ([Artem Zuikov](https://github.com/4ertus2))
* 将我们的 LZ4 实现升级为参考实现，以获得更快的解压缩速度。 [#5070](https://github.com/ClickHouse/ClickHouse/pull/5070) ([Danila Kutenin](https://github.com/danlark1))
* 实现了 MSD 基数排序 (基于 kxsort) 以及部分排序。 [#5129](https://github.com/ClickHouse/ClickHouse/pull/5129) ([Evgenii Pravda](https://github.com/kvinty))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 join 与 push require columns 一起使用时的问题 [#5192](https://github.com/ClickHouse/ClickHouse/pull/5192) ([Winter Zhang](https://github.com/zhang2014))
* 修复了一个问题：当 ClickHouse 由 systemd 运行时，命令 `sudo service clickhouse-server forcerestart` 无法按预期工作。[#5204](https://github.com/ClickHouse/ClickHouse/pull/5204) ([proller](https://github.com/proller))
* 修复了 DataPartsExchange 中的 HTTP 错误码问题 (9009 端口上的 interserver HTTP server 即使发生错误时也始终返回 200) 。[#5216](https://github.com/ClickHouse/ClickHouse/pull/5216) ([proller](https://github.com/proller))
* 修复了 String 长度超过 MAX\_SMALL\_STRING\_SIZE 时的 SimpleAggregateFunction 问题 [#5311](https://github.com/ClickHouse/ClickHouse/pull/5311) ([Azat Khuzhin](https://github.com/azat))
* 修复了 IN 中 `Decimal` 转换为 `Nullable(Decimal)` 时的报错问题。现已支持其他 Decimal 到 Decimal 的转换 (包括不同标度) 。[#5350](https://github.com/ClickHouse/ClickHouse/pull/5350) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 simdjson 库中的 FPU clobbering 问题，该问题会导致 `uniqHLL`、`uniqCombined` 聚合函数以及 `log` 等数学函数计算错误。[#5354](https://github.com/ClickHouse/ClickHouse/pull/5354) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 JSON 函数中 const/nonconst 混合场景的处理问题。[#5435](https://github.com/ClickHouse/ClickHouse/pull/5435) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了 `retention` 函数。现在，数据行中所有满足条件的项都会被加入数据状态中。[#5119](https://github.com/ClickHouse/ClickHouse/pull/5119) ([小路](https://github.com/nicelulu))
* 修复了 `quantileExact` 处理 Decimal 时的结果类型问题。[#5304](https://github.com/ClickHouse/ClickHouse/pull/5304) ([Artem Zuikov](https://github.com/4ertus2))

<div id="documentation">
  #### 文档
</div>

* 将 `CollapsingMergeTree` 文档翻译成中文。[#5168](https://github.com/ClickHouse/ClickHouse/pull/5168) ([张风啸](https://github.com/AlexZFX))
* 将部分表引擎相关文档翻译成中文。
  [#5134](https://github.com/ClickHouse/ClickHouse/pull/5134)
  [#5328](https://github.com/ClickHouse/ClickHouse/pull/5328)
  ([never lee](https://github.com/neverlee))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 修复了一些 sanitizer 报告中提示的疑似释放后使用问题。[#5139](https://github.com/ClickHouse/ClickHouse/pull/5139) [#5143](https://github.com/ClickHouse/ClickHouse/pull/5143) [#5393](https://github.com/ClickHouse/ClickHouse/pull/5393) ([Ivan](https://github.com/abyss7))
* 为方便起见，不再将性能测试放在单独的目录中。[#5158](https://github.com/ClickHouse/ClickHouse/pull/5158) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复有误的性能测试。[#5255](https://github.com/ClickHouse/ClickHouse/pull/5255) ([alesapin](https://github.com/alesapin))
* 添加了一个工具，用于计算由位翻转导致的校验和，以便调试硬件问题。[#5334](https://github.com/ClickHouse/ClickHouse/pull/5334) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 让 runner 脚本更易用。[#5340](https://github.com/ClickHouse/ClickHouse/pull/5340)[#5360](https://github.com/ClickHouse/ClickHouse/pull/5360) ([filimonov](https://github.com/filimonov))
* 添加了一份关于如何编写性能测试的简要说明。[#5408](https://github.com/ClickHouse/ClickHouse/pull/5408) ([alesapin](https://github.com/alesapin))
* 新增了在性能测试中对 CREATE、fill 和 drop 查询进行替换的能力 [#5367](https://github.com/ClickHouse/ClickHouse/pull/5367) ([Olga Khvostikova](https://github.com/stavrolia))

<div id="clickhouse-release-19-7">
  ## ClickHouse 发行版 19.7
</div>

<div id="clickhouse-release-19-7-5-29-2019-07-05">
  ### ClickHouse 发行版 19.7.5.29，2019-07-05
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复某些含 JOIN 的查询中的性能回归问题。[#5192](https://github.com/ClickHouse/ClickHouse/pull/5192) ([Winter Zhang](https://github.com/zhang2014))

<div id="clickhouse-release-19-7-5-27-2019-06-09">
  ### ClickHouse 发行版 19.7.5.27，发布于 2019-06-09
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增了 bitmap 相关函数 `bitmapHasAny` 和 `bitmapHasAll`，对应于数组的 `hasAny` 和 `hasAll` 函数。[#5279](https://github.com/ClickHouse/ClickHouse/pull/5279) ([Sergi Vladykin](https://github.com/svladykin))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复 `minmax` INDEX 遇到 Null 值时的段错误。 [#5246](https://github.com/ClickHouse/ClickHouse/pull/5246) ([Nikita Vasilev](https://github.com/nikvas0))
* 将 LIMIT BY 中所有输入列都标记为必需的输出列。这修复了某些分布式查询中的 “Not found column” 错误。 [#5407](https://github.com/ClickHouse/ClickHouse/pull/5407) ([Constantin S. Pan](https://github.com/kvap))
* 修复在带有 DEFAULT 的列上执行 `SELECT .. PREWHERE` 时出现的 “Column '0' already exists” 错误。 [#5397](https://github.com/ClickHouse/ClickHouse/pull/5397) ([proller](https://github.com/proller))
* 修复 `ReplicatedMergeTree` 上的 `ALTER MODIFY TTL` 查询。 [#5539](https://github.com/ClickHouse/ClickHouse/pull/5539/commits) ([Anton Popov](https://github.com/CurtizJ))
* 当 Kafka 消费者启动失败时，不再导致服务器崩溃。 [#5285](https://github.com/ClickHouse/ClickHouse/pull/5285) ([Ivan](https://github.com/abyss7))
* 修复 bitmap 函数产生错误结果的问题。 [#5359](https://github.com/ClickHouse/ClickHouse/pull/5359) ([Andy Yang](https://github.com/andyyzh))
* 修复哈希字典的 element\_count 计数问题 (不包含重复项) 。 [#5440](https://github.com/ClickHouse/ClickHouse/pull/5440) ([Azat Khuzhin](https://github.com/azat))
* 将环境变量 TZ 的内容用作时区名称。这有助于在某些情况下正确识别默认时区。 [#5443](https://github.com/ClickHouse/ClickHouse/pull/5443) ([Ivan](https://github.com/abyss7))
* 不再尝试在 `dictGetT` 函数中转换整数，因为这样无法正确工作，改为抛出异常。 [#5446](https://github.com/ClickHouse/ClickHouse/pull/5446) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 ExternalData HTTP 请求中的设置问题。 [#5455](https://github.com/ClickHouse/ClickHouse/pull/5455) ([Danila
  Kutenin](https://github.com/danlark1))
* 修复这样一个问题：parts 仅从 FS 中移除，却没有从 Zookeeper 中删除。 [#5520](https://github.com/ClickHouse/ClickHouse/pull/5520) ([alesapin](https://github.com/alesapin))
* 修复 `bitmapHasAny` 函数中的段错误。 [#5528](https://github.com/ClickHouse/ClickHouse/pull/5528) ([Zhichang Yu](https://github.com/yuzhichang))
* 修复复制连接池在 DNS 缓存已清除后仍不会重试解析主机的问题。 [#5534](https://github.com/ClickHouse/ClickHouse/pull/5534) ([alesapin](https://github.com/alesapin))
* 修复 `DROP INDEX IF EXISTS` 查询。现在如果指定的索引不存在，`ALTER TABLE ... DROP INDEX IF EXISTS ...` 查询也不会抛出异常。 [#5524](https://github.com/ClickHouse/ClickHouse/pull/5524) ([Gleb Novikov](https://github.com/NanoBjorn))
* 修复 UNION ALL 的超类型列问题。此前在某些情况下，结果列的数据与列类型会不一致。 [#5503](https://github.com/ClickHouse/ClickHouse/pull/5503) ([Artem Zuikov](https://github.com/4ertus2))
* 在 DDL 查询处理期间跳过 ZNONODE。此前如果另一个节点删除了任务队列中的 znode，那么尚未处理该任务、但已经获取子节点列表的节点会终止 DDLWorker 线程。 [#5489](https://github.com/ClickHouse/ClickHouse/pull/5489) ([Azat Khuzhin](https://github.com/azat))
* 修复向带有 MATERIALIZED 列的 Distributed() 表执行 INSERT 时的问题。 [#5429](https://github.com/ClickHouse/ClickHouse/pull/5429) ([Azat Khuzhin](https://github.com/azat))

<div id="clickhouse-release-19-7-3-9-2019-05-30">
  ### ClickHouse 发行版 19.7.3.9，2019-05-30
</div>

<div id="new-feature">
  #### 新功能
</div>

* 允许限制用户可指定的设置取值范围。
  这些约束可以在用户 settings profile 中配置。
  [#4931](https://github.com/ClickHouse/ClickHouse/pull/4931) ([Vitaly
  Baranov](https://github.com/vitlibar))
* 为函数 `groupUniqArray` 增加了第二个版本，并提供可选的
  `max_size` 参数，用于限制结果数组的大小。其
  行为类似于 `groupArray(max_size)(x)` 函数。
  [#5026](https://github.com/ClickHouse/ClickHouse/pull/5026) ([Guillaume
  Tassery](https://github.com/YiuRULE))
* 对于 TSVWithNames/CSVWithNames 输入文件格式，现在可以
  根据文件头确定列顺序。这由
  `input_format_with_names_use_header` 参数控制。
  [#5081](https://github.com/ClickHouse/ClickHouse/pull/5081)
  ([Alexander](https://github.com/Akazz))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 在 merge 过程中使用 uncompressed\_cache + JOIN 时发生崩溃 (#5197)
  [#5133](https://github.com/ClickHouse/ClickHouse/pull/5133) ([Danila
  Kutenin](https://github.com/danlark1))
* 使用 clickhouse-client 查询系统表时发生段错误。#5066
  [#5127](https://github.com/ClickHouse/ClickHouse/pull/5127)
  ([Ivan](https://github.com/abyss7))
* 通过 KafkaEngine 在高负载下出现数据丢失 (#4736)
  [#5080](https://github.com/ClickHouse/ClickHouse/pull/5080)
  ([Ivan](https://github.com/abyss7))
* 修复了一个极少见的数据竞态条件：执行包含 UNION ALL 的查询时，如果其中至少有两个 SELECT 来自 system.columns、system.tables、system.parts、system.parts\_tables 或 Merge 家族的表，同时并发对相关表的列执行 ALTER，则可能触发该问题。[#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="performance-improvement">
  #### 性能改进
</div>

* 对 `ORDER BY` 中单个数值列进行排序且不带
  `LIMIT` 时，使用基数排序。[#5106](https://github.com/ClickHouse/ClickHouse/pull/5106),
  [#4439](https://github.com/ClickHouse/ClickHouse/pull/4439)
  ([Evgenii Pravda](https://github.com/kvinty),
  [alexey-milovidov](https://github.com/alexey-milovidov))

<div id="documentation">
  #### 文档
</div>

* 将部分表引擎文档翻译成中文。
  [#5107](https://github.com/ClickHouse/ClickHouse/pull/5107),
  [#5094](https://github.com/ClickHouse/ClickHouse/pull/5094),
  [#5087](https://github.com/ClickHouse/ClickHouse/pull/5087)
  ([张风啸](https://github.com/AlexZFX)),
  [#5068](https://github.com/ClickHouse/ClickHouse/pull/5068) ([never
  lee](https://github.com/neverlee))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 在 `clickhouse-test` 中正确输出 UTF-8 字符。
  [#5084](https://github.com/ClickHouse/ClickHouse/pull/5084)
  ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 clickhouse-client 添加命令行参数，以便始终加载自动补全
  数据。 [#5102](https://github.com/ClickHouse/ClickHouse/pull/5102)
  ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一些 PVS-Studio 警告。
  [#5082](https://github.com/ClickHouse/ClickHouse/pull/5082)
  ([alexey-milovidov](https://github.com/alexey-milovidov))
* 更新 LZ4 [#5040](https://github.com/ClickHouse/ClickHouse/pull/5040) ([Danila
  Kutenin](https://github.com/danlark1))
* 将 gperf 添加到构建依赖中，为即将提交的拉取请求 #5030 做准备。
  [#5110](https://github.com/ClickHouse/ClickHouse/pull/5110)
  ([proller](https://github.com/proller))

<div id="clickhouse-release-19-6">
  ## ClickHouse 发行版 19.6
</div>

<div id="clickhouse-release-19-6-3-18-2019-06-13">
  ### ClickHouse 发行版 19.6.3.18，2019-06-13
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了来自表函数 `mysql` 和 `odbc` 及其对应表引擎的查询中，`IN` 条件无法下推的问题。此修复解决了 #3540 和 #2384。 [#5313](https://github.com/ClickHouse/ClickHouse/pull/5313) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 Zookeeper 中的死锁问题。 [#5297](https://github.com/ClickHouse/ClickHouse/pull/5297) ([github1youlc](https://github.com/github1youlc))
* 允许 CSV 中使用带引号的小数值。 [#5284](https://github.com/ClickHouse/ClickHouse/pull/5284) ([Artem Zuikov](https://github.com/4ertus2)
* 禁止将浮点 Inf/NaN 转换为 Decimal (会抛出异常) 。 [#5282](https://github.com/ClickHouse/ClickHouse/pull/5282) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 rename 查询中的数据竞争问题。 [#5247](https://github.com/ClickHouse/ClickHouse/pull/5247) ([Winter Zhang](https://github.com/zhang2014))
* 临时禁用 LFAlloc。使用 LFAlloc 可能会在分配 UncompressedCache 时导致大量 MAP\_FAILED，进而在高负载服务器上引发查询崩溃。 [cfdba93](https://github.com/ClickHouse/ClickHouse/commit/cfdba938ce22f16efeec504f7f90206a515b1280)([Danila Kutenin](https://github.com/danlark1))

<div id="clickhouse-release-19-6-2-11-2019-05-13">
  ### ClickHouse 版本 19.6.2.11，2019-05-13
</div>

<div id="new-feature">
  #### 新功能
</div>

* 为列和表新增生存时间 (TTL) 表达式。[#4212](https://github.com/ClickHouse/ClickHouse/pull/4212) ([Anton Popov](https://github.com/CurtizJ))
* 新增对 HTTP 响应 `brotli` 压缩的支持 (Accept-Encoding: br) [#4388](https://github.com/ClickHouse/ClickHouse/pull/4388) ([Mikhail](https://github.com/fandyushin))
* 新增函数 `isValidUTF8`，用于检查一组字节是否采用了正确的 UTF-8 编码。[#4934](https://github.com/ClickHouse/ClickHouse/pull/4934) ([Danila Kutenin](https://github.com/danlark1))
* 新增负载均衡策略 `first_or_random`：将查询发送到第一个指定主机；如果该主机不可访问，则将查询发送到分片中的随机主机。适用于跨复制拓扑设置。[#5012](https://github.com/ClickHouse/ClickHouse/pull/5012) ([nvartolomei](https://github.com/nvartolomei))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 为 MergeTree\* 表家族新增设置 `index_granularity_bytes` (自适应索引粒度) 。[#4826](https://github.com/ClickHouse/ClickHouse/pull/4826) ([alesapin](https://github.com/alesapin))

<div id="improvement">
  #### 改进
</div>

* 为函数 `substringUTF8` 新增了对非常量以及负数 size 和 length 参数的支持。[#4989](https://github.com/ClickHouse/ClickHouse/pull/4989) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在 left join 中禁用向右表下推，在 right join 中禁用向左表下推，并在 full join 中禁用向两张表下推。这修复了某些情况下错误的 JOIN 结果。[#4846](https://github.com/ClickHouse/ClickHouse/pull/4846) ([Ivan](https://github.com/abyss7))
* `clickhouse-copier`：自动从 `--task-file` 选项上传任务配置。[#4876](https://github.com/ClickHouse/ClickHouse/pull/4876) ([proller](https://github.com/proller))
* 为存储工厂和表函数工厂添加了拼写错误处理程序。[#4891](https://github.com/ClickHouse/ClickHouse/pull/4891) ([Danila Kutenin](https://github.com/danlark1))
* 支持在无子查询的多个 join 中使用星号和限定星号。[#4898](https://github.com/ClickHouse/ClickHouse/pull/4898) ([Artem Zuikov](https://github.com/4ertus2))
* 使缺失列的错误消息对用户更友好。[#4915](https://github.com/ClickHouse/ClickHouse/pull/4915) ([Artem Zuikov](https://github.com/4ertus2))

<div id="performance-improvement">
  #### 性能改进
</div>

* ASOF JOIN 速度显著提升 [#4924](https://github.com/ClickHouse/ClickHouse/pull/4924) ([Martijn Bakker](https://github.com/Gladdy))

<div id="backward-incompatible-changes">
  #### 不兼容的变更
</div>

* 为保持一致，HTTP 请求头 `Query-Id` 已重命名为 `X-ClickHouse-Query-Id`。 [#4972](https://github.com/ClickHouse/ClickHouse/pull/4972) ([Mikhail](https://github.com/fandyushin))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 `clickhouse-copier` 中潜在的空指针解引用问题。[#4900](https://github.com/ClickHouse/ClickHouse/pull/4900) ([proller](https://github.com/proller))
* 修复了包含 JOIN + ARRAY JOIN 的查询报错问题。[#4938](https://github.com/ClickHouse/ClickHouse/pull/4938) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了在一个字典通过 engine=Dictionary 的数据库依赖另一个字典时，server 启动过程中可能卡住的问题。[#4962](https://github.com/ClickHouse/ClickHouse/pull/4962) ([Vitaly Baranov](https://github.com/vitlibar))
* 部分修复了 distributed\_product\_mode = local。现在允许通过表别名在 where/having/order by/... 中使用本地表的列。如果表没有别名，则会抛出异常。不过目前仍无法在不使用表别名的情况下访问这些列。[#4986](https://github.com/ClickHouse/ClickHouse/pull/4986) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 `SELECT DISTINCT` 与 `JOIN` 一起使用时可能返回错误结果的问题。[#5001](https://github.com/ClickHouse/ClickHouse/pull/5001) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了一个极其罕见的数据竞态条件：执行 UNION ALL 查询时，如果其中至少包含两个从 system.columns、system.tables、system.parts、system.parts\_tables 或 Merge 家族的表中 SELECT 的子查询，并且同时对相关表的列执行 ALTER，就可能触发该问题。[#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 修复了在不同主机上运行 clickhouse-server 时出现的测试失败问题 [#4713](https://github.com/ClickHouse/ClickHouse/pull/4713) ([Vasily Nemkov](https://github.com/Enmk))
* clickhouse-test：在非 TTY 环境中禁用颜色控制序列。[#4937](https://github.com/ClickHouse/ClickHouse/pull/4937) ([alesapin](https://github.com/alesapin))
* clickhouse-test：允许使用任意测试数据库 (在可能的情况下移除 `test.` 限定) [#5008](https://github.com/ClickHouse/ClickHouse/pull/5008) ([proller](https://github.com/proller))
* 修复了 ubsan 错误 [#5037](https://github.com/ClickHouse/ClickHouse/pull/5037) ([Vitaly Baranov](https://github.com/vitlibar))
* 在 ClickHouse 中加入了 Yandex LFAlloc，以不同方式分配 MarkCache 和 UncompressedCache 数据，从而更可靠地捕获段错误 [#4995](https://github.com/ClickHouse/ClickHouse/pull/4995) ([Danila Kutenin](https://github.com/danlark1))
* 用于辅助处理回移和更新日志的 Python 工具。[#4949](https://github.com/ClickHouse/ClickHouse/pull/4949) ([Ivan](https://github.com/abyss7))

<div id="clickhouse-release-19-5">
  ## ClickHouse 版本 19.5
</div>

<div id="clickhouse-release-19-5-4-22-2019-05-13">
  ### ClickHouse 版本 19.5.4.22，2019-05-13
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 bitmap\* 函数可能发生崩溃的问题 [#5220](https://github.com/ClickHouse/ClickHouse/pull/5220) [#5228](https://github.com/ClickHouse/ClickHouse/pull/5228) ([Andy Yang](https://github.com/andyyzh))
* 修复了一个极其罕见的数据竞态条件：当执行包含至少两个 SELECT 的 UNION ALL 查询，且这些 SELECT 来自 system.columns、system.tables、system.parts、system.parts\_tables 或 Merge 家族的表，同时并发对相关表的列执行 ALTER 时，可能会触发该问题。[#5189](https://github.com/ClickHouse/ClickHouse/pull/5189) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了错误 `Set for IN is not created yet in case of using single LowCardinality column in the left part of IN`。当 LowCardinality 列是主键的一部分时，会出现此错误。#5031 [#5154](https://github.com/ClickHouse/ClickHouse/pull/5154) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 调整了 retention 函数：如果某一行同时满足第一个和第 N 个条件，以前只会将第一个满足的条件加入数据状态中。现在，该行中所有满足的条件都会加入数据状态中。[#5119](https://github.com/ClickHouse/ClickHouse/pull/5119) ([小路](https://github.com/nicelulu))

<div id="clickhouse-release-19-5-3-8-2019-04-18">
  ### ClickHouse 版本 19.5.3.8，2019-04-18
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 将设置 `max_partitions_per_insert_block` 的类型从 boolean 更正为 UInt64。[#5028](https://github.com/ClickHouse/ClickHouse/pull/5028) ([Mohammad Hossein Sekhavat](https://github.com/mhsekhavat))

<div id="clickhouse-release-19-5-2-6-2019-04-15">
  ### ClickHouse 版本 19.5.2.6，2019-04-15
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增了 [Hyperscan](https://github.com/intel/hyperscan) 多正则表达式匹配功能 (函数 `multiMatchAny`、`multiMatchAnyIndex`、`multiFuzzyMatchAny`、`multiFuzzyMatchAnyIndex`) 。[#4780](https://github.com/ClickHouse/ClickHouse/pull/4780), [#4841](https://github.com/ClickHouse/ClickHouse/pull/4841) ([Danila Kutenin](https://github.com/danlark1))
* 新增了 `multiSearchFirstPosition` 函数。[#4780](https://github.com/ClickHouse/ClickHouse/pull/4780) ([Danila Kutenin](https://github.com/danlark1))
* 为表实现了预定义的按行表达式过滤器。[#4792](https://github.com/ClickHouse/ClickHouse/pull/4792) ([Ivan](https://github.com/abyss7))
* 新增了一种基于布隆过滤器的数据跳过索引类型 (可用于 `equal`、`in` 和 `like` 函数) 。[#4499](https://github.com/ClickHouse/ClickHouse/pull/4499) ([Nikita Vasilev](https://github.com/nikvas0))
* 新增了 `ASOF JOIN`，可用于执行与最近已知值进行关联的查询。[#4774](https://github.com/ClickHouse/ClickHouse/pull/4774) [#4867](https://github.com/ClickHouse/ClickHouse/pull/4867) [#4863](https://github.com/ClickHouse/ClickHouse/pull/4863) [#4875](https://github.com/ClickHouse/ClickHouse/pull/4875) ([Martijn Bakker](https://github.com/Gladdy), [Artem Zuikov](https://github.com/4ertus2))
* 将多个 `COMMA JOIN` 重写为 `CROSS JOIN`。然后在可能的情况下，再将其重写为 `INNER JOIN`。[#4661](https://github.com/ClickHouse/ClickHouse/pull/4661) ([Artem Zuikov](https://github.com/4ertus2))

<div id="improvement">
  #### 改进
</div>

* `topK` 和 `topKWeighted` 现已支持自定义 `loadFactor` (修复了问题 [#4252](https://github.com/ClickHouse/ClickHouse/issues/4252)) 。[#4634](https://github.com/ClickHouse/ClickHouse/pull/4634) ([Kirill Danshin](https://github.com/kirillDanshin))
* 即使对于不带采样的表，现在也允许使用 `parallel_replicas_count > 1` (对此类表，该设置会被直接忽略) 。在之前的版本中，这会导致异常。[#4637](https://github.com/ClickHouse/ClickHouse/pull/4637) ([Alexey Elymanov](https://github.com/digitalist))
* 支持 `CREATE OR REPLACE VIEW`。允许在单条语句中创建视图或设置新的定义。[#4654](https://github.com/ClickHouse/ClickHouse/pull/4654) ([Boris Granveaud](https://github.com/bgranvea))
* `Buffer` 表引擎现已支持 `PREWHERE`。[#4671](https://github.com/ClickHouse/ClickHouse/pull/4671) ([Yangkuan Liu](https://github.com/LiuYangkuan))
* 新增了在 ZooKeeper 中缺少元数据时以 `readonly` 模式启动复制表的能力。[#4691](https://github.com/ClickHouse/ClickHouse/pull/4691) ([alesapin](https://github.com/alesapin))
* 修复了 clickhouse-client 中进度条闪烁的问题。使用 `FORMAT Null` 配合流式查询时，这个问题最为明显。[#4811](https://github.com/ClickHouse/ClickHouse/pull/4811) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 允许按用户禁用使用 `hyperscan` 库的函数，以限制潜在的过度且不可控的资源消耗。[#4816](https://github.com/ClickHouse/ClickHouse/pull/4816) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在所有错误日志中加入版本号。[#4824](https://github.com/ClickHouse/ClickHouse/pull/4824) ([proller](https://github.com/proller))
* 为 `multiMatch` 函数添加了限制，要求字符串大小必须能容纳进 `unsigned int`。同时还为 `multiSearch` 函数增加了参数数量限制。[#4834](https://github.com/ClickHouse/ClickHouse/pull/4834) ([Danila Kutenin](https://github.com/danlark1))
* 改进了 Hyperscan 中临时工作区的使用和错误处理。[#4866](https://github.com/ClickHouse/ClickHouse/pull/4866) ([Danila Kutenin](https://github.com/danlark1))
* 根据 `*GraphiteMergeTree` 引擎表的表配置填充 `system.graphite_detentions`。[#4584](https://github.com/ClickHouse/ClickHouse/pull/4584) ([Mikhail f. Shiryaev](https://github.com/Felixoid))
* 将 `trigramDistance` 函数重命名为 `ngramDistance`，并新增了更多带有 `CaseInsensitive` 和 `UTF` 的函数。[#4602](https://github.com/ClickHouse/ClickHouse/pull/4602) ([Danila Kutenin](https://github.com/danlark1))
* 改进了数据跳过索引的计算。[#4640](https://github.com/ClickHouse/ClickHouse/pull/4640) ([Nikita Vasilev](https://github.com/nikvas0))
* 将普通列、`DEFAULT`、`MATERIALIZED` 和 `ALIAS` 列统一保留在一个列表中 (修复了问题 [#2867](https://github.com/ClickHouse/ClickHouse/issues/2867)) 。[#4707](https://github.com/ClickHouse/ClickHouse/pull/4707) ([Alex Zatelepin](https://github.com/ztlpn))

<div id="bug-fix">
  #### 问题修复
</div>

* 避免在内存分配失败时触发 `std::terminate`。现在会按预期抛出 `std::bad_alloc` 异常。[#4665](https://github.com/ClickHouse/ClickHouse/pull/4665) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从缓冲区读取 `capnproto` 时的问题。有时文件无法通过 HTTP 成功加载。[#4674](https://github.com/ClickHouse/ClickHouse/pull/4674) ([Vladislav](https://github.com/smirnov-vs))
* 修复执行 `OPTIMIZE TABLE FINAL` 查询后出现的错误 `Unknown log entry type: 0`。[#4683](https://github.com/ClickHouse/ClickHouse/pull/4683) ([Amos Bird](https://github.com/amosbird))
* 向 `hasAny` 或 `hasAll` 函数传入错误的参数可能会导致段错误。[#4698](https://github.com/ClickHouse/ClickHouse/pull/4698) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 执行 `DROP DATABASE dictionary` 查询时，可能会发生死锁。 [#4701](https://github.com/ClickHouse/ClickHouse/pull/4701) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 `median` 和 `quantile` 函数中的未定义行为。[#4702](https://github.com/ClickHouse/ClickHouse/pull/4702) ([hcz](https://github.com/hczhcz))
* 修复 `network_compression_method` 为小写时无法检测压缩级别的问题。此问题出现在 v19.1 中。[#4706](https://github.com/ClickHouse/ClickHouse/pull/4706) ([proller](https://github.com/proller))
* 修复了会忽略 `<timezone>UTC</timezone>` 设置的问题 (修复了问题 [#4658](https://github.com/ClickHouse/ClickHouse/issues/4658)) 。[#4718](https://github.com/ClickHouse/ClickHouse/pull/4718) ([proller](https://github.com/proller))
* 修复 `histogram` 函数在 `Distributed` 表上的行为问题。 [#4741](https://github.com/ClickHouse/ClickHouse/pull/4741) ([olegkv](https://github.com/olegkv))
* 修复了 tsan 报告的 `destroy of a locked mutex` 问题。[#4742](https://github.com/ClickHouse/ClickHouse/pull/4742) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了关闭时因 system 日志使用中的竞态条件导致的 TSan 报告。修复了在启用 `part_log` 时关闭过程中可能发生的释放后使用问题。[#4758](https://github.com/ClickHouse/ClickHouse/pull/4758) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在发生错误时 `ReplicatedMergeTreeAlterThread` 重新检查 parts 的问题。[#4772](https://github.com/ClickHouse/ClickHouse/pull/4772) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 对中间聚合函数状态进行算术运算时，常量参数 (例如子查询结果) 无法正常处理。[#4776](https://github.com/ClickHouse/ClickHouse/pull/4776) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 始终在元数据中用反引号括起列名。否则将无法创建包含名为 `index` 的列的表 (因为元数据中的 `ATTACH` 查询格式不正确，服务器将无法重启) 。[#4782](https://github.com/ClickHouse/ClickHouse/pull/4782) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在 `Distributed` 表上执行 `ALTER ... MODIFY ORDER BY` 时的崩溃问题。[#4790](https://github.com/ClickHouse/ClickHouse/pull/4790) ([TCeason](https://github.com/TCeason))
* 修复启用 `enable_optimize_predicate_expression` 时 `JOIN ON` 中的段错误。 [#4794](https://github.com/ClickHouse/ClickHouse/pull/4794) ([Winter Zhang](https://github.com/zhang2014))
* 修复了从 Kafka 消费 protobuf 消息后会额外添加一行的 bug。[#4808](https://github.com/ClickHouse/ClickHouse/pull/4808) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复 `JOIN` 在非 Nullable 列与 Nullable 列之间时的崩溃问题。修复 `ANY JOIN` + `join_use_nulls` 中右侧键里的 `NULLs` 问题。[#4815](https://github.com/ClickHouse/ClickHouse/pull/4815) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `clickhouse-copier` 的段错误。[#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller))
* 修复了在并发重命名或修改表时，从 `system.tables` 中执行 `SELECT` 的竞态条件。[#4836](https://github.com/ClickHouse/ClickHouse/pull/4836) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在拉取已失效的数据分区片段时发生的数据竞争问题。[#4839](https://github.com/ClickHouse/ClickHouse/pull/4839) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在对 MergeTree 家族表执行 `RENAME` 时可能发生的罕见竞态条件。[#4844](https://github.com/ClickHouse/ClickHouse/pull/4844) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了函数 `arrayIntersect` 中的段错误。在以混合的常量参数和普通参数调用该函数时，可能会发生段错误。[#4847](https://github.com/ClickHouse/ClickHouse/pull/4847) ([Lixiang Qian](https://github.com/fancyqlx))
* 修复了这样一个罕见问题：当 `Array(LowCardinality)` 列包含一长串空数组时，读取该列会出错。[#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了在 `FULL/RIGHT JOIN` 中按 Nullable 列与非 Nullable 列连接时发生崩溃的问题。[#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2))
* 修复在副本之间拉取 parts 时发生的 `No message received` 异常。[#4856](https://github.com/ClickHouse/ClickHouse/pull/4856) ([alesapin](https://github.com/alesapin))
* 修复了在单个数组包含多个重复值时，`arrayIntersect` 函数返回结果错误的问题。[#4871](https://github.com/ClickHouse/ClickHouse/pull/4871) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了并发执行 `ALTER COLUMN` 查询时的一个竞态条件，该问题可能导致服务器崩溃 (修复问题 [#3421](https://github.com/ClickHouse/ClickHouse/issues/3421)) 。[#4592](https://github.com/ClickHouse/ClickHouse/pull/4592) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复 `FULL/RIGHT JOIN` 在使用 const 列时结果不正确的问题。[#4723](https://github.com/ClickHouse/ClickHouse/pull/4723) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `GLOBAL JOIN` 中使用星号时出现的重复项问题。[#4705](https://github.com/ClickHouse/ClickHouse/pull/4705) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了在未指定列类型时，对列 `CODEC` 执行 `ALTER MODIFY` 时的参数推断问题。[#4883](https://github.com/ClickHouse/ClickHouse/pull/4883) ([alesapin](https://github.com/alesapin))
* 当 `URL` 包含片段但不含查询字符串时，函数 `cutQueryStringAndFragment()` 和 `queryStringAndFragment()` 现在可以正确工作。[#4894](https://github.com/ClickHouse/ClickHouse/pull/4894) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了一个罕见问题：当 `min_bytes_to_use_direct_io` 设置大于零且线程需要在列文件中向后寻道时，就会出现该问题。[#4897](https://github.com/ClickHouse/ClickHouse/pull/4897) ([alesapin](https://github.com/alesapin))
* 修复聚合函数在使用 `LowCardinality` 参数时参数类型错误的问题 (修复了问题 [#4919](https://github.com/ClickHouse/ClickHouse/issues/4919)) 。[#4922](https://github.com/ClickHouse/ClickHouse/pull/4922) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复 `GLOBAL JOIN` 中错误的名称限定问题。[#4969](https://github.com/ClickHouse/ClickHouse/pull/4969) ([Artem Zuikov](https://github.com/4ertus2))
* 修复函数 `toISOWeek` 在 1970 年返回结果的问题。[#4988](https://github.com/ClickHouse/ClickHouse/pull/4988) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复在 `ReplicatedMergeTree*` 系列表上使用 `ON CLUSTER` 执行 `DROP`、`TRUNCATE` 和 `OPTIMIZE` 查询时的重复执行问题。[#4991](https://github.com/ClickHouse/ClickHouse/pull/4991) ([alesapin](https://github.com/alesapin))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* 将设置 `insert_sample_with_metadata` 重命名为 `input_format_defaults_for_omitted_fields`。[#4771](https://github.com/ClickHouse/ClickHouse/pull/4771) ([Artem Zuikov](https://github.com/4ertus2))
* 新增设置 `max_partitions_per_insert_block` (默认值为 100) 。如果插入的块包含更多分区，则会抛出异常。如需取消该限制，可将其设为 0 (不推荐) 。[#4845](https://github.com/ClickHouse/ClickHouse/pull/4845) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 多重搜索函数已重命名 (`multiPosition` 更名为 `multiSearchAllPositions`，`multiSearch` 更名为 `multiSearchAny`，`firstMatch` 更名为 `multiSearchFirstIndex`) 。[#4780](https://github.com/ClickHouse/ClickHouse/pull/4780) ([Danila Kutenin](https://github.com/danlark1))

<div id="performance-improvement">
  #### 性能改进
</div>

* 通过内联优化 Volnitsky searcher，对于包含大量 needle 或大量相似二元组的查询，搜索性能提升约 5-10%。 [#4862](https://github.com/ClickHouse/ClickHouse/pull/4862) ([Danila Kutenin](https://github.com/danlark1))
* 修复了在设置 `use_uncompressed_cache` 大于零且所有读取数据都位于缓存中时出现的性能问题。 [#4913](https://github.com/ClickHouse/ClickHouse/pull/4913) ([alesapin](https://github.com/alesapin))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 加固调试构建：采用更细粒度的内存映射和 ASLR；为标记缓存和索引增加内存保护。这有助于在 ASan 和 MSan 无法发现问题时，找出更多内存踩踏 bug。[#4632](https://github.com/ClickHouse/ClickHouse/pull/4632) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 CMake 变量 `ENABLE_PROTOBUF`、`ENABLE_PARQUET` 和 `ENABLE_BROTLI` 添加支持，从而可以启用/禁用上述功能 (与 librdkafka、mysql 等的做法相同) 。[#4669](https://github.com/ClickHouse/ClickHouse/pull/4669) ([Silviu Caragea](https://github.com/silviucpp))
* 增加了一项能力：如果某些查询在测试运行后卡住，可打印进程列表以及所有线程的堆栈跟踪。[#4675](https://github.com/ClickHouse/ClickHouse/pull/4675) ([alesapin](https://github.com/alesapin))
* 在 `clickhouse-test` 中为 `Connection loss` 错误添加重试机制。[#4682](https://github.com/ClickHouse/ClickHouse/pull/4682) ([alesapin](https://github.com/alesapin))
* 在打包脚本中加入基于 Vagrant 的 FreeBSD 构建，以及带 Thread Sanitizer 的构建。[#4712](https://github.com/ClickHouse/ClickHouse/pull/4712) [#4748](https://github.com/ClickHouse/ClickHouse/pull/4748) ([alesapin](https://github.com/alesapin))
* 现在安装期间会提示用户为 `'default'` 用户设置密码。[#4725](https://github.com/ClickHouse/ClickHouse/pull/4725) ([proller](https://github.com/proller))
* 抑制 `rdkafka` 库中的警告。[#4740](https://github.com/ClickHouse/ClickHouse/pull/4740) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 允许在不使用 SSL 的情况下构建。[#4750](https://github.com/ClickHouse/ClickHouse/pull/4750) ([proller](https://github.com/proller))
* 增加了一种以自定义用户身份启动 clickhouse-server 镜像的方式。[#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid))
* 将 contrib boost 升级到 1.69。[#4793](https://github.com/ClickHouse/ClickHouse/pull/4793) ([proller](https://github.com/proller))
* 在使用 Thread Sanitizer 编译时禁用 `mremap`。令人意外的是，TSan 不会拦截 `mremap` (尽管会拦截 `mmap`、`munmap`) ，这会导致误报。已修复有状态测试中的 TSan 报告问题。[#4859](https://github.com/ClickHouse/ClickHouse/pull/4859) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 添加了一项测试，用于检查通过 HTTP 接口使用 format schema。[#4864](https://github.com/ClickHouse/ClickHouse/pull/4864) ([Vitaly Baranov](https://github.com/vitlibar))

<div id="clickhouse-release-19-4">
  ## ClickHouse 19.4 版本
</div>

<div id="clickhouse-release-19-4-4-33-2019-04-17">
  ### ClickHouse 版本 19.4.4.33，2019-04-17
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 避免在内存分配失败时触发 `std::terminate`。现在会按预期抛出 `std::bad_alloc` 异常。 [#4665](https://github.com/ClickHouse/ClickHouse/pull/4665) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从缓冲区读取 `capnproto` 的问题。有时文件无法通过 HTTP 成功加载。[#4674](https://github.com/ClickHouse/ClickHouse/pull/4674) ([Vladislav](https://github.com/smirnov-vs))
* 修复在执行 `OPTIMIZE TABLE FINAL` 查询后出现的错误 `Unknown log entry type: 0`。[#4683](https://github.com/ClickHouse/ClickHouse/pull/4683) ([Amos Bird](https://github.com/amosbird))
* 向 `hasAny` 或 `hasAll` 函数传入错误参数可能导致段错误。[#4698](https://github.com/ClickHouse/ClickHouse/pull/4698) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 执行 `DROP DATABASE dictionary` 查询时，可能发生死锁。[#4701](https://github.com/ClickHouse/ClickHouse/pull/4701) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 `median` 和 `quantile` 函数中的未定义行为。[#4702](https://github.com/ClickHouse/ClickHouse/pull/4702) ([hcz](https://github.com/hczhcz))
* 修复 `network_compression_method` 为小写时无法正确检测压缩级别的问题。此问题始于 v19.1。 [#4706](https://github.com/ClickHouse/ClickHouse/pull/4706) ([proller](https://github.com/proller))
* 修复了会忽略 `<timezone>UTC</timezone>` 设置的问题 (修复了问题 [#4658](https://github.com/ClickHouse/ClickHouse/issues/4658)) 。[#4718](https://github.com/ClickHouse/ClickHouse/pull/4718) ([proller](https://github.com/proller))
* 修复 `histogram` 函数在 `Distributed` 表上的行为。[#4741](https://github.com/ClickHouse/ClickHouse/pull/4741) ([olegkv](https://github.com/olegkv))
* 修复了 tsan 报告的 `destroy of a locked mutex` 错误。[#4742](https://github.com/ClickHouse/ClickHouse/pull/4742) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了关闭时因 system 日志使用中的竞态条件而触发的 TSan 报告。修复了在启用 part\_log 时关闭过程中潜在的释放后使用问题。[#4758](https://github.com/ClickHouse/ClickHouse/pull/4758) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在发生错误时 `ReplicatedMergeTreeAlterThread` 中重新检查 parts 的问题。[#4772](https://github.com/ClickHouse/ClickHouse/pull/4772) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 对中间聚合函数状态进行算术运算时，常量参数 (例如子查询结果) 不起作用。[#4776](https://github.com/ClickHouse/ClickHouse/pull/4776) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 始终在元数据中为列名加上反引号。否则就无法创建列名为 `index` 的表 (因为元数据中的 `ATTACH` 查询格式错误，服务器将无法重启) 。[#4782](https://github.com/ClickHouse/ClickHouse/pull/4782) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复在 `Distributed` 表上执行 `ALTER ... MODIFY ORDER BY` 时的崩溃问题。[#4790](https://github.com/ClickHouse/ClickHouse/pull/4790) ([TCeason](https://github.com/TCeason))
* 修复启用 `enable_optimize_predicate_expression` 时 `JOIN ON` 中出现的段错误。[#4794](https://github.com/ClickHouse/ClickHouse/pull/4794) ([Winter Zhang](https://github.com/zhang2014))
* 修复了从 Kafka 消费 protobuf 消息后会额外插入一行的问题。[#4808](https://github.com/ClickHouse/ClickHouse/pull/4808) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复 `clickhouse-copier` 中的段错误。[#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller))
* 修复了在从 `system.tables` 执行 `SELECT` 时，若该表同时被重命名或修改而引发的竞态条件。[#4836](https://github.com/ClickHouse/ClickHouse/pull/4836) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了拉取已废弃的数据分区片段时的数据竞争问题。[#4839](https://github.com/ClickHouse/ClickHouse/pull/4839) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了对 MergeTree 家族的表执行 `RENAME` 时可能发生的罕见数据竞争问题。[#4844](https://github.com/ClickHouse/ClickHouse/pull/4844) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了函数 `arrayIntersect` 中的段错误。若调用该函数时同时使用了常量参数和普通参数，则可能发生段错误。[#4847](https://github.com/ClickHouse/ClickHouse/pull/4847) ([Lixiang Qian](https://github.com/fancyqlx))
* 修复了极少数情况下读取 `Array(LowCardinality)` 列时的问题：当该列包含一长串空数组时，会出现读取异常。[#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复在副本之间拉取 parts 时发生的 `No message received` 异常。[#4856](https://github.com/ClickHouse/ClickHouse/pull/4856) ([alesapin](https://github.com/alesapin))
* 修复了 `arrayIntersect` 函数在单个数组包含多个重复值时结果错误的问题。[#4871](https://github.com/ClickHouse/ClickHouse/pull/4871) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了并发执行 `ALTER COLUMN` 查询期间可能导致服务器崩溃的竞态条件 (修复了问题 [#3421](https://github.com/ClickHouse/ClickHouse/issues/3421)) 。[#4592](https://github.com/ClickHouse/ClickHouse/pull/4592) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复了在未指定列类型时，使用 `ALTER MODIFY` 修改列 `CODEC` 时的参数推断问题。[#4883](https://github.com/ClickHouse/ClickHouse/pull/4883) ([alesapin](https://github.com/alesapin))
* 当 `URL` 包含片段但不包含查询参数时，函数 `cutQueryStringAndFragment()` 和 `queryStringAndFragment()` 现已能够正确工作。[#4894](https://github.com/ClickHouse/ClickHouse/pull/4894) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了一个罕见错误：当设置 `min_bytes_to_use_direct_io` 大于零且线程需要在列文件中向后寻道时，会发生该错误。 [#4897](https://github.com/ClickHouse/ClickHouse/pull/4897) ([alesapin](https://github.com/alesapin))
* 修复带有 `LowCardinality` 参数的聚合函数参数类型错误的问题 (修复了 issue [#4919](https://github.com/ClickHouse/ClickHouse/issues/4919)) 。[#4922](https://github.com/ClickHouse/ClickHouse/pull/4922) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复函数 `toISOWeek` 在 1970 年返回结果的问题。 [#4988](https://github.com/ClickHouse/ClickHouse/pull/4988) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了对 `ReplicatedMergeTree*` 家族的表执行 `ON CLUSTER` 时，`DROP`、`TRUNCATE` 和 `OPTIMIZE` 查询重复的问题。[#4991](https://github.com/ClickHouse/ClickHouse/pull/4991) ([alesapin](https://github.com/alesapin))

<div id="improvement">
  #### 改进
</div>

* 将普通列、`DEFAULT`、`MATERIALIZED` 和 `ALIAS` 列统一保留在同一个列表中 (修复了问题 [#2867](https://github.com/ClickHouse/ClickHouse/issues/2867)) 。[#4707](https://github.com/ClickHouse/ClickHouse/pull/4707) ([Alex Zatelepin](https://github.com/ztlpn))

<div id="clickhouse-release-19-4-3-11-2019-04-02">
  ### ClickHouse 版本 19.4.3.11，2019-04-02
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复 `FULL/RIGHT JOIN` 在基于 Nullable 和非 Nullable 类型进行连接时发生崩溃的问题。[#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `clickhouse-copier` 中的段错误。[#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增了以自定义用户身份启动 clickhouse-server 镜像的方法。[#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid))

<div id="clickhouse-release-19-4-2-7-2019-03-30">
  ### ClickHouse 发行版 19.4.2.7，2019-03-30
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了极少数情况下读取 `Array(LowCardinality)` 列时出现的问题：当该列包含一长串空数组时会发生此问题。[#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="clickhouse-release-19-4-1-3-2019-03-19">
  ### ClickHouse 发行版 19.4.1.3，2019-03-19
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了同时包含 `LIMIT BY` 和 `LIMIT` 的远程查询。此前，如果远程查询中同时使用了 `LIMIT BY` 和 `LIMIT`，`LIMIT` 可能会在 `LIMIT BY` 之前执行，从而导致结果被过滤得过多。[#4708](https://github.com/ClickHouse/ClickHouse/pull/4708) ([Constantin S. Pan](https://github.com/kvap))

<div id="clickhouse-release-19-4-0-49-2019-03-09">
  ### ClickHouse 发行版 19.4.0.49，2019-03-09
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增对 `Protobuf` 格式的完整支持 (输入和输出、嵌套数据结构) 。[#4174](https://github.com/ClickHouse/ClickHouse/pull/4174) [#4493](https://github.com/ClickHouse/ClickHouse/pull/4493) ([Vitaly Baranov](https://github.com/vitlibar))
* 新增基于 Roaring Bitmaps 的 bitmap 函数。[#4207](https://github.com/ClickHouse/ClickHouse/pull/4207) ([Andy Yang](https://github.com/andyyzh)) [#4568](https://github.com/ClickHouse/ClickHouse/pull/4568) ([Vitaly Baranov](https://github.com/vitlibar))
* 新增对 Parquet 格式的支持。[#4448](https://github.com/ClickHouse/ClickHouse/pull/4448) ([proller](https://github.com/proller))
* 新增用于模糊字符串比较的 N-gram 距离。它类似于 R 语言中的 q-gram 指标。[#4466](https://github.com/ClickHouse/ClickHouse/pull/4466) ([Danila Kutenin](https://github.com/danlark1))
* 支持将 graphite rollup 规则由专用的聚合和保留模式组合定义。[#4426](https://github.com/ClickHouse/ClickHouse/pull/4426) ([Mikhail f. Shiryaev](https://github.com/Felixoid))
* 新增 `max_execution_speed` 和 `max_execution_speed_bytes`，以限制资源使用。新增 `min_execution_speed_bytes` 设置，作为对 `min_execution_speed` 的补充。[#4430](https://github.com/ClickHouse/ClickHouse/pull/4430) ([Winter Zhang](https://github.com/zhang2014))
* 实现了函数 `flatten`。[#4555](https://github.com/ClickHouse/ClickHouse/pull/4555) [#4409](https://github.com/ClickHouse/ClickHouse/pull/4409) ([alexey-milovidov](https://github.com/alexey-milovidov), [kzon](https://github.com/kzon))
* 新增函数 `arrayEnumerateDenseRanked` 和 `arrayEnumerateUniqRanked` (类似于 `arrayEnumerateUniq`，但允许细粒度调整深入查看多维数组时的数组深度) 。[#4475](https://github.com/ClickHouse/ClickHouse/pull/4475) ([proller](https://github.com/proller)) [#4601](https://github.com/ClickHouse/ClickHouse/pull/4601) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 支持多个 JOIN，但有一些限制：不支持星号，不支持在 ON/WHERE/GROUP BY/… 中使用复杂别名。[#4462](https://github.com/ClickHouse/ClickHouse/pull/4462) ([Artem Zuikov](https://github.com/4ertus2))

<div id="bug-fix">
  #### 问题修复
</div>

* 此版本还包含 19.3 和 19.1 版本中的所有错误修复。
* 修复了数据跳过索引中的一个错误：INSERT 后粒度顺序不正确。[#4407](https://github.com/ClickHouse/ClickHouse/pull/4407) ([Nikita Vasilev](https://github.com/nikvas0))
* 修复了 `Nullable` 和 `LowCardinality` 列上的 `set` 索引问题。此前，对带有 `Nullable` 或 `LowCardinality` 列的 `set` 索引进行查询时，会报错 `Data type must be deserialized with multiple streams`。[#4594](https://github.com/ClickHouse/ClickHouse/pull/4594) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 在完整更新 `executable` 字典时，正确设置 update\_time。[#4551](https://github.com/ClickHouse/ClickHouse/pull/4551) ([Tema Novikov](https://github.com/temoon))
* 修复了 19.3 中失效的进度条。[#4627](https://github.com/ClickHouse/ClickHouse/pull/4627) ([filimonov](https://github.com/filimonov))
* 在某些情况下，修复了内存区域收缩时 MemoryTracker 的值不一致问题。[#4619](https://github.com/ClickHouse/ClickHouse/pull/4619) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 ThreadPool 中的未定义行为问题。[#4612](https://github.com/ClickHouse/ClickHouse/pull/4612) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个极为罕见的崩溃问题，报错信息为 `mutex lock failed: Invalid argument`。该问题可能发生在对 MergeTree 表执行 DROP 的同时进行 SELECT 查询时。[#4608](https://github.com/ClickHouse/ClickHouse/pull/4608) ([Alex Zatelepin](https://github.com/ztlpn))
* ODBC 驱动程序对 `LowCardinality` 数据类型的兼容性。[#4381](https://github.com/ClickHouse/ClickHouse/pull/4381) ([proller](https://github.com/proller))
* FreeBSD：修正 `AIOcontextPool: Found io_event with unknown id 0` 错误。[#4438](https://github.com/ClickHouse/ClickHouse/pull/4438) ([urgordeadbeef](https://github.com/urgordeadbeef))
* 无论配置如何，`system.part_log` 表都会被创建。[#4483](https://github.com/ClickHouse/ClickHouse/pull/4483) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `dictIsIn` 函数在缓存字典中的未定义行为。[#4515](https://github.com/ClickHouse/ClickHouse/pull/4515) ([alesapin](https://github.com/alesapin))
* 修复了一处死锁问题：当 `SELECT` 查询多次对同一张表加锁 (例如来自不同线程，或在执行多个子查询时) ，且同时存在并发的 DDL 查询时，就会发生死锁。[#4535](https://github.com/ClickHouse/ClickHouse/pull/4535) ([Alex Zatelepin](https://github.com/ztlpn))
* 默认禁用 compile\_expressions，直到我们拥有自己的 `llvm` contrib，并能使用 `clang` 和 `asan` 进行测试。 [#4579](https://github.com/ClickHouse/ClickHouse/pull/4579) ([alesapin](https://github.com/alesapin))
* 当 `clickhouse` 外部字典源的 `invalidate_query` 返回错误的结果集 (空结果、超过一行或超过一列) 时，避免触发 `std::terminate`。修复了此前不论 `lifetime` 如何，`invalidate_query` 都会每 5 秒执行一次的问题。[#4583](https://github.com/ClickHouse/ClickHouse/pull/4583) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 避免在使用 `clickhouse` 数据源的字典中，当 `invalidate_query` 涉及 `system.dictionaries` 表或 `Dictionaries` 数据库时出现死锁 (罕见情况) 。[#4599](https://github.com/ClickHouse/ClickHouse/pull/4599) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在 WHERE 为空时 CROSS JOIN 的问题。[#4598](https://github.com/ClickHouse/ClickHouse/pull/4598) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了函数 "replicate" 在传入常量参数时出现的段错误。 [#4603](https://github.com/ClickHouse/ClickHouse/pull/4603) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复谓词优化器中的 lambda function 问题。 [#4408](https://github.com/ClickHouse/ClickHouse/pull/4408) ([Winter Zhang](https://github.com/zhang2014))
* 修复了多个 JOIN 相关问题。[#4595](https://github.com/ClickHouse/ClickHouse/pull/4595) ([Artem Zuikov](https://github.com/4ertus2))

<div id="improvement">
  #### 改进
</div>

* 支持在 JOIN ON 部分为右侧表的列使用别名。[#4412](https://github.com/ClickHouse/ClickHouse/pull/4412) ([Artem Zuikov](https://github.com/4ertus2))
* 多个 JOIN 的结果需要使用正确的结果名称，以便在子查询中引用。将结果中的扁平别名替换为源名称。[#4474](https://github.com/ClickHouse/ClickHouse/pull/4474) ([Artem Zuikov](https://github.com/4ertus2))
* 改进 JOIN 语句的下推逻辑。[#4387](https://github.com/ClickHouse/ClickHouse/pull/4387) ([Ivan](https://github.com/abyss7))

<div id="performance-improvement">
  #### 性能改进
</div>

* 改进了 “move to PREWHERE” 优化的启发式策略。[#4405](https://github.com/ClickHouse/ClickHouse/pull/4405) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 对于 8 位和 16 位 key，改为使用基于 HashTable API 的适当查找表。[#4536](https://github.com/ClickHouse/ClickHouse/pull/4536) ([Amos Bird](https://github.com/amosbird))
* 提升了字符串比较的性能。[#4564](https://github.com/ClickHouse/ClickHouse/pull/4564) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在单独的线程中清理 分布式 DDL queue，以免拖慢处理 分布式 DDL tasks 的主循环。[#4502](https://github.com/ClickHouse/ClickHouse/pull/4502) ([Alex Zatelepin](https://github.com/ztlpn))
* 当 `min_bytes_to_use_direct_io` 设置为 1 时，并非每个文件都会以 O\_DIRECT 模式打开，因为待读取的数据大小有时会少估一个压缩块的大小。[#4526](https://github.com/ClickHouse/ClickHouse/pull/4526) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增对 clang-9 的支持 [#4604](https://github.com/ClickHouse/ClickHouse/pull/4604) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复错误的 `__asm__` 指令 (又一次)  [#4621](https://github.com/ClickHouse/ClickHouse/pull/4621) ([Konstantin Podshumok](https://github.com/podshumok))
* 新增了可从命令行为 `clickhouse-performance-test` 指定设置的能力。 [#4437](https://github.com/ClickHouse/ClickHouse/pull/4437) ([alesapin](https://github.com/alesapin))
* 将字典测试加入集成测试。 [#4477](https://github.com/ClickHouse/ClickHouse/pull/4477) ([alesapin](https://github.com/alesapin))
* 将网站上 benchmark 中的查询加入自动化性能测试。 [#4496](https://github.com/ClickHouse/ClickHouse/pull/4496) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 外部 lz4 中不存在 `xxhash.h`，因为它属于实现细节，其符号带有 `XXH_NAMESPACE` macro 命名空间前缀。当 lz4 为外部库时，xxHash 也必须作为外部库提供，依赖它的组件也必须链接到它。 [#4495](https://github.com/ClickHouse/ClickHouse/pull/4495) ([Orivej Desh](https://github.com/orivej))
* 修复了 `quantileTiming` aggregate function 可接受负数或浮点参数调用的问题 (这也修复了启用 undefined behavior sanitizer 的 fuzz 测试) 。 [#4506](https://github.com/ClickHouse/ClickHouse/pull/4506) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修正拼写错误。 [#4531](https://github.com/ClickHouse/ClickHouse/pull/4531) ([sdk2](https://github.com/sdk2))
* 修复了 Mac 上的编译问题。 [#4371](https://github.com/ClickHouse/ClickHouse/pull/4371) ([Vitaly Baranov](https://github.com/vitlibar))
* 修复了 FreeBSD 以及多种非常规构建配置下的构建问题。 [#4444](https://github.com/ClickHouse/ClickHouse/pull/4444) ([proller](https://github.com/proller))

<div id="clickhouse-release-19-3">
  ## ClickHouse 19.3 发行版
</div>

<div id="clickhouse-release-19-3-9-1-2019-04-02">
  ### ClickHouse 19.3.9.1 发行版，2019-04-02
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复在 `FULL/RIGHT JOIN` 中按 Nullable 与非 Nullable 列进行连接时发生崩溃的问题。[#4855](https://github.com/ClickHouse/ClickHouse/pull/4855) ([Artem Zuikov](https://github.com/4ertus2))
* 修复 `clickhouse-copier` 中的段错误。[#4835](https://github.com/ClickHouse/ClickHouse/pull/4835) ([proller](https://github.com/proller))
* 修复了极少数情况下从 `Array(LowCardinality)` 列读取数据时的问题，即该列包含很长一串空数组时。[#4850](https://github.com/ClickHouse/ClickHouse/pull/4850) ([Nikolai Kochetov](https://github.com/KochetovNicolai))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增了以自定义用户启动 clickhouse-server 镜像的方法 [#4753](https://github.com/ClickHouse/ClickHouse/pull/4753) ([Mikhail f. Shiryaev](https://github.com/Felixoid))

<div id="clickhouse-release-19-3-7-2019-03-12">
  ### ClickHouse 发行版 19.3.7，2019-03-12
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了 #3920 中的错误。该错误会导致随机缓存损坏 (报错信息为 `Unknown codec family code`、`Cannot seek through file`) 以及段错误。该缺陷最早出现在 19.1 版本中，并在截至 19.1.10 和 19.3.6 的版本中一直存在。[#4623](https://github.com/ClickHouse/ClickHouse/pull/4623) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-3-6-2019-03-02">
  ### ClickHouse 19.3.6 发行版，2019-03-02
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 当线程池中的线程数超过 1000 时，线程退出时可能会触发 `std::terminate`。 [Azat Khuzhin](https://github.com/azat) [#4485](https://github.com/ClickHouse/ClickHouse/pull/4485) [#4505](https://github.com/ClickHouse/ClickHouse/pull/4505) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 现在可以创建 `ReplicatedMergeTree*` 表：既支持为没有默认值的列添加注释，也支持创建列带有 codec 但没有注释和默认值的表。同时还修复了 codec 的比较问题。 [#4523](https://github.com/ClickHouse/ClickHouse/pull/4523) ([alesapin](https://github.com/alesapin))
* 修复了对 array 或 tuple 执行 JOIN 时发生崩溃的问题。 [#4552](https://github.com/ClickHouse/ClickHouse/pull/4552) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 clickhouse-copier 出现 `ThreadStatus not created` 消息时的崩溃问题。 [#4540](https://github.com/ClickHouse/ClickHouse/pull/4540) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了使用分布式 DDL 后，server 关闭时可能发生挂起的问题。 [#4472](https://github.com/ClickHouse/ClickHouse/pull/4472) ([Alex Zatelepin](https://github.com/ztlpn))
* 对于编号大于 10 的列，文本格式解析相关错误消息中打印的列号不正确。 [#4484](https://github.com/ClickHouse/ClickHouse/pull/4484) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 修复了启用 AVX 时的构建问题。[#4527](https://github.com/ClickHouse/ClickHouse/pull/4527) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 根据已知正常的版本来启用扩展核算和 IO 核算，而不再依据编译时所用的内核版本。[#4541](https://github.com/ClickHouse/ClickHouse/pull/4541) ([nvartolomei](https://github.com/nvartolomei))
* 允许跳过设置 core\_dump.size\_limit；如果设置限制失败，则发出警告而不是抛出异常。[#4473](https://github.com/ClickHouse/ClickHouse/pull/4473) ([proller](https://github.com/proller))
* 移除了 `Field.cpp` 中 `void readBinary(...)` 的 `inline` 标记。还合并了冗余的 `namespace DB` 块。[#4530](https://github.com/ClickHouse/ClickHouse/pull/4530) ([hcz](https://github.com/hczhcz))

<div id="clickhouse-release-19-3-5-2019-02-21">
  ### ClickHouse 发行版 19.3.5，2019-02-21
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了大型 HTTP insert 查询的处理问题。 [#4454](https://github.com/ClickHouse/ClickHouse/pull/4454) ([alesapin](https://github.com/alesapin))
* 修复了因 `send_logs_level` 设置实现错误而导致的与旧版本不向后兼容问题。 [#4445](https://github.com/ClickHouse/ClickHouse/pull/4445) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了因列注释而引入的表函数 `remote` 不向后兼容问题。 [#4446](https://github.com/ClickHouse/ClickHouse/pull/4446) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-3-4-2019-02-16">
  ### ClickHouse 发行版 19.3.4，2019-02-16
</div>

<div id="improvement">
  #### 改进
</div>

* 执行 `ATTACH TABLE` 查询时，表索引大小未计入内存限制。避免了表在分离后无法重新附加的问题。[#4396](https://github.com/ClickHouse/ClickHouse/pull/4396) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 略微提高了从 ZooKeeper 接收的最大 String 和 Array 大小限制。这样，在 ZooKeeper 上增大 `CLIENT_JVMFLAGS=-Djute.maxbuffer=...` 后，系统仍可继续正常工作。[#4398](https://github.com/ClickHouse/ClickHouse/pull/4398) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 即使某个被遗弃的副本的 queue 中已有大量节点，也允许对其进行修复。[#4399](https://github.com/ClickHouse/ClickHouse/pull/4399) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 `SET` 索引新增了一个必需参数 (最大存储行数) 。[#4386](https://github.com/ClickHouse/ClickHouse/pull/4386) ([Nikita Vasilev](https://github.com/nikvas0))

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了按单个 `LowCardinality` 键分组时 `WITH ROLLUP` 的结果错误。[#4384](https://github.com/ClickHouse/ClickHouse/pull/4384) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 修复了 set 索引中的一个错误 (如果某个粒度包含的行数超过 `max_rows`，则会丢弃该粒度) 。[#4386](https://github.com/ClickHouse/ClickHouse/pull/4386) ([Nikita Vasilev](https://github.com/nikvas0))
* 修复了大量 FreeBSD 构建问题。[#4397](https://github.com/ClickHouse/ClickHouse/pull/4397) ([proller](https://github.com/proller))
* 修复了当子查询中包含相同别名时，查询中的别名替换问题 (问题 [#4110](https://github.com/ClickHouse/ClickHouse/issues/4110)) 。[#4351](https://github.com/ClickHouse/ClickHouse/pull/4351) ([Artem Zuikov](https://github.com/4ertus2))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* 支持在 Docker 镜像中运行 `clickhouse-server` 进行无状态测试。[#4347](https://github.com/ClickHouse/ClickHouse/pull/4347) ([Vasily Nemkov](https://github.com/Enmk))

<div id="clickhouse-release-19-3-3-2019-02-13">
  ### ClickHouse 19.3.3 发行版，2019-02-13
</div>

<div id="new-feature">
  #### 新功能
</div>

* 新增了 `KILL MUTATION` 语句，可用于移除因各种原因卡住的变更。并为 `system.mutations` 表新增了 `latest_failed_part`、`latest_fail_time` 和 `latest_fail_reason` 字段，以便更方便地排查问题。[#4287](https://github.com/ClickHouse/ClickHouse/pull/4287) ([Alex Zatelepin](https://github.com/ztlpn))
* 新增了聚合函数 `entropy`，用于计算香农熵。[#4238](https://github.com/ClickHouse/ClickHouse/pull/4238) ([Quid37](https://github.com/Quid37))
* 现在可以直接向 server 发送 `INSERT INTO tbl VALUES (....` 查询，而无需拆分为 `query` 和 `data` 两个分片。[#4301](https://github.com/ClickHouse/ClickHouse/pull/4301) ([alesapin](https://github.com/alesapin))
* 新增了 `arrayWithConstant` 函数的通用实现。[#4322](https://github.com/ClickHouse/ClickHouse/pull/4322) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 实现了 `NOT BETWEEN` 比较运算符。[#4228](https://github.com/ClickHouse/ClickHouse/pull/4228) ([Dmitry Naumov](https://github.com/nezed))
* 实现了 `sumMapFiltered`，从而可以限制 `sumMap` 仅对指定键的值求和。[#4129](https://github.com/ClickHouse/ClickHouse/pull/4129) ([Léo Ercolanelli](https://github.com/ercolanelli-leo))
* `mysql` table function 现已支持 `Nullable` 类型。[#4198](https://github.com/ClickHouse/ClickHouse/pull/4198) ([Emmanuel Donin de Rosière](https://github.com/edonin))
* `LIMIT` clause 现已支持任意常量表达式。[#4246](https://github.com/ClickHouse/ClickHouse/pull/4246) ([k3box](https://github.com/k3box))
* 新增了聚合函数 `topKWeighted`，可接收一个额外的 (无符号整数) 权重 argument。[#4245](https://github.com/ClickHouse/ClickHouse/pull/4245) ([Andrew Golman](https://github.com/andrewgolman))
* `StorageJoin` 现在支持 `join_any_take_last_row` setting，允许覆盖相同 key 的现有值。[#3973](https://github.com/ClickHouse/ClickHouse/pull/3973) ([Amos Bird](https://github.com/amosbird)
* 新增了函数 `toStartOfInterval`。[#4304](https://github.com/ClickHouse/ClickHouse/pull/4304) ([Vitaly Baranov](https://github.com/vitlibar))
* 新增了 `RowBinaryWithNamesAndTypes` format。[#4200](https://github.com/ClickHouse/ClickHouse/pull/4200) ([Oleg V. Kozlyuk](https://github.com/DarkWanderer))
* 新增了 `IPv4` 和 `IPv6` 数据类型，并改进了 `IPv*` 函数的实现效率。[#3669](https://github.com/ClickHouse/ClickHouse/pull/3669) ([Vasily Nemkov](https://github.com/Enmk))
* 新增了函数 `toStartOfTenMinutes()`。[#4298](https://github.com/ClickHouse/ClickHouse/pull/4298) ([Vitaly Baranov](https://github.com/vitlibar))
* 新增了 `Protobuf` output format。[#4005](https://github.com/ClickHouse/ClickHouse/pull/4005) [#4158](https://github.com/ClickHouse/ClickHouse/pull/4158) ([Vitaly Baranov](https://github.com/vitlibar))
* 为用于数据导入 (INSERTs) 的 HTTP interface 新增了对 brotli 的支持。[#4235](https://github.com/ClickHouse/ClickHouse/pull/4235) ([Mikhail](https://github.com/fandyushin))
* 当用户在命令行客户端中输错函数名或类型名时，新增了提示信息。[#4239](https://github.com/ClickHouse/ClickHouse/pull/4239) ([Danila Kutenin](https://github.com/danlark1))
* 在 Server 的 HTTP 响应请求头中新增了 `Query-Id`。[#4231](https://github.com/ClickHouse/ClickHouse/pull/4231) ([Mikhail](https://github.com/fandyushin))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 为 MergeTree 表引擎家族新增了 `minmax` 和 `set` 数据跳过索引。[#4143](https://github.com/ClickHouse/ClickHouse/pull/4143) ([Nikita Vasilev](https://github.com/nikvas0))
* 新增了在可能时将 `CROSS JOIN` 转换为 `INNER JOIN` 的功能。[#4221](https://github.com/ClickHouse/ClickHouse/pull/4221) [#4266](https://github.com/ClickHouse/ClickHouse/pull/4266) ([Artem Zuikov](https://github.com/4ertus2))

<div id="bug-fix">
  #### 问题修复
</div>

* 修复了 `JOIN ON` 部分中因重复列而报出的 `Not found column` 问题。[#4279](https://github.com/ClickHouse/ClickHouse/pull/4279) ([Artem Zuikov](https://github.com/4ertus2))
* 使 `START REPLICATED SENDS` 命令能够启动复制发送。 [#4229](https://github.com/ClickHouse/ClickHouse/pull/4229) ([nvartolomei](https://github.com/nvartolomei))
* 修复了以 `Array(LowCardinality)` 作为参数的 aggregate functions 执行问题。[#4055](https://github.com/ClickHouse/ClickHouse/pull/4055) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 修复了执行 `INSERT ... SELECT ... FROM file(...)` 查询时的错误行为：当文件格式为 `CSVWithNames` 或 `TSVWIthNames`，且首行数据缺失时，会出现该问题。[#4297](https://github.com/ClickHouse/ClickHouse/pull/4297) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在字典不可用时重新加载字典会导致崩溃的问题。该 bug 于 19.1.6 中引入。[#4188](https://github.com/ClickHouse/ClickHouse/pull/4188) ([proller](https://github.com/proller))
* 修复了右表存在重复项时 `ALL JOIN` 的问题。[#4184](https://github.com/ClickHouse/ClickHouse/pull/4184) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了在 `use_uncompressed_cache=1` 时的段错误，以及因未压缩大小错误而引发的异常。该 bug 出现在 19.1.6 中。[#4186](https://github.com/ClickHouse/ClickHouse/pull/4186) ([alesapin](https://github.com/alesapin))
* 修复了 `compile_expressions` 在比较较大日期值 (超过 int16) 时的错误。[#4341](https://github.com/ClickHouse/ClickHouse/pull/4341) ([alesapin](https://github.com/alesapin))
* 修复了从表函数 `numbers(0)` 选择数据时出现的无限循环问题。[#4280](https://github.com/ClickHouse/ClickHouse/pull/4280) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 临时禁用 `ORDER BY` 的谓词优化。[#3890](https://github.com/ClickHouse/ClickHouse/pull/3890) ([Winter Zhang](https://github.com/zhang2014))
* 修复了在旧款 CPU 上使用 base64 函数时出现的 `Illegal instruction` 错误。该错误仅在使用 gcc-8 编译 ClickHouse 时才会复现。 [#4275](https://github.com/ClickHouse/ClickHouse/pull/4275) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了通过 TLS 连接与 PostgreSQL ODBC Driver 交互时出现的 `No message received` error。还修复了使用 MySQL ODBC Driver 时发生的段错误。[#4170](https://github.com/ClickHouse/ClickHouse/pull/4170) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在条件运算符 (函数 `if`) 的分支中使用 `Date` 和 `DateTime` 参数时返回结果不正确的问题。为函数 `if` 添加了通用处理逻辑。[#4243](https://github.com/ClickHouse/ClickHouse/pull/4243) ([alexey-milovidov](https://github.com/alexey-milovidov))
* ClickHouse 字典现已在 `clickhouse` 进程内加载。[#4166](https://github.com/ClickHouse/ClickHouse/pull/4166) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在带有 `File` 表引擎的表上执行 `SELECT` 并在出现 `No such file or directory` 错误后重试时发生的死锁问题。 [#4161](https://github.com/ClickHouse/ClickHouse/pull/4161) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在查询 `system.tables` 时可能出现 `table does not exist` 错误的竞态条件。[#4313](https://github.com/ClickHouse/ClickHouse/pull/4313) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 如果以交互模式运行，`clickhouse-client` 在为命令行提示加载数据时退出，可能会发生段错误。[#4317](https://github.com/ClickHouse/ClickHouse/pull/4317) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个错误：执行包含 `IN` 运算符的变更时会产生错误结果。[#4099](https://github.com/ClickHouse/ClickHouse/pull/4099) ([Alex Zatelepin](https://github.com/ztlpn))
* 已修复以下错误：如果存在使用 `Dictionary` 引擎的数据库，服务器启动时会强制加载所有字典；而如果某个字典使用来自 localhost 的 ClickHouse 源，则该字典将无法加载。[#4255](https://github.com/ClickHouse/ClickHouse/pull/4255) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了服务器关闭时再次尝试创建系统日志所导致的错误。[#4254](https://github.com/ClickHouse/ClickHouse/pull/4254) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在 `joinGet` 函数中正确返回相应类型，并妥善处理锁。[#4153](https://github.com/ClickHouse/ClickHouse/pull/4153) ([Amos Bird](https://github.com/amosbird))
* 新增了 `sumMapWithOverflow` 函数。[#4151](https://github.com/ClickHouse/ClickHouse/pull/4151) ([Léo Ercolanelli](https://github.com/ercolanelli-leo))
* 修复了由 `allow_experimental_multiple_joins_emulation` 引发的段错误。[52de2c](https://github.com/ClickHouse/ClickHouse/commit/52de2cd927f7b5257dd67e175f0a5560a48840d0) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了 `Date` 和 `DateTime` 比较错误的问题。[#4237](https://github.com/ClickHouse/ClickHouse/pull/4237) ([valexey](https://github.com/valexey))
* 修复了在未定义行为检测器下运行的模糊测试：为 `quantile*Weighted` 函数家族添加了参数类型检查。[#4145](https://github.com/ClickHouse/ClickHouse/pull/4145) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个罕见的竞态条件：删除旧数据分区片段时可能会因 `File not found` 错误而失败。[#4378](https://github.com/ClickHouse/ClickHouse/pull/4378) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复安装包中缺少 /etc/clickhouse-server/config.xml 的问题。[#4343](https://github.com/ClickHouse/ClickHouse/pull/4343) ([proller](https://github.com/proller))

<div id="buildtestingpackaging-improvement">
  #### 构建/测试/打包改进
</div>

* Debian 软件包：根据配置修正 /etc/clickhouse-server/preprocessed 链接。 [#4205](https://github.com/ClickHouse/ClickHouse/pull/4205) ([proller](https://github.com/proller))
* 修复了 FreeBSD 上的多项构建问题。 [#4225](https://github.com/ClickHouse/ClickHouse/pull/4225) ([proller](https://github.com/proller))
* 在 perftest 中新增了创建、填充和删除表的功能。 [#4220](https://github.com/ClickHouse/ClickHouse/pull/4220) ([alesapin](https://github.com/alesapin))
* 添加了一个用于检查重复 include 的脚本。 [#4326](https://github.com/ClickHouse/ClickHouse/pull/4326) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在性能测试中新增了按索引运行查询的功能。 [#4264](https://github.com/ClickHouse/ClickHouse/pull/4264) ([alesapin](https://github.com/alesapin))
* 现建议安装包含调试符号的软件包。 [#4274](https://github.com/ClickHouse/ClickHouse/pull/4274) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 重构了 performance-test，改进了日志记录和信号处理。 [#4171](https://github.com/ClickHouse/ClickHouse/pull/4171) ([alesapin](https://github.com/alesapin))
* 为匿名化的 Yandex.Metrica 数据集添加了文档。 [#4164](https://github.com/ClickHouse/ClickHouse/pull/4164) ([alesapin](https://github.com/alesapin))
* 添加了一个工具，用于将旧的按月分区分片转换为自定义分区格式。 [#4195](https://github.com/ClickHouse/ClickHouse/pull/4195) ([Alex Zatelepin](https://github.com/ztlpn))
* 添加了关于 S3 中两个数据集的文档。 [#4144](https://github.com/ClickHouse/ClickHouse/pull/4144) ([alesapin](https://github.com/alesapin))
* 添加了一个根据拉取请求描述生成更新日志的脚本。 [#4169](https://github.com/ClickHouse/ClickHouse/pull/4169) [#4173](https://github.com/ClickHouse/ClickHouse/pull/4173) ([KochetovNicolai](https://github.com/KochetovNicolai)) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 为 ClickHouse 添加了 puppet 模块。 [#4182](https://github.com/ClickHouse/ClickHouse/pull/4182) ([Maxim Fedotov](https://github.com/MaxFedotov))
* 为一组此前没有文档说明的函数补充了文档。 [#4168](https://github.com/ClickHouse/ClickHouse/pull/4168) ([Winter Zhang](https://github.com/zhang2014))
* 修复了 ARM 构建问题。 [#4210](https://github.com/ClickHouse/ClickHouse/pull/4210)[#4306](https://github.com/ClickHouse/ClickHouse/pull/4306) [#4291](https://github.com/ClickHouse/ClickHouse/pull/4291) ([proller](https://github.com/proller)) ([proller](https://github.com/proller))
* 现在可以通过 `ctest` 运行字典测试。 [#4189](https://github.com/ClickHouse/ClickHouse/pull/4189) ([proller](https://github.com/proller))
* 现在默认使用 `/etc/ssl` 作为 SSL 证书目录。 [#4167](https://github.com/ClickHouse/ClickHouse/pull/4167) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 添加了启动时检查 SSE 和 AVX 指令的功能。 [#4234](https://github.com/ClickHouse/ClickHouse/pull/4234) ([Igr](https://github.com/igron99))
* Init 脚本会等待服务器启动完成。 [#4281](https://github.com/ClickHouse/ClickHouse/pull/4281) ([proller](https://github.com/proller))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* 已移除 `allow_experimental_low_cardinality_type` 设置。`LowCardinality` 数据类型现已可用于生产环境。[#4323](https://github.com/ClickHouse/ClickHouse/pull/4323) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 根据可用内存大小，相应减小 mark cache 和 uncompressed cache 的大小。[#4240](https://github.com/ClickHouse/ClickHouse/pull/4240) ([Lopatin Konstantin](https://github.com/k-lopatin)
* 在 `CREATE TABLE` 查询中新增了关键字 `INDEX`。名称为 `index` 的列必须用反引号或双引号括起来：`` `index` ``。[#4143](https://github.com/ClickHouse/ClickHouse/pull/4143) ([Nikita Vasilev](https://github.com/nikvas0))
* `sumMap` 现在会提升结果类型，而不再发生 overflow。旧版 `sumMap` 的行为可通过使用 `sumMapWithOverflow` 函数获得。[#4151](https://github.com/ClickHouse/ClickHouse/pull/4151) ([Léo Ercolanelli](https://github.com/ercolanelli-leo))

<div id="performance-improvement">
  #### 性能改进
</div>

* 对于不带 `LIMIT` 的查询，已将 `std::sort` 替换为 `pdqsort`。[#4236](https://github.com/ClickHouse/ClickHouse/pull/4236) ([Evgenii Pravda](https://github.com/kvinty))
* 现在服务器会复用全局线程池中的线程。这会在某些边缘场景下影响性能。[#4150](https://github.com/ClickHouse/ClickHouse/pull/4150) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="improvement">
  #### 改进
</div>

* 为 FreeBSD 增加了 AIO 支持。[#4305](https://github.com/ClickHouse/ClickHouse/pull/4305) ([urgordeadbeef](https://github.com/urgordeadbeef))
* `SELECT * FROM a JOIN b USING a, b` 现在只会返回左表中的 `a` 和 `b` 列。[#4141](https://github.com/ClickHouse/ClickHouse/pull/4141) ([Artem Zuikov](https://github.com/4ertus2))
* 允许客户端的 `-C` 选项与 `-c` 选项具有相同效果。[#4232](https://github.com/ClickHouse/ClickHouse/pull/4232) ([syominsergey](https://github.com/syominsergey))
* 现在，如果 `--password` 选项未带值使用，则会要求从 stdin 读取密码。[#4230](https://github.com/ClickHouse/ClickHouse/pull/4230) ([BSD\_Conqueror](https://github.com/bsd-conqueror))
* 为包含 `LIKE` 表达式或正则表达式的字符串字面量中未转义的元字符增加了高亮显示。[#4327](https://github.com/ClickHouse/ClickHouse/pull/4327) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 增加了在客户端套接字断开时取消 HTTP 只读查询的功能。[#4213](https://github.com/ClickHouse/ClickHouse/pull/4213) ([nvartolomei](https://github.com/nvartolomei))
* 现在服务端会报告进度，以保持客户端连接存活。[#4215](https://github.com/ClickHouse/ClickHouse/pull/4215) ([Ivan](https://github.com/abyss7))
* 在启用 `optimize_throw_if_noop` 设置时，改进了 OPTIMIZE 查询的原因提示信息。[#4294](https://github.com/ClickHouse/ClickHouse/pull/4294) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 为 ClickHouse server 增加了对 `--version` 选项的支持。[#4251](https://github.com/ClickHouse/ClickHouse/pull/4251) ([Lopatin Konstantin](https://github.com/k-lopatin))
* 为 `clickhouse-server` 增加了 `--help/-h` 选项。[#4233](https://github.com/ClickHouse/ClickHouse/pull/4233) ([Yuriy Baranov](https://github.com/yurriy))
* 增加了对返回 aggregate function state 结果的标量子查询的支持。[#4348](https://github.com/ClickHouse/ClickHouse/pull/4348) ([Nikolai Kochetov](https://github.com/KochetovNicolai))
* 改进了服务端关闭耗时以及 ALTER 等待时间。[#4372](https://github.com/ClickHouse/ClickHouse/pull/4372) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 在 system.replicas 中增加了关于 replicated\_can\_become\_leader 设置的信息，并在副本不会尝试成为 leader 时增加了日志。[#4379](https://github.com/ClickHouse/ClickHouse/pull/4379) ([Alex Zatelepin](https://github.com/ztlpn))

<div id="clickhouse-release-19-1">
  ## ClickHouse 19.1 发行版
</div>

<div id="clickhouse-release-19-1-14-2019-03-14">
  ### ClickHouse 发行版 19.1.14, 2019-03-14
</div>

* 修复了一个错误：在使用 `GLOBAL JOIN` 和 `SELECT *`，且将设置 `asterisk_left_columns_only` 设为 1 时，可能会出现 `Column ... queried more than once` (罕见情况) 。该问题在 19.3 及更高版本中不存在。 [6bac7d8d](https://github.com/ClickHouse/ClickHouse/pull/4692/commits/6bac7d8d11a9b0d6de0b32b53c47eb2f6f8e7062) ([Artem Zuikov](https://github.com/4ertus2))

<div id="clickhouse-release-19-1-13-2019-03-12">
  ### ClickHouse 发行版 19.1.13, 2019-03-12
</div>

此版本所含补丁与 19.3.7 完全相同。

<div id="clickhouse-release-19-1-10-2019-03-03">
  ### ClickHouse 发行版 19.1.10，2019-03-03
</div>

此版本包含与 19.3.6 完全相同的补丁。

<div id="clickhouse-release-19-1-1">
  ## ClickHouse 发行版 19.1
</div>

<div id="clickhouse-release-19-1-9-2019-02-21">
  ### ClickHouse 发行版 19.1.9，2019-02-21
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复了因 `send_logs_level` 设置实现错误而导致与旧版本不兼容的问题。[#4445](https://github.com/ClickHouse/ClickHouse/pull/4445) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了因列注释而引入的表函数 `remote` 与旧版本不兼容的问题。[#4446](https://github.com/ClickHouse/ClickHouse/pull/4446) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-1-8-2019-02-16">
  ### ClickHouse 发行版 19.1.8，2019-02-16
</div>

<div id="bug-fix-4">
  #### 缺陷修复
</div>

* 修复在缺少 /etc/clickhouse-server/config.xml 时安装包出现的问题。[#4343](https://github.com/ClickHouse/ClickHouse/pull/4343) ([proller](https://github.com/proller))

<div id="clickhouse-release-19-1-1">
  ## ClickHouse 发行版 19.1
</div>

<div id="clickhouse-release-19-1-7-2019-02-15">
  ### ClickHouse 发行版 19.1.7，2019-02-15
</div>

<div id="bug-fix">
  #### 问题修复
</div>

* 在 `joinGet` 函数中正确返回相应类型，并妥善处理锁。[#4153](https://github.com/ClickHouse/ClickHouse/pull/4153) ([Amos Bird](https://github.com/amosbird))
* 修复了服务器关闭时再次尝试创建系统日志而导致的错误。 [#4254](https://github.com/ClickHouse/ClickHouse/pull/4254) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个错误：如果存在使用 `Dictionary` 引擎的数据库，所有字典都会在服务器启动时强制加载；而如果某个字典使用来自 localhost 的 ClickHouse 源，则该字典将无法加载。[#4255](https://github.com/ClickHouse/ClickHouse/pull/4255) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了执行包含 `IN` 运算符的变更时会产生错误结果的问题。[#4099](https://github.com/ClickHouse/ClickHouse/pull/4099) ([Alex Zatelepin](https://github.com/ztlpn))
* 如果以交互模式运行 `clickhouse-client`，则在退出时为命令行建议加载数据的过程中可能会发生段错误。[#4317](https://github.com/ClickHouse/ClickHouse/pull/4317) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从 `system.tables` 查询时可能因竞态条件导致 `table does not exist` 错误的问题。[#4313](https://github.com/ClickHouse/ClickHouse/pull/4313) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了从使用 `File` 表引擎的表执行 `SELECT` 时，在出现 `No such file or directory` 错误后重试会导致死锁的问题。[#4161](https://github.com/ClickHouse/ClickHouse/pull/4161) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了一个问题：本地 ClickHouse 字典会通过 TCP 加载，但其实应在进程内加载。[#4166](https://github.com/ClickHouse/ClickHouse/pull/4166) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了通过 TLS 连接与 PostgreSQL ODBC Driver 交互时出现的 `No message received` 错误。还修复了使用 MySQL ODBC Driver 时的段错误。[#4170](https://github.com/ClickHouse/ClickHouse/pull/4170) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 暂时禁用 `ORDER BY` 的谓词优化。[#3890](https://github.com/ClickHouse/ClickHouse/pull/3890) ([Winter Zhang](https://github.com/zhang2014))
* 修复了从表函数 `numbers(0)` 进行查询时陷入无限循环的问题。[#4280](https://github.com/ClickHouse/ClickHouse/pull/4280) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `compile_expressions` 在比较较大 (超过 int16) 的日期时的 bug。[#4341](https://github.com/ClickHouse/ClickHouse/pull/4341) ([alesapin](https://github.com/alesapin))
* 修复了 `uncompressed_cache=1` 时发生的段错误，以及由未压缩大小错误引发的异常。[#4186](https://github.com/ClickHouse/ClickHouse/pull/4186) ([alesapin](https://github.com/alesapin))
* 修复了右侧表存在重复行时的 `ALL JOIN` 问题。[#4184](https://github.com/ClickHouse/ClickHouse/pull/4184) ([Artem Zuikov](https://github.com/4ertus2))
* 修复了执行 `INSERT ... SELECT ... FROM file(...)` 查询时的错误行为：当文件采用 `CSVWithNames` 或 `TSVWIthNames` 格式且首行数据缺失时，会出现该问题。[#4297](https://github.com/ClickHouse/ClickHouse/pull/4297) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了使用 `Array(LowCardinality)` 参数时聚合函数的执行问题。[#4055](https://github.com/ClickHouse/ClickHouse/pull/4055) ([KochetovNicolai](https://github.com/KochetovNicolai))
* Debian 软件包：根据配置更正 /etc/clickhouse-server/preprocessed 链接。[#4205](https://github.com/ClickHouse/ClickHouse/pull/4205) ([proller](https://github.com/proller))
* 修复了在未定义行为检测器下运行的模糊测试：为 `quantile*Weighted` 函数家族添加了参数类型检查。[#4145](https://github.com/ClickHouse/ClickHouse/pull/4145) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 使 `START REPLICATED SENDS` 命令能够启动复制发送。[#4229](https://github.com/ClickHouse/ClickHouse/pull/4229) ([nvartolomei](https://github.com/nvartolomei))
* 修复了 JOIN ON 部分中因重复列而出现的 `Not found column` 问题。[#4279](https://github.com/ClickHouse/ClickHouse/pull/4279) ([Artem Zuikov](https://github.com/4ertus2))
* 现在默认使用 `/etc/ssl` 目录存放 SSL 证书。[#4167](https://github.com/ClickHouse/ClickHouse/pull/4167) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在字典不可用时重新加载字典导致崩溃的问题。[#4188](https://github.com/ClickHouse/ClickHouse/pull/4188) ([proller](https://github.com/proller))
* 修复了 `Date` 和 `DateTime` 比较错误的问题。[#4237](https://github.com/ClickHouse/ClickHouse/pull/4237) ([valexey](https://github.com/valexey))
* 修复了在条件运算符 (函数 `if`) 的分支中使用 `Date` 和 `DateTime` 参数时结果不正确的问题。为函数 `if` 添加了通用处理。[#4243](https://github.com/ClickHouse/ClickHouse/pull/4243) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="clickhouse-release-19-1-6-2019-01-24">
  ### ClickHouse 发行版 19.1.6，发布于 2019-01-24
</div>

<div id="new-feature">
  #### 新功能
</div>

* 为表新增按列自定义压缩编解码器的功能。[#3899](https://github.com/ClickHouse/ClickHouse/pull/3899) [#4111](https://github.com/ClickHouse/ClickHouse/pull/4111) ([alesapin](https://github.com/alesapin), [Winter Zhang](https://github.com/zhang2014), [Anatoly](https://github.com/Sindbag))
* 新增压缩编解码器 `Delta`。[#4052](https://github.com/ClickHouse/ClickHouse/pull/4052) ([alesapin](https://github.com/alesapin))
* 允许通过 `ALTER` 修改压缩编解码器。[#4054](https://github.com/ClickHouse/ClickHouse/pull/4054) ([alesapin](https://github.com/alesapin))
* 为兼容 SQL 标准，新增函数 `left`、`right`、`trim`、`ltrim`、`rtrim`、`timestampadd`、`timestampsub`。[#3826](https://github.com/ClickHouse/ClickHouse/pull/3826) ([Ivan Blinkov](https://github.com/blinkov))
* 支持向 `HDFS` 表和 `hdfs` 表函数写入。[#4084](https://github.com/ClickHouse/ClickHouse/pull/4084) ([alesapin](https://github.com/alesapin))
* 新增用于在大型 haystack 中搜索多个常量字符串的函数：`multiPosition`、`multiSearch`、`firstMatch`，以及它们的 `-UTF8`、`-CaseInsensitive` 和 `-CaseInsensitiveUTF8` 变体。[#4053](https://github.com/ClickHouse/ClickHouse/pull/4053) ([Danila Kutenin](https://github.com/danlark1))
* 如果 `SELECT` 查询按分片键过滤，则会跳过未使用的分片 (设置 `optimize_skip_unused_shards`) 。[#3851](https://github.com/ClickHouse/ClickHouse/pull/3851) ([Gleb Kanterov](https://github.com/kanterov), [Ivan](https://github.com/abyss7))
* 允许 `Kafka` 引擎忽略每个块中的一定数量解析错误。[#4094](https://github.com/ClickHouse/ClickHouse/pull/4094) ([Ivan](https://github.com/abyss7))
* 新增对 `CatBoost` 多分类模型评估的支持。函数 `modelEvaluate` 会返回一个 Tuple，其中包含多分类模型各类别的原始预测值。`libcatboostmodel.so` 应基于 [#607](https://github.com/catboost/catboost/pull/607) 构建。[#3959](https://github.com/ClickHouse/ClickHouse/pull/3959) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 新增函数 `filesystemAvailable`、`filesystemFree`、`filesystemCapacity`。[#4097](https://github.com/ClickHouse/ClickHouse/pull/4097) ([Boris Granveaud](https://github.com/bgranvea))
* 新增哈希函数 `xxHash64` 和 `xxHash32`。[#3905](https://github.com/ClickHouse/ClickHouse/pull/3905) ([filimonov](https://github.com/filimonov))
* 新增 `gccMurmurHash` 哈希函数 (GCC 风格的 Murmur 哈希) ，其使用与 [gcc](https://github.com/gcc-mirror/gcc/blob/41d6b10e96a1de98e90a7c0378437c3255814b16/libstdc%2B%2B-v3/include/bits/functional_hash.h#L191) 相同的哈希种子。[#4000](https://github.com/ClickHouse/ClickHouse/pull/4000) ([sundyli](https://github.com/sundy-li))
* 新增哈希函数 `javaHash`、`hiveHash`。[#3811](https://github.com/ClickHouse/ClickHouse/pull/3811) ([shangshujie365](https://github.com/shangshujie365))
* 新增表函数 `remoteSecure`。该函数与 `remote` 类似，但使用安全连接。[#4088](https://github.com/ClickHouse/ClickHouse/pull/4088) ([proller](https://github.com/proller))

<div id="experimental-feature">
  #### Experimental 功能
</div>

* 新增了多个 JOIN 的模拟功能 (`allow_experimental_multiple_joins_emulation` setting) 。[#3946](https://github.com/ClickHouse/ClickHouse/pull/3946) ([Artem Zuikov](https://github.com/4ertus2))

<div id="bug-fix">
  #### 问题修复
</div>

* 默认限制 `compiled_expression_cache_size` 设置，以降低内存消耗。[#4041](https://github.com/ClickHouse/ClickHouse/pull/4041) ([alesapin](https://github.com/alesapin))
* 修复了一个 bug，该问题会导致执行复制表 ALTER 操作的线程，以及从 ZooKeeper 更新配置的线程发生卡住。[#2947](https://github.com/ClickHouse/ClickHouse/issues/2947) [#3891](https://github.com/ClickHouse/ClickHouse/issues/3891) [#3934](https://github.com/ClickHouse/ClickHouse/pull/3934) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复了执行分布式 ALTER 任务时的一个竞态条件。该竞态条件会导致多个副本同时尝试执行该任务，最终除一个副本外，其余所有副本都会因 ZooKeeper 错误而失败。[#3904](https://github.com/ClickHouse/ClickHouse/pull/3904) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复了一个 bug：当向 ZooKeeper 的请求超时后，`from_zk` 配置元素未被刷新。[#2947](https://github.com/ClickHouse/ClickHouse/issues/2947) [#3947](https://github.com/ClickHouse/ClickHouse/pull/3947) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复了 IPv4 子网掩码前缀不正确的问题。[#3945](https://github.com/ClickHouse/ClickHouse/pull/3945) ([alesapin](https://github.com/alesapin))
* 修复了在极少数情况下，由于资源耗尽无法创建新线程而导致的崩溃 (`std::terminate`) 。[#3956](https://github.com/ClickHouse/ClickHouse/pull/3956) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 `remote` 表函数执行时，`getStructureOfRemoteTable` 中使用错误限制条件导致的 bug。[#4009](https://github.com/ClickHouse/ClickHouse/pull/4009) ([alesapin](https://github.com/alesapin))
* 修复了 netlink 套接字泄漏问题。它们被放入一个永远不会清理的池中；当现有套接字都在使用时，新线程启动时还会创建新的套接字。[#4017](https://github.com/ClickHouse/ClickHouse/pull/4017) ([Alex Zatelepin](https://github.com/ztlpn))
* 修复了这样一个问题：在 fork 出 `odbc-bridge` 子进程后，还没从 `/proc` 读取完所有 fd，就提前关闭了 `/proc/self/fd` 目录。[#4120](https://github.com/ClickHouse/ClickHouse/pull/4120) ([alesapin](https://github.com/alesapin))
* 修复了主键使用 String 时，String 到 UInt 的单调转换问题。[#3870](https://github.com/ClickHouse/ClickHouse/pull/3870) ([Winter Zhang](https://github.com/zhang2014))
* 修复了整数转换函数单调性计算中的 error。[#3921](https://github.com/ClickHouse/ClickHouse/pull/3921) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在某些参数无效时，`arrayEnumerateUniq` 和 `arrayEnumerateDense` 函数中发生的段错误。[#3909](https://github.com/ClickHouse/ClickHouse/pull/3909) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复 StorageMerge 中的 UB 问题。[#3910](https://github.com/ClickHouse/ClickHouse/pull/3910) ([Amos Bird](https://github.com/amosbird))
* 修复了函数 `addDays` 和 `subtractDays` 中的段错误。[#3913](https://github.com/ClickHouse/ClickHouse/pull/3913) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 已修复错误：函数 `round`、`floor`、`trunc`、`ceil` 在参数为整数且标度为较大负值时，可能返回错误结果。[#3914](https://github.com/ClickHouse/ClickHouse/pull/3914) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了由 'kill query sync' 引发的一个 bug，该问题会导致核心转储。[#3916](https://github.com/ClickHouse/ClickHouse/pull/3916) ([muVulDeePecker](https://github.com/fancyqlx))
* 修复复制队列清空后出现长时间延迟的问题。[#3928](https://github.com/ClickHouse/ClickHouse/pull/3928) [#3932](https://github.com/ClickHouse/ClickHouse/pull/3932) ([alesapin](https://github.com/alesapin))
* 修复了向主键为 `LowCardinality` 的表中插入数据时内存占用过高的问题。[#3955](https://github.com/ClickHouse/ClickHouse/pull/3955) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 修复了空数组情况下 `Native` 格式中 `LowCardinality` 的序列化问题。[#3907](https://github.com/ClickHouse/ClickHouse/issues/3907) [#4011](https://github.com/ClickHouse/ClickHouse/pull/4011) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 修复了对单个 LowCardinality 数值列执行 distinct 时结果错误的问题。[#3895](https://github.com/ClickHouse/ClickHouse/issues/3895) [#4012](https://github.com/ClickHouse/ClickHouse/pull/4012) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 修复了启用 `compile` 设置时，使用 LowCardinality 键进行专用聚合的问题。[#3886](https://github.com/ClickHouse/ClickHouse/pull/3886) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 修复复制表查询中用户和密码的转发问题。[#3957](https://github.com/ClickHouse/ClickHouse/pull/3957) ([alesapin](https://github.com/alesapin)) ([小路](https://github.com/nicelulu))
* 修复了一个极少发生的竞态条件：重新加载字典时，列出 Dictionary database 中的表可能会触发该问题。[#3970](https://github.com/ClickHouse/ClickHouse/pull/3970) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 HAVING 与 ROLLUP 或 CUBE 一起使用时结果错误的问题。[#3756](https://github.com/ClickHouse/ClickHouse/issues/3756) [#3837](https://github.com/ClickHouse/ClickHouse/pull/3837) ([Sam Chou](https://github.com/reflection))
* 修复了在使用 `JOIN ON` 语法和分布式表时，查询中的列别名问题。[#3980](https://github.com/ClickHouse/ClickHouse/pull/3980) ([Winter Zhang](https://github.com/zhang2014))
* 修复了 `quantileTDigest` 内部实现中的错误 (由 Artem Vakhrushev 发现) 。该错误在 ClickHouse 中从未出现过，只影响那些直接将 ClickHouse 代码库作为库使用的用户。[#3935](https://github.com/ClickHouse/ClickHouse/pull/3935) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="improvement">
  #### 改进
</div>

* 在 `ALTER TABLE ADD COLUMN` 语句中支持 `IF NOT EXISTS`，并在 `DROP/MODIFY/CLEAR/COMMENT COLUMN` 中支持 `IF EXISTS`。[#3900](https://github.com/ClickHouse/ClickHouse/pull/3900) ([Boris Granveaud](https://github.com/bgranvea))
* 函数 `parseDateTimeBestEffort`：支持 `DD.MM.YYYY`、`DD.MM.YY`、`DD-MM-YYYY`、`DD-Mon-YYYY`、`DD/Month/YYYY` 等类似格式。[#3922](https://github.com/ClickHouse/ClickHouse/pull/3922) ([alexey-milovidov](https://github.com/alexey-milovidov))
* `CapnProtoInputStream` 现在支持不规则结构。[#4063](https://github.com/ClickHouse/ClickHouse/pull/4063) ([Odin Hultgren Van Der Horst](https://github.com/Miniwoffer))
* 易用性改进：新增检查，确保服务器进程由数据目录的所有者启动。如果数据归属于非 root 用户，则不允许以 root 身份启动服务器。[#3785](https://github.com/ClickHouse/ClickHouse/pull/3785) ([sergey-v-galtsev](https://github.com/sergey-v-galtsev))
* 改进了在分析带有 JOIN 的查询时检查所需列的逻辑。[#3930](https://github.com/ClickHouse/ClickHouse/pull/3930) ([Artem Zuikov](https://github.com/4ertus2))
* 在单台服务器上存在大量分布式表时，减少了连接数量。[#3726](https://github.com/ClickHouse/ClickHouse/pull/3726) ([Winter Zhang](https://github.com/zhang2014))
* ODBC 驱动程序现已支持 `WITH TOTALS` 查询的总计行。[#3836](https://github.com/ClickHouse/ClickHouse/pull/3836) ([Maksim Koritckiy](https://github.com/nightweb))
* 允许在 if 函数中将 `Enum` 作为整数使用。[#3875](https://github.com/ClickHouse/ClickHouse/pull/3875) ([Ivan](https://github.com/abyss7))
* 新增 `low_cardinality_allow_in_native_format` 设置。如果禁用，则不会在 `Native` 格式中使用 `LowCadrinality` 类型。[#3879](https://github.com/ClickHouse/ClickHouse/pull/3879) ([KochetovNicolai](https://github.com/KochetovNicolai))
* 从已编译表达式缓存中移除了一些冗余对象，以降低内存占用。[#4042](https://github.com/ClickHouse/ClickHouse/pull/4042) ([alesapin](https://github.com/alesapin))
* 新增检查，确保 `SET send_logs_level = 'value'` 查询只接受合适的值。[#3873](https://github.com/ClickHouse/ClickHouse/pull/3873) ([Sabyanin Maxim](https://github.com/s-mx))
* 修复了类型转换函数中的数据类型检查。[#3896](https://github.com/ClickHouse/ClickHouse/pull/3896) ([Winter Zhang](https://github.com/zhang2014))

<div id="performance-improvement">
  #### 性能改进
</div>

* 新增 MergeTree 设置 `use_minimalistic_part_header_in_zookeeper`。启用后，复制表会将 compact part 的元数据存储在单个 part znode 中。这可以显著减小 ZooKeeper 快照的大小 (尤其是在表包含很多列时) 。请注意，启用此设置后，将无法再降级到不支持它的版本。[#3960](https://github.com/ClickHouse/ClickHouse/pull/3960) ([Alex Zatelepin](https://github.com/ztlpn))
* 为函数 `sequenceMatch` 和 `sequenceCount` 新增了基于 DFA 的实现，适用于 pattern 不包含时间信息的情况。[#4004](https://github.com/ClickHouse/ClickHouse/pull/4004) ([Léo Ercolanelli](https://github.com/ercolanelli-leo))
* 提升了整数序列化的性能。[#3968](https://github.com/ClickHouse/ClickHouse/pull/3968) ([Amos Bird](https://github.com/amosbird))
* 对 PODArray 左侧补零，使得 -1 位置的元素始终有效且为 0。这用于无分支计算 offset。[#3920](https://github.com/ClickHouse/ClickHouse/pull/3920) ([Amos Bird](https://github.com/amosbird))
* 回退了导致性能下降的 `jemalloc` 版本。[#4018](https://github.com/ClickHouse/ClickHouse/pull/4018) ([alexey-milovidov](https://github.com/alexey-milovidov))

<div id="backward-incompatible-change-5">
  #### 向后不兼容的变更
</div>

* 移除了未公开文档说明的功能 `ALTER MODIFY PRIMARY KEY`，因为它已被 `ALTER MODIFY ORDER BY` 命令替代。[#3887](https://github.com/ClickHouse/ClickHouse/pull/3887) ([Alex Zatelepin](https://github.com/ztlpn))
* 移除了函数 `shardByHash`。[#3833](https://github.com/ClickHouse/ClickHouse/pull/3833) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 禁止使用返回类型为 `AggregateFunction` 的标量子查询。[#3865](https://github.com/ClickHouse/ClickHouse/pull/3865) ([Ivan](https://github.com/abyss7))

<div id="buildtestingpackaging-improvements-6">
  #### 构建/测试/打包方面的改进
</div>

* 新增了对 PowerPC (`ppc64le`) 构建的支持。[#4132](https://github.com/ClickHouse/ClickHouse/pull/4132) ([Danila Kutenin](https://github.com/danlark1))
* 有状态功能测试现已在公开可用的数据集上运行。[#3969](https://github.com/ClickHouse/ClickHouse/pull/3969) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了在 Docker 或 systemd-nspawn 中，出现 `bash: /usr/bin/clickhouse-extract-from-config: Operation not permitted` 消息时服务器无法启动的问题。[#4136](https://github.com/ClickHouse/ClickHouse/pull/4136) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 `rdkafka` 库更新至 v1.0.0-RC5。使用 cppkafka 替代原始 C 接口。[#4025](https://github.com/ClickHouse/ClickHouse/pull/4025) ([Ivan](https://github.com/abyss7))
* 更新了 `mariadb-client` 库。修复了 UBSan 发现的一个问题。[#3924](https://github.com/ClickHouse/ClickHouse/pull/3924) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 针对 UBSan 构建的若干修复。[#3926](https://github.com/ClickHouse/ClickHouse/pull/3926) [#3021](https://github.com/ClickHouse/ClickHouse/pull/3021) [#3948](https://github.com/ClickHouse/ClickHouse/pull/3948) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了使用 UBSan 构建对每次提交运行测试的机制。
* 新增了每次提交都会运行一次的 PVS-Studio 静态分析器。
* 修复了 PVS-Studio 发现的问题。[#4013](https://github.com/ClickHouse/ClickHouse/pull/4013) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修复了 glibc 兼容性问题。[#4100](https://github.com/ClickHouse/ClickHouse/pull/4100) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 将 Docker 镜像升级到 18.10，并为 glibc >= 2.28 添加兼容性文件 [#3965](https://github.com/ClickHouse/ClickHouse/pull/3965) ([alesapin](https://github.com/alesapin))
* 如果用户不想在 server Docker 镜像中对目录执行 `chown`，则可添加环境变量。[#3967](https://github.com/ClickHouse/ClickHouse/pull/3967) ([alesapin](https://github.com/alesapin))
* 在 clang 中启用了 `-Weverything` 中的大部分警告。还启用了 `-Wpedantic`。[#3986](https://github.com/ClickHouse/ClickHouse/pull/3986) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 新增了几项仅在 clang 8 中可用的警告。 [#3993](https://github.com/ClickHouse/ClickHouse/pull/3993) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 使用共享链接时，应链接到 `libLLVM`，而不是各个单独的 LLVM 库。[#3989](https://github.com/ClickHouse/ClickHouse/pull/3989) ([Orivej Desh](https://github.com/orivej))
* 为测试镜像添加了 Sanitizer 变量。[#4072](https://github.com/ClickHouse/ClickHouse/pull/4072) ([alesapin](https://github.com/alesapin))
* `clickhouse-server` Debian 软件包会推荐安装 `libcap2-bin` 软件包，以便使用 `setcap` 工具设置能力。这是可选的。[#4093](https://github.com/ClickHouse/ClickHouse/pull/4093) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 改进了编译时间，并修复了头文件包含问题。 [#3898](https://github.com/ClickHouse/ClickHouse/pull/3898) ([proller](https://github.com/proller))
* 新增了哈希函数的性能测试。[#3918](https://github.com/ClickHouse/ClickHouse/pull/3918) ([filimonov](https://github.com/filimonov))
* 修复了库之间的循环依赖问题。[#3958](https://github.com/ClickHouse/ClickHouse/pull/3958) ([proller](https://github.com/proller))
* 改进了低可用内存情况下的编译。[#4030](https://github.com/ClickHouse/ClickHouse/pull/4030) ([proller](https://github.com/proller))
* 添加了用于复现 `jemalloc` 性能退化问题的测试脚本。[#4036](https://github.com/ClickHouse/ClickHouse/pull/4036) ([alexey-milovidov](https://github.com/alexey-milovidov))
* 修正了 `dbms` 下注释和字符串字面量中的拼写错误。[#4122](https://github.com/ClickHouse/ClickHouse/pull/4122) ([maiha](https://github.com/maiha))
* 修正了注释中的拼写错误。[#4089](https://github.com/ClickHouse/ClickHouse/pull/4089) ([Evgenii Pravda](https://github.com/kvinty))

<div id="changelog-for-2018">
  ## [2018 年更新日志](/docs/zh/resources/changelogs/oss/2018)
</div>
