> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 2025 更新日志

> 2025 年更新日志

<div id="table-of-contents">
  ### 目录
</div>

**[ClickHouse 发行版 v25.12，2025-12-18](#2512)**<br />
**[ClickHouse 发行版 v25.11，2025-11-27](#2511)**<br />
**[ClickHouse 发行版 v25.10，2025-10-30](#2510)**<br />
**[ClickHouse 发行版 v25.9，2025-09-25](#259)**<br />
**[ClickHouse 发行版 v25.8 LTS，2025-08-28](#258)**<br />
**[ClickHouse 发行版 v25.7，2025-07-24](#257)**<br />
**[ClickHouse 发行版 v25.6，2025-06-26](#256)**<br />
**[ClickHouse 发行版 v25.5，2025-05-22](#255)**<br />
**[ClickHouse 发行版 v25.4，2025-04-22](#254)**<br />
**[ClickHouse 发行版 v25.3 LTS，2025-03-20](#253)**<br />
**[ClickHouse 发行版 v25.2，2025-02-27](#252)**<br />
**[ClickHouse 发行版 v25.1，2025-01-28](#251)**<br />
**[2024 年更新日志](/zh/resources/changelogs/oss/2024)**<br />
**[2023 年更新日志](/zh/resources/changelogs/oss/2023)**<br />
**[2022 年更新日志](/zh/resources/changelogs/oss/2022)**<br />
**[2021 年更新日志](/zh/resources/changelogs/oss/2021)**<br />
**[2020 年更新日志](/zh/resources/changelogs/oss/2020)**<br />
**[2019 年更新日志](/zh/resources/changelogs/oss/2019)**<br />
**[2018 年更新日志](/zh/resources/changelogs/oss/2018)**<br />
**[2017 年更新日志](/zh/resources/changelogs/oss/2017)**<br />

<div id="2512">
  ### ClickHouse 发行版 25.12，2025-12-18
</div>

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

* 现在，将可空列转换为非可空类型时，ALTER MODIFY COLUMN 需要显式指定 DEFAULT。此前，这类 ALTER 可能会卡住，并报出 cannot convert null to not null 错误；现在，NULL 会被替换为该列的默认表达式。修复了 [#5985](https://github.com/ClickHouse/ClickHouse/issues/5985)。[#84770](https://github.com/ClickHouse/ClickHouse/pull/84770) ([Vladimir Cherkasov](https://github.com/vdimir)).
* ngram 分词器将不再返回长度小于所设 N 值的 ngram。搜索标记为空时，文本搜索将不返回任何行。[#89757](https://github.com/ClickHouse/ClickHouse/pull/89757) ([George Larionov](https://github.com/george-larionov)) 。
* 当把列从 `String` 更改为 `Nullable(String)` 时，我们不会对数据执行变更。但对于 `uniq` 聚合函数，它使用的是不同的数据结构：对于可空列，会使用带有嵌套 uniq 聚合器的 `AggregateFunctionNull`。`AggregateFunctionNull` 会额外序列化一个 bool 标志，这会导致统计信息文件不兼容。修复方法是在序列化时添加一个标志，用于记录该列是否为可空列。统计信息的格式已经发生变化，因此如果存在旧格式的统计信息，服务器可能会失败。这个 PR [#90904](https://github.com/ClickHouse/ClickHouse/pull/90904) 将修复崩溃问题，并在现有统计信息使用旧版格式时抛出异常。为避免出现异常，我们应运行 `ALTER TABLE table MATERIALIZE STATISTICS ALL` 来重新生成统计信息以修复该问题。[#90311](https://github.com/ClickHouse/ClickHouse/pull/90311) ([Han Fei](https://github.com/hanfei1991)).
* 移除设置 `allow_not_comparable_types_in_order_by`/`allow_not_comparable_types_in_comparison_functions`。在 ORDER BY 或比较函数中允许使用不可比较的类型，可能会导致逻辑错误和意外结果。解决了 [#90028](https://github.com/ClickHouse/ClickHouse/issues/90028)。[#90527](https://github.com/ClickHouse/ClickHouse/pull/90527) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 将设置 `check_query_single_value_result` 的默认值从 `true` 改为 `false`。这会导致 `CHECK TABLE` 返回每个分片的详细结果，而不是聚合结果 (1 = 正常，0 = 发现错误) 。与之前的行为相比，这样的结果可能更符合用户预期。[#91009](https://github.com/ClickHouse/ClickHouse/pull/91009) ([Robert Schulze](https://github.com/rschu1ze)).
* 针对隐式索引进行了多项修复。显示或存储的 schema (Keeper 元数据) 不会包含隐式索引，例如由设置 `add_minmax_index_for_numeric_columns` 或 `add_minmax_index_for_string_columns` 创建的隐式索引。当在较新版本中创建或更新 ReplicatedMergeTree 表，而某个副本仍运行旧版本时，这可能会导致元数据错误。对于这类情况，在集群完全升级之前，请将 DDLs 发送到旧副本。[#91429](https://github.com/ClickHouse/ClickHouse/pull/91429) ([Raúl Marín](https://github.com/Algunenano)) 。
* 更新 clickhouse-client：当查询因 `receive_timeout` 超时时，返回非零退出代码 (159 - TIMEOUT\_EXCEEDED) 。此前，超时会返回退出代码 0 (成功) ，导致脚本和自动化难以识别超时故障。[#91432](https://github.com/ClickHouse/ClickHouse/pull/91432) ([Sav](https://github.com/sberss)).
* 现在已禁止创建 `ORDER BY` 键为空的特殊 `MergeTree` 表 (如 `ReplacingMergeTree`、`CollapsingMergeTree` 等) ，因为这类表的合并行为未定义。如果你仍需创建此类表，请启用 `allow_suspicious_primary_key` 设置。[#91569](https://github.com/ClickHouse/ClickHouse/pull/91569) ([Anton Popov](https://github.com/CurtizJ)).
* 修复函数 `bitShiftLeft` 和 `bitShiftRight`：当移位位数恰好等于该类型的大小时，返回 0 或空值。[#91943](https://github.com/ClickHouse/ClickHouse/pull/91943) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 这是 [#88380](https://github.com/ClickHouse/ClickHouse/pull/88380) 的后续更新。此 PR 将 projections 中禁用 positional arguments 视为一项向后不兼容的变更。此外，它还引入了 `enable_positional_arguments_for_projections` 设置，以便在 projections 中存在 positional arguments 时，能够安全地升级 ClickHouse cluster。[#92007](https://github.com/ClickHouse/ClickHouse/pull/92007) ([Dmitry Novik](https://github.com/novikd)) 。
* 默认启用 JSON 的高级共享数据。做出此更改后，将无法再降级到 25.8 之前的版本，因为这些版本无法读取包含 JSON 列的新数据分区片段。为确保安全升级，建议将 `compatibility` 设置为上一版本，或将 MergeTree 设置 `dynamic_serialization_version='v2', object_serialization_version='v2'`。[#92511](https://github.com/ClickHouse/ClickHouse/pull/92511) ([Pavel Kruglov](https://github.com/Avogar)) 。

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

* 现在，用户可以配置 S3/Azure Queue 表，将已处理的文件移动或添加标签，除了此前的保留或删除文件选项之外。解决了 [#72944](https://github.com/ClickHouse/ClickHouse/issues/72944)。[#86907](https://github.com/ClickHouse/ClickHouse/pull/86907) ([Murat Khairulin](https://github.com/mxwell)) 。
* 在 S3/Azure Queue 存储中新增设置 `commit_on_select` (用于指定是否需要提交已处理的数据，以及是否执行 `after_processing` 操作) 。默认值为 `false`；修复了在 select 期间对已附加 mv 的检查。[#91450](https://github.com/ClickHouse/ClickHouse/pull/91450) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 使用 XRay 在运行时添加插桩，以便在生产环境中排查问题并进行确定性性能分析。已解决 [#74249](https://github.com/ClickHouse/ClickHouse/issues/74249)。[#89173](https://github.com/ClickHouse/ClickHouse/pull/89173) ([Pablo Marcos](https://github.com/pamarcos)).
* 允许 `IN` 的第二个参数为非常量，也支持将 Tuple 用作第二个参数。[#77906](https://github.com/ClickHouse/ClickHouse/pull/77906) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 用于计算几何类型的面积和周长的函数。[#89047](https://github.com/ClickHouse/ClickHouse/pull/89047) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 实现 `dictGetKeys` 函数，返回属性值等于指定值的字典键。该函数使用查询级别的反向查找缓存，并可通过 `max_reverse_dictionary_lookup_cache_size_bytes` 设置进行调优，以加快重复查找。[#89197](https://github.com/ClickHouse/ClickHouse/pull/89197) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 添加设置 `type_json_skip_invalid_typed_paths`，用于在输入 JSON 无法转换为 JSON type 中显式声明类型的路径时，禁用插入/类型转换到 JSON type 时抛出的异常。此时会回退为该类型路径的 NULL/零值。[#89886](https://github.com/ClickHouse/ClickHouse/pull/89886) ([Max Justus Spransy](https://github.com/maxjustus)).
* 支持 MergeTree 表使用 `direct` (嵌套循环) join。如需使用，请在该设置中将其指定为唯一选项：`join_algorithm = 'direct'`。 [#89920](https://github.com/ClickHouse/ClickHouse/pull/89920) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 支持在 `CREATE` 操作中为 Iceberg 指定 `ORDER BY`，并支持在 `INSERT` 中进行排序。解决了 [#89916](https://github.com/ClickHouse/ClickHouse/issues/89916)。[#90141](https://github.com/ClickHouse/ClickHouse/pull/90141) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 引入投影级设置，可通过 `ALTER TABLE ... ADD PROJECTION` 中新增的 `WITH SETTINGS` 子句使用。这些设置允许投影按投影粒度覆盖某些 MergeTree 存储参数 (例如 `index_granularity`、`index_granularity_bytes`) 。[#90158](https://github.com/ClickHouse/ClickHouse/pull/90158) ([Amos Bird](https://github.com/amosbird)) 。
* 新增 `HMAC(algorithm, message, key)` SQL 函数，见 [#73900](https://github.com/ClickHouse/ClickHouse/issues/73900) 和 [#38775](https://github.com/ClickHouse/ClickHouse/issues/38775)。[#90837](https://github.com/ClickHouse/ClickHouse/pull/90837) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 新增支持：当第一个参数为常量数组时，`has` 函数可利用主键和数据跳过索引。关闭 [#90980](https://github.com/ClickHouse/ClickHouse/issues/90980)。[#91023](https://github.com/ClickHouse/ClickHouse/pull/91023) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增输入/输出 format `Buffers`。该 format 与 `Native` 类似；但不同于 `Native`，它不存储列名、列类型或任何额外的元数据。关闭 [#84017](https://github.com/ClickHouse/ClickHouse/issues/84017)。[#91156](https://github.com/ClickHouse/ClickHouse/pull/91156) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增设置 `max_streams_for_files_processing_in_cluster_functions`，用于控制 Cluster 表函数并行读取文件时的流数量。关闭 [#90223](https://github.com/ClickHouse/ClickHouse/issues/90223)。[#91323](https://github.com/ClickHouse/ClickHouse/pull/91323) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持行级安全的数据脱敏 (仅在 ClickHouse Cloud 中可用) 。添加数据脱敏策略解析器，以便在 clickhouse-client 中支持该功能。[#90552](https://github.com/ClickHouse/ClickHouse/pull/90552) ([pufit](https://github.com/pufit)).
* 为 `windowFunnel` aggregate function 添加 `allow_reentry` 选项。在 strict\_order 启用时，它会忽略违反顺序的事件，而不是停止漏斗分析。这样就能处理包含刷新 (A->A->B) 或返回导航 (A->B->A->C) 的用户路径，避免低报转化率。[#86916](https://github.com/ClickHouse/ClickHouse/pull/86916) ([Lee ChaeRok](https://github.com/LeeChaeRok)).
* Keeper 与 zookeeper 的兼容性：支持 CREATE WITH STATISTICS。 [#88797](https://github.com/ClickHouse/ClickHouse/pull/88797) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* ClickHouse Keeper 支持 ZooKeeper 持久化 watches。续篇第 2 部分：[https://github.com/ClickHouse/ClickHouse/pull/78207。\[#88813](https://github.com/ClickHouse/ClickHouse/pull/78207。\[#88813)]\([https://github.com/ClickHouse/ClickHouse/pull/88813](https://github.com/ClickHouse/ClickHouse/pull/88813)) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 添加 MergeTree 设置 `alter_column_secondary_index_mode`，用于控制在变更期间如何处理索引。可选值：throw、drop、rebuild 和 compatibility。关闭 [#77797](https://github.com/ClickHouse/ClickHouse/issues/77797)。[#89335](https://github.com/ClickHouse/ClickHouse/pull/89335) ([Raúl Marín](https://github.com/Algunenano)) 。
* 由于 `Time` 和 `Time64` 数据类型已达到生产可用状态，设置 `enable_time_time64_type` 现已默认启用。[#89345](https://github.com/ClickHouse/ClickHouse/pull/89345) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 支持通过 `deltaLake` table function 配合设置 `delta_lake_snapshot_start_version` 和 `delta_lake_snapshot_end_version` 读取 DeltaLake CDF。CDF (Change Data Feed，一项可自动捕获并查询 Delta 表不同版本之间行级数据变更的功能，例如插入、更新和删除) 可在 DeltaLake 中通过 `delta.enableChangeDataFeed` 启用。随数据一起提供的列包括 `_change_type`、`_commit_version`、`_commit_timestamp`。[#90431](https://github.com/ClickHouse/ClickHouse/pull/90431) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持使用负索引访问 tuple 元素 (例如 `tuple.-1`) 。[#91665](https://github.com/ClickHouse/ClickHouse/pull/91665) ([Amos Bird](https://github.com/amosbird)) 。

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

* 引入 Text index format v3，并将其提升至 Beta 状态。
* 引入了新逻辑，可在设置 `automatic_parallel_replicas_mode` 的控制下，自动使用并行副本执行查询。在正常的单节点执行期间，ClickHouse 会收集统计信息，这些信息随后会在规划阶段纳入考量。如果统计信息表明并行副本很可能带来收益，ClickHouse 将自动使用并行副本执行该查询。目前支持的查询类型仍然比较有限。[#87541](https://github.com/ClickHouse/ClickHouse/pull/87541) ([Nikita Taranov](https://github.com/nickitat)).
* 使用 --login 通过 Cloud 凭据访问 ClickHouse Cloud 实例。[#89261](https://github.com/ClickHouse/ClickHouse/pull/89261) ([Krishna Mannem](https://github.com/kcmannem)).
* 新增会话级设置 `aggregate_function_input_format`，以改进向包含 `AggregateFunction` 列的表执行 `INSERT` 查询时的体验，支持以序列化状态、原始值或数组的形式插入数据。[#88088](https://github.com/ClickHouse/ClickHouse/pull/88088) ([Punith Nandyappa Subashchandra](https://github.com/punithns97)).

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

* 利用跳过索引和动态阈值过滤器优化 `ORDER BY...LIMIT N` 查询，可显著减少处理的行数。[#89835](https://github.com/ClickHouse/ClickHouse/pull/89835) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* ClickHouse 现在可使用跳过索引，对由 `AND` 和 `OR` 混合连接的过滤条件组成的 WHERE 子句执行索引分析。此前，WHERE 子句必须是由过滤条件以合取 (AND) 方式连接而成，才能利用跳过索引。新增设置 `use_skip_indexes_for_disjunctions` (默认：开启) 用于控制此功能。 (问题 [#75228](https://github.com/ClickHouse/ClickHouse/issues/75228)) 。[#87781](https://github.com/ClickHouse/ClickHouse/pull/87781) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 支持在 LEFT/INNER JOIN 操作中按顺序保留从左表读取的数据顺序，后续步骤可加以利用。可通过设置 `query_plan_read_in_order_through_join` 禁用。支持 LEFT/INNER JOIN 在读取优化中使用虚拟行 (参见设置 `read_in_order_use_virtual_row`) 。[#89815](https://github.com/ClickHouse/ClickHouse/pull/89815) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 通过增大限制，提升惰性物化列的性能。[#90309](https://github.com/ClickHouse/ClickHouse/pull/90309) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 在存在大型 `minmax` 索引 (数百万个粒度) 时，用户会发现索引分析延迟更低。[#90428](https://github.com/ClickHouse/ClickHouse/pull/90428) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 为 INNER JOIN 实现了简单的 DPsize join 重排序算法。一个新的 Experimental 设置用于控制各算法的使用顺序，例如 `query_plan_optimize_join_order_algorithm='dpsize,greedy'` 表示会先尝试 DPsize，若不可用则回退到 greedy。[#91002](https://github.com/ClickHouse/ClickHouse/pull/91002) ([Alexander Gololobov](https://github.com/davenger)) 。
* 当查询达到行数限制时立即终止。解决了 [#61872](https://github.com/ClickHouse/ClickHouse/issues/61872)。[#62804](https://github.com/ClickHouse/ClickHouse/pull/62804) ([Sean Haynes](https://github.com/seandhaynes)) 。
* [#84477](https://github.com/clickhouse/clickhouse/pull/84477) 新增了对 `insert select from s3Cluster(...)` 查询中用于并行分布式执行的 `select` 查询的限制条件。此次变更允许使用 `where`，而这在此前也是支持的。[#84611](https://github.com/ClickHouse/ClickHouse/pull/84611) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 在遍历哈希表时预取键，以尽量减少缓存未命中。[#84708](https://github.com/ClickHouse/ClickHouse/pull/84708) ([lgbo](https://github.com/lgbo-ustc)).
* 通过仅对点数组的末尾部分排序，并在输入单调时跳过排序，优化了 `histogram` 聚合函数，实现了约 10% 的性能提升。[#85760](https://github.com/ClickHouse/ClickHouse/pull/85760) ([MakarDev](https://github.com/MakarDev)).
* 通过利用基于文本索引构建的额外预过滤器，改进了对包含 `like`、`equals`、`has` 等函数的谓词进行过滤时的性能。此优化可通过 `query_plan_text_index_add_hint` 设置启用。改进了文本索引在 `Map` 数据类型列上的使用效果。[#88550](https://github.com/ClickHouse/ClickHouse/pull/88550) ([Anton Popov](https://github.com/CurtizJ)).
* 通过在预先计算出的一组可能键值中进行更快的查找，优化重复的反向字典查找。关闭 [#7968](https://github.com/ClickHouse/ClickHouse/issues/7968)。[#88971](https://github.com/ClickHouse/ClickHouse/pull/88971) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 优化 `topK` 聚合函数的性能和行为。[#90091](https://github.com/ClickHouse/ClickHouse/pull/90091) ([Raúl Marín](https://github.com/Algunenano)) 。
* 优化了 `Decimal` 比较操作的性能。修复了 [#28192](https://github.com/ClickHouse/ClickHouse/issues/28192)。[#90153](https://github.com/ClickHouse/ClickHouse/pull/90153) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 为 Apache Paimon 函数提供分区裁剪支持，延续了 [https://github.com/ClickHouse/ClickHouse/pull/84423。](https://github.com/ClickHouse/ClickHouse/pull/84423。) [#90253](https://github.com/ClickHouse/ClickHouse/pull/90253) ([JIaQi](https://github.com/JiaQiTang98)) 。
* 通过动态分派为逻辑函数启用高级 SIMD 操作。[#90432](https://github.com/ClickHouse/ClickHouse/pull/90432) ([Raúl Marín](https://github.com/Algunenano))。
* 通过避免不必要地将结果列初始化为零，提高 JIT 函数的执行性能。[#90449](https://github.com/ClickHouse/ClickHouse/pull/90449) ([Raúl Marín](https://github.com/Algunenano)).
* 通过动态分派提升 `T64` 解压速度。 [#90610](https://github.com/ClickHouse/ClickHouse/pull/90610) ([Raúl Marín](https://github.com/Algunenano)).
* 优化 MergeTree 读取器的就地过滤。解决了 [#87119](https://github.com/ClickHouse/ClickHouse/issues/87119)。[#90630](https://github.com/ClickHouse/ClickHouse/pull/90630) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 引入了一种额外的启发式策略，以减小所选 merge 方案的宽度。执行更多较窄的 merge 会增加写放大，但同时也有助于避免出现 `TOO_MANY_PARTS` 错误。[#91163](https://github.com/ClickHouse/ClickHouse/pull/91163) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 通过下推 `_path` 过滤器值，提升使用 glob 模式创建的 S3 表的查询性能，从而避免执行 S3 的列举操作。由 `s3_path_filter_limit` 设置控制。[#91165](https://github.com/ClickHouse/ClickHouse/pull/91165) ([Eduard Karacharov](https://github.com/korowa)).
* 通过动态分派，加快在 WHERE 子句中将列转换为 bool 的速度。[#91203](https://github.com/ClickHouse/ClickHouse/pull/91203) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过动态分派加速单个数值块的排序。[#91213](https://github.com/ClickHouse/ClickHouse/pull/91213) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增优化，可在查询计划中移除未使用的列。解决了 [#75152](https://github.com/ClickHouse/ClickHouse/issues/75152)。[#76487](https://github.com/ClickHouse/ClickHouse/pull/76487) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* `query_plan_optimize_join_order_limit` 的默认值改为 `10`。[#89312](https://github.com/ClickHouse/ClickHouse/pull/89312) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认启用 `allow_statistics_optimize` 设置，因此 JOIN 优化器将使用列统计信息。[#89332](https://github.com/ClickHouse/ClickHouse/pull/89332) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 支持 `ANTI` JOIN 的 JOIN 运行时过滤器。同时，重构了运行时过滤器的实现，以减少锁争用。[#89710](https://github.com/ClickHouse/ClickHouse/pull/89710) ([Dmitry Novik](https://github.com/novikd)).
* 通过将 `min_bytes_for_wide_part` 和 `vertical_merge_algorithm_min_bytes_to_activate` 设置为 128MB，降低了 `system.metric_log` 表在合并过程中的内存占用 (默认启用) 。[#89811](https://github.com/ClickHouse/ClickHouse/pull/89811) ([filimonov](https://github.com/filimonov)) 。
* 允许在 PREWHERE 中使用倒排索引。修复了 [#89975](https://github.com/ClickHouse/ClickHouse/issues/89975)。[#89977](https://github.com/ClickHouse/ClickHouse/pull/89977) ([Peng Jian](https://github.com/fastio)) 。
* 如果使用 GCP OAuth (可提升 GCS 上的性能) ，则不要添加 S3 提供商。[#91706](https://github.com/ClickHouse/ClickHouse/pull/91706) ([Antonio Andelic](https://github.com/antonio2368)) 。

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

* 新增了一个设置 `apply_row_policy_after_final`，允许查询仅在 final 之后应用行策略，从而使 ReplacingMergeTree 配合行策略时的行为更加正确。修复了 [#90986](https://github.com/ClickHouse/ClickHouse/issues/90986)。[#91065](https://github.com/ClickHouse/ClickHouse/pull/91065) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 在 `Pretty` 格式中，命名元组现在会以 Pretty JSON 的形式显示。此更改解决了 [#65022](https://github.com/ClickHouse/ClickHouse/issues/65022)。[#91779](https://github.com/ClickHouse/ClickHouse/pull/91779) ([Mostafa Mohamed Salah](https://github.com/Sasao4o)) 。
* 在 `system.error_log` 表中新增了字段 `last_error_time`、`last_error_message`、`last_error_query_id` 和 `last_error_trace`。[#89879](https://github.com/ClickHouse/ClickHouse/pull/89879) ([Narasimha Pakeer](https://github.com/npakeer)) 。
* CLI 客户端现在可通过指定 `--no-server-client-version-message` 或 `false` 来抑制“ClickHouse server 版本低于 ClickHouse client。这可能表明服务器已过时，可以升级”的提示信息。[#87784](https://github.com/ClickHouse/ClickHouse/pull/87784) ([Larry Snizek](https://github.com/larry-cdn77)) 。
* 新增一条错误消息，提示该分片已被去重。[#80264](https://github.com/ClickHouse/ClickHouse/pull/80264) ([Aleksandr Musorin](https://github.com/AVMusorin)) 。
* 向 `system.kafka_consumers` 中添加了 `dependencies` 和 `missing_dependencies` 列，用于显示 Kafka 表的 materialized view 目标表。新增了 `KafkaMVNotReady` 计数器。[#85346](https://github.com/ClickHouse/ClickHouse/pull/85346) ([Ilya Golshtein](https://github.com/ilejn)).
* 现在，使用 remote 和 native protocol 进行插入时，表的默认表达式已能正确工作。关闭 [#87972](https://github.com/ClickHouse/ClickHouse/issues/87972)。[#88540](https://github.com/ClickHouse/ClickHouse/pull/88540) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 支持禁用 `PSI_*_*` 异步指标的收集。[#88557](https://github.com/ClickHouse/ClickHouse/pull/88557) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 新增了对 `Nullable` 类型列稀疏序列化的支持。这是 [#44539](https://github.com/ClickHouse/ClickHouse/issues/44539) 的后续工作。[#88999](https://github.com/ClickHouse/ClickHouse/pull/88999) ([Amos Bird](https://github.com/amosbird)) 。
* `plain-rewritable` 磁盘有其独立的实现和布局。不再基于常规 `plain` 磁盘之上构建。[#89807](https://github.com/ClickHouse/ClickHouse/pull/89807) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* HTTP 中的任何异常都不应包含表示结束的零长度块。[#89998](https://github.com/ClickHouse/ClickHouse/pull/89998) ([Kaviraj Kanagaraj](https://github.com/kavirajk)) 。
* 在握手期间增加一项 Keeper 服务端检查，当 `last_zxid_seen（由客户端提供） > last_processed_zxid` 时拒绝客户端。这样可防止客户端重新连接到落后副本时读取到过时数据。[#90016](https://github.com/ClickHouse/ClickHouse/pull/90016) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增可调的 `Kafka` 表引擎设置 `kafka_consumer_reschedule_ms`，用于调整消费者在等待新数据时的休眠时长。解决了 [#89204](https://github.com/ClickHouse/ClickHouse/issues/89204)。[#90112](https://github.com/ClickHouse/ClickHouse/pull/90112) ([Jeremy Aguilon](https://github.com/JerAguilon)).
* 在 `system.mutations` 中新增列 `parts_in_progress_names`，以改进诊断能力。[#90155](https://github.com/ClickHouse/ClickHouse/pull/90155) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 当 S3 库解析 XML 响应时，遇到网络错误会进行重试。[#90216](https://github.com/ClickHouse/ClickHouse/pull/90216) ([Sema Checherinda](https://github.com/CheSema)).
* 我们希望让 Keeper 在独立的服务器进程中运行；同时，为避免在大型区域中给 Prometheus 带来过重负担，我们应继续只暴露与 Keeper 相关的指标。[#90244](https://github.com/ClickHouse/ClickHouse/pull/90244) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增支持 ClickHouse Client 配置除传统的 `~/.clickhouse-client/` 位置外，还可从 XDG Base Directory 路径 (如 `~/.config/clickhouse/config.xml`) 加载。修复了 [#89882](https://github.com/ClickHouse/ClickHouse/issues/89882)。[#90306](https://github.com/ClickHouse/ClickHouse/pull/90306) ([Wujun Jiang](https://github.com/rainac1)) 。
* 为 Keeper 中的追加请求批次增加字节大小限制。该限制由 `keeper_server.coordination_settings.max_requests_append_bytes_size` 控制。[#90342](https://github.com/ClickHouse/ClickHouse/pull/90342) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 为 Iceberg 新增一项设置，以避免分区数量过多。[#90365](https://github.com/ClickHouse/ClickHouse/pull/90365) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 接近 guardrails 限制时更新警告信息：显示当前值和 throw 值。[#90438](https://github.com/ClickHouse/ClickHouse/pull/90438) ([Nikita Fomichev](https://github.com/fm4v)).
* 在 `system.filesystem_cache` 表中以流式方式输出各个分块，而不是创建一个包含全部缓存状态的单个分块。对于大型缓存，读取文件系统缓存状态可能耗时很长并占用大量内存，因此这种流式处理方式对大型部署至关重要。[#90508](https://github.com/ClickHouse/ClickHouse/pull/90508) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了 Hive 分区中的异常消息错误：此前少了一个空格。[#90685](https://github.com/ClickHouse/ClickHouse/pull/90685) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 向量相似度索引缓存中的条目现在会在表 parts 被删除或被较新的 parts 替换时一并移除。在此之前，这些条目只会在缓存逐出时被延迟清除。[#90750](https://github.com/ClickHouse/ClickHouse/pull/90750) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 将 chdig (ClickHouse 命令行诊断工具) 升级到 [v25.12.1](https://github.com/azat/chdig/releases/tag/v25.12.1)。[#91394](https://github.com/ClickHouse/ClickHouse/pull/91394) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在，预签名 URL 已支持 S3。关闭了 [#65032](https://github.com/ClickHouse/ClickHouse/issues/65032)。[#90827](https://github.com/ClickHouse/ClickHouse/pull/90827) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 现在，文本索引已支持 `ReplacingMergeTree` 表。[#90908](https://github.com/ClickHouse/ClickHouse/pull/90908) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 避免在身份验证前返回的 HTTP 错误响应中暴露 ClickHouse server 的版本信息。[#91003](https://github.com/ClickHouse/ClickHouse/pull/91003) ([filimonov](https://github.com/filimonov)).
* 现在，当 HTTP 客户端连接达到 `hard_limit` 时，将抛出 `HTTP_CONNECTION_LIMIT_REACHED` 异常。对于磁盘连接，该限制设置为 `20000`。[#91016](https://github.com/ClickHouse/ClickHouse/pull/91016) ([Sema Checherinda](https://github.com/CheSema)) 。
* 引入 `system.background_schedule_pool{,_log}`，以提升对后台作业的内部信息可观测性。 [#91157](https://github.com/ClickHouse/ClickHouse/pull/91157) ([Azat Khuzhin](https://github.com/azat)).
* 现在，您可以在 Web UI 查询编辑器中使用 `Ctrl+/` (Mac 上为 `Cmd+/`) 快速为当前选中的行添加注释或取消注释，这样在测试时就能更方便地临时禁用查询的部分内容。[#91160](https://github.com/ClickHouse/ClickHouse/pull/91160) ([Samuel K.](https://github.com/OpenGLShaders)) 。
* 将 `system.completions` 添加到始终可访问的表列表。[#91166](https://github.com/ClickHouse/ClickHouse/pull/91166) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 新增 profile events `FailedInitialQuery` 和 `FailedInitialSelectQuery`。[#91172](https://github.com/ClickHouse/ClickHouse/pull/91172) ([RinChanNOW](https://github.com/RinChanNOWWW)) 。
* 修复了一个潜在的线程池饥饿问题：在读取包含大量子列的 JSON 列的列样本时，现会遵循 `merge_tree_use_prefixes_deserialization_thread_pool` 设置，而不再无条件使用线程池。[#91208](https://github.com/ClickHouse/ClickHouse/pull/91208) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 在 `tupleElement` 中支持 `JSON` 类型。解决了 [#81630](https://github.com/ClickHouse/ClickHouse/issues/81630)。[#91327](https://github.com/ClickHouse/ClickHouse/pull/91327) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了启用用户态页缓存时误报内存限制错误的问题。[#91361](https://github.com/ClickHouse/ClickHouse/pull/91361) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 现在支持使用 ngram\_length = 1 构建 ngrams 分词器。[#91529](https://github.com/ClickHouse/ClickHouse/pull/91529) ([George Larionov](https://github.com/george-larionov)) 。
* 支持在 `INSERT INTO FUNCTION` 中指定函数内部的存储设置，类似于 `SELECT` 中已有的支持。关闭 [#89386](https://github.com/ClickHouse/ClickHouse/issues/89386)。[#91707](https://github.com/ClickHouse/ClickHouse/pull/91707) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 对于数据湖的 TRUNCATE 查询，不再静默地什么都不做，而是在未实现时抛出“not implemented”错误。关闭 [#86604](https://github.com/ClickHouse/ClickHouse/issues/86604)。[#91713](https://github.com/ClickHouse/ClickHouse/pull/91713) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为 parquet v3 读取器设置最大消息大小，以避免出现 `DB::Exception: apache::thrift::transport::TTransportException: MaxMessageSize reached`。[#91737](https://github.com/ClickHouse/ClickHouse/pull/91737) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 新增设置 `insert_select_deduplicate`。这样可以更清楚地说明在执行 INSERT SELECT 时如何处理插入去重。一般来说，这类查询无法进行去重；但如果表未发生变化，且结果已排序，则可以在重试时进行去重。我们无法跟踪 source 是否相同，但可以检查 select 查询的结果是否已排序。实际上，事实证明在一般情况下这确实很难检查，不过 `ORDER BY ALL` 这种简单场景则很容易。当前这里的逻辑实际上是有缺陷的。我们尝试进行去重，但在大多数情况下，它其实无法识别这些块中的重复项，因为 select 返回的数据会不同。[#91830](https://github.com/ClickHouse/ClickHouse/pull/91830) ([Sema Checherinda](https://github.com/CheSema)).
* 允许在将 `Array` 转换为 `QBit` 时进行隐式类型转换。现在，整数数组和浮点数组无需显式类型转换，即可直接插入 `QBit` 列中。[#91846](https://github.com/ClickHouse/ClickHouse/pull/91846) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 新增了 `CapnProto` 消息大小限制，可通过 `format_capn_proto_max_message_size` 修改。[#91888](https://github.com/ClickHouse/ClickHouse/pull/91888) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 将标记缓存指标调整为仅跟踪查询 (在 [#83415](https://github.com/ClickHouse/ClickHouse/issues/83415) 之后，`MarkCacheHits`/`MarkCacheMisses` 也会在合并操作时更新，此 PR 将把这一行为改回去) 。[#91910](https://github.com/ClickHouse/ClickHouse/pull/91910) ([Azat Khuzhin](https://github.com/azat)).
* 修复了本地连接中 `client_info.interface` 被设为 `TCP` 的问题。[#91933](https://github.com/ClickHouse/ClickHouse/pull/91933) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* ACME 客户端配置中的 `refresh_certificates_task_interval` 参数现在要求其值以秒为单位。[#92211](https://github.com/ClickHouse/ClickHouse/pull/92211) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 `system.*_log` 的 parts 事件记录到 `system.part_log` 中。[#92217](https://github.com/ClickHouse/ClickHouse/pull/92217) ([Azat Khuzhin](https://github.com/azat)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复了 PREWHERE 在处理 `Time` 和 `Time64` 数据类型的超类型时的一些错误。解决了 [#84544](https://github.com/ClickHouse/ClickHouse/issues/84544)。[#84715](https://github.com/ClickHouse/ClickHouse/pull/84715) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 在使用 `DNSResolver` 之前先进行初始化，以使自定义设置生效。修复了 [#76296](https://github.com/ClickHouse/ClickHouse/issues/76296)。[#81302](https://github.com/ClickHouse/ClickHouse/pull/81302) ([Zhigao Hong](https://github.com/zghong)) 。
* 修复了某些情况下无法从名称中带点的列读取子列的问题。解决了 [#81261](https://github.com/ClickHouse/ClickHouse/issues/81261)、[#82058](https://github.com/ClickHouse/ClickHouse/issues/82058)、[#88169](https://github.com/ClickHouse/ClickHouse/issues/88169)。[#87205](https://github.com/ClickHouse/ClickHouse/pull/87205) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 GenerateRandom 引擎在非字面量参数下崩溃的问题：现在会返回带有明确错误消息的 BAD\_ARGUMENTS，而不是 LOGICAL\_ERROR。[#88157](https://github.com/ClickHouse/ClickHouse/pull/88157) ([Shafi Ahmed](https://github.com/ita004)).
* 修复了在存在 `UNION` 时移除未使用投影列的问题。修复了 [#88180](https://github.com/ClickHouse/ClickHouse/issues/88180)。[#88350](https://github.com/ClickHouse/ClickHouse/pull/88350) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了在主键按降序排序时，`JOIN` 优化中的错误分片问题。已解决 [#88512](https://github.com/ClickHouse/ClickHouse/issues/88512)。[#88794](https://github.com/ClickHouse/ClickHouse/pull/88794) ([Amos Bird](https://github.com/amosbird)) 。
* 重新启用 s3queue\_keeper\_fault\_injection\_probablility，并修复相关问题。 [#88800](https://github.com/ClickHouse/ClickHouse/pull/88800) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了生存时间 (TTL) 中因过早移除列而引发的多个问题。解决了 [#88002](https://github.com/ClickHouse/ClickHouse/issues/88002)。[#88860](https://github.com/ClickHouse/ClickHouse/pull/88860) ([Amos Bird](https://github.com/amosbird)) 。
* 当 temporary\_files\_buffer\_size 设为 0 时会抛出异常。已修复 [#88900](https://github.com/ClickHouse/ClickHouse/issues/88900)。[#88917](https://github.com/ClickHouse/ClickHouse/pull/88917) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在谓词包含 `NULL` 常量时，`Set` 索引分析过程中发生的 `Bad get` 错误。修复了 [#84856](https://github.com/ClickHouse/ClickHouse/issues/84856) 和 [#82974](https://github.com/ClickHouse/ClickHouse/issues/82974)。[#89429](https://github.com/ClickHouse/ClickHouse/pull/89429) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了 `Cannot add subcolumn X.Y: column with this name already exists`。解决了 [#89599](https://github.com/ClickHouse/ClickHouse/issues/89599)。[#89602](https://github.com/ClickHouse/ClickHouse/pull/89602) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 `theilsU` 和 `contingency` 函数中的错误，这些错误会导致结果不正确。[#89760](https://github.com/ClickHouse/ClickHouse/pull/89760) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复别名稳定性问题：修复 SharedDatabaseCatalog 中的 StrictnessLevel，禁止 target 也为别名，并实现更多接口 (getSerializationHints、supportsReplication、getStoragePolicy、totalBytesUncompressed、lifetimeRows、lifetimeBytes、storesDataOnDisk、tryLockForShare、lockForShare) 。解决了 [#89106](https://github.com/ClickHouse/ClickHouse/issues/89106)。[#89812](https://github.com/ClickHouse/ClickHouse/pull/89812) ([Kai Zhu](https://github.com/nauu)) 。
* 修复了在远程查询中，当 `IN` 内包含 `ARRAY JOIN` 且启用了 `enable_lazy_columns_replication` 设置时可能发生的崩溃。解决了 [#90361](https://github.com/ClickHouse/ClickHouse/issues/90361)。[#89997](https://github.com/ClickHouse/ClickHouse/pull/89997) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在 `analyzer_compatibility_join_using_top_level_identifier` 与多个 JOIN 配合使用时可能出现的逻辑错误。[#90010](https://github.com/ClickHouse/ClickHouse/pull/90010) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在某些情况下，从文本格式中的 String 推断出错误 DateTime64 值的问题。解决了 [#89368](https://github.com/ClickHouse/ClickHouse/issues/89368)。[#90013](https://github.com/ClickHouse/ClickHouse/pull/90013) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在反序列化来自聚合状态及其他来源的数据时进行大小检查。[#90031](https://github.com/ClickHouse/ClickHouse/pull/90031) ([Raúl Marín](https://github.com/Algunenano)) 。
* 按存储卷特征拆分 parts 范围，以便为冷卷启用 TTL 删除合并。应用此补丁后，max TTL \< now 的 parts 将从冷存储中移除。该算法只会调度 **单个 part 的删除**。 [#90059](https://github.com/ClickHouse/ClickHouse/pull/90059) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 如果 Kafka 表是在设置了 `kafka_handle_error_mode = 'dead_letter_queue'` 的情况下创建的，而 `system.dead_letter_queue` 表未配置，服务器可能会崩溃。此问题已修复。解决了 [#87573](https://github.com/ClickHouse/ClickHouse/issues/87573)。[#90064](https://github.com/ClickHouse/ClickHouse/pull/90064) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了在使用 `ARRAY JOIN` 且启用 `enable_lazy_columns_replication` 设置进行 insert 时，可能出现的错误：`Column with Array type is not represented by ColumnArray column: Replicated`。[#90066](https://github.com/ClickHouse/ClickHouse/pull/90066) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了因销毁顺序错误导致 server 在正常关闭时崩溃的问题。解决了 [#82420](https://github.com/ClickHouse/ClickHouse/issues/82420)。[#90076](https://github.com/ClickHouse/ClickHouse/pull/90076) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了在使用较大步长时，`numbers` 系统表中的逻辑错误和取模 bug。关闭 [#83398](https://github.com/ClickHouse/ClickHouse/issues/83398)。[#90123](https://github.com/ClickHouse/ClickHouse/pull/90123) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复使用 native 写入器进行单线程写入时，Parquet 写入无法保留原始顺序的问题。部分回退 [https://github.com/ClickHouse/ClickHouse/pull/64424/files。\[#90126](https://github.com/ClickHouse/ClickHouse/pull/64424/files。\[#90126)]\([https://github.com/ClickHouse/ClickHouse/pull/90126](https://github.com/ClickHouse/ClickHouse/pull/90126)) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 不要对 LIMIT/OFFSET 表达式进行常量节点优化。修复了 [#89607](https://github.com/ClickHouse/ClickHouse/issues/89607)。[#90156](https://github.com/ClickHouse/ClickHouse/pull/90156) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了 25.8 中导致无法平滑升级的 Hive 分区兼容性问题 (修复了升级期间出现的错误 `All hive partitioning columns must be present in the schema`) 。[#90202](https://github.com/ClickHouse/ClickHouse/pull/90202) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在使用 Glue catalog 时，Iceberg 表中 timestamp 列引发的 JSON 异常。解决了 [#90210](https://github.com/ClickHouse/ClickHouse/issues/90210)。[#90209](https://github.com/ClickHouse/ClickHouse/pull/90209) ([Alsu Giliazova](https://github.com/alsugiliazova)).
* 修复了当分片中的行数少于 index\_granularity 时，MergeTreeReaderIndex 中的行数不匹配问题。解决了 [#89691](https://github.com/ClickHouse/ClickHouse/issues/89691)。[#90254](https://github.com/ClickHouse/ClickHouse/pull/90254) ([Peng Jian](https://github.com/fastio)) 。
* 修复 `nan`/`inf` 无限值的 `WITH FILL` 查询问题。解决了 [#69261](https://github.com/ClickHouse/ClickHouse/issues/69261)。[#90255](https://github.com/ClickHouse/ClickHouse/pull/90255) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复在 `query&#95;plan&#95;use&#95;logical&#95;join&#95;step=0` 且 JOIN ON 中存在残余条件时出现的“列未找到”错误。解决了 [#88635](https://github.com/ClickHouse/ClickHouse/issues/88635)。[#90279](https://github.com/ClickHouse/ClickHouse/pull/90279) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了聚合投影优化中的某些查询问题。[#90288](https://github.com/ClickHouse/ClickHouse/pull/90288) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了从 JSON 的子列读取 compact parts 时的一个 bug，该问题可能导致 `CANNOT_READ_ALL_DATA` 错误。已解决 [#90264](https://github.com/ClickHouse/ClickHouse/issues/90264)。[#90302](https://github.com/ClickHouse/ClickHouse/pull/90302) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 现在，如果 manifest 文件中未指定排序顺序 (或其排序顺序与表中的 default\_sort\_order 不一致) ，ClickHouse 将不会对 Iceberg 使用按顺序读取优化。修复了 [#89178](https://github.com/ClickHouse/ClickHouse/issues/89178)。[#90304](https://github.com/ClickHouse/ClickHouse/pull/90304) ([alesapin](https://github.com/alesapin)).
* 现在，Time 和 Time64 在从 DateTime 和 DateTime64 转换时应能正确处理时区 (即应以与向用户显示为 DateTime\[64] 时相同的时区来显示时间) 。关闭 [#89896](https://github.com/ClickHouse/ClickHouse/issues/89896)。[#90310](https://github.com/ClickHouse/ClickHouse/pull/90310) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了一个 bug：`SELECT CAST(CAST(now(), 'Time'), 'Time64')` 会产生错误结果。关闭 [#88349](https://github.com/ClickHouse/ClickHouse/issues/88349)。[#90324](https://github.com/ClickHouse/ClickHouse/pull/90324) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 randomStringUTF8 中因整数溢出导致的崩溃。[#90326](https://github.com/ClickHouse/ClickHouse/pull/90326) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了在使用 `multicluster_root_path` 的多集群环境中，集群发现更新异常的问题，以避免 ZooKeeper 更新延迟或丢失。[#90341](https://github.com/ClickHouse/ClickHouse/pull/90341) ([RinChanNOW](https://github.com/RinChanNOWWW)) 。
* 修复了在不存在的 JSON 路径上使用 `prewhere` 且 `index&#95;granularity&#95;bytes=0` 时可能发生的逻辑错误。已解决 [#86924](https://github.com/ClickHouse/ClickHouse/issues/86924)。[#90375](https://github.com/ClickHouse/ClickHouse/pull/90375) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 `L2DistanceTransposed` 中的一个问题：当精度参数超出有效范围时，会导致崩溃。关闭了 [#90401](https://github.com/ClickHouse/ClickHouse/issues/90401)。[#90405](https://github.com/ClickHouse/ClickHouse/pull/90405) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复 `arrayUnion` 使用 `Array(Dynamic)` 参数时可能出现的逻辑错误。解决了 [#90270](https://github.com/ClickHouse/ClickHouse/issues/90270)。[#90409](https://github.com/ClickHouse/ClickHouse/pull/90409) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在一次 ALTER 中对同一个 Nested 列同时进行重命名和修改时可能出现的逻辑错误。解决了 [#90406](https://github.com/ClickHouse/ClickHouse/issues/90406)。[#90412](https://github.com/ClickHouse/ClickHouse/pull/90412) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了通过 HTTP 参数解析 JSON/Dynamic/Variant 值时的问题。解决了 [#88925](https://github.com/ClickHouse/ClickHouse/issues/88925)。[#90430](https://github.com/ClickHouse/ClickHouse/pull/90430) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 Hive 分区中的一个竞态条件：由于静态 `KeyValuePairExtractor`，在并发读取文件时会导致数据损坏或崩溃。 [#90474](https://github.com/ClickHouse/ClickHouse/pull/90474) ([Paresh Joshi](https://github.com/pareshjoshij)).
* 修复了 `L2DistanceTransposed` 在使用数组引用向量 (默认类型为 `Array(Float64))`) 以及元素类型不是 `Float64` (`Float32`、`BFloat16`) 的 `QBit` 列时距离计算错误的问题。该函数现在会自动将引用向量转换为与 `QBit` 元素类型一致的类型。已解决 [#89976](https://github.com/ClickHouse/ClickHouse/issues/89976)。[#90485](https://github.com/ClickHouse/ClickHouse/pull/90485) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了一个 bug：当参数为负值时，`toDateTimeOrNull` 会返回 NULL。[#90490](https://github.com/ClickHouse/ClickHouse/pull/90490) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了以 `Arrow` 格式输出 `LowCardinality(Bool/Date32)` 时可能出现的逻辑错误。解决了 [#83883](https://github.com/ClickHouse/ClickHouse/issues/83883)。[#90505](https://github.com/ClickHouse/ClickHouse/pull/90505) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 IPv4 解析函数 (例如 `IPv4StringToNumOrDefault`) 在某些无效输入情况下返回垃圾值的问题。解决了 [#90544](https://github.com/ClickHouse/ClickHouse/issues/90544)。解决了 [#87583](https://github.com/ClickHouse/ClickHouse/issues/87583)。[#90545](https://github.com/ClickHouse/ClickHouse/pull/90545) ([Michael Kolupaev](https://github.com/al13n321))。
* 在本地主机检查时，如果因地址解析失败，则重试 `markReplicasActive`：如果在 DDLTask 中执行本机检查时发生异常，则打印一条警告日志。在 DDLWorker::markReplicasActive 中，如果未找到本地主机且 clusters 中存在主机 ID，则抛出异常以触发重试。[#90556](https://github.com/ClickHouse/ClickHouse/pull/90556) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了 `equals` 函数在极少数情况下会导致的逻辑错误。关闭 [#88142](https://github.com/ClickHouse/ClickHouse/issues/88142)。[#90557](https://github.com/ClickHouse/ClickHouse/pull/90557) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 应可修复 `test_ssh/test.py::test_paramiko_password` 中的 ThreadSanitizer 崩溃问题。[#90612](https://github.com/ClickHouse/ClickHouse/pull/90612) ([Govind R Nair](https://github.com/Revertionist)) 。
* 修复了在使用 const 非字符串列时 `concatWithSeparator` 函数中的逻辑错误。已关闭 [#90596](https://github.com/ClickHouse/ClickHouse/issues/90596)。[#90655](https://github.com/ClickHouse/ClickHouse/pull/90655) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复 `INTO OUTFILE` 的格式问题。解决了 [#90207](https://github.com/ClickHouse/ClickHouse/issues/90207)。[#90656](https://github.com/ClickHouse/ClickHouse/pull/90656) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在执行包含子查询的变更且 `allow_statistics_optimize=1` 时可能发生的崩溃。解决了 [#90626](https://github.com/ClickHouse/ClickHouse/issues/90626)。[#90664](https://github.com/ClickHouse/ClickHouse/pull/90664) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 analyzer 对同时使用 `LIMIT BY` 和 `GROUP BY` 的校验：当 `LIMIT BY` 使用了不在 `GROUP BY` 中的列时，现在会返回正确的 `NOT_AN_AGGREGATE` 错误，而不是 `NOT_FOUND_COLUMN_IN_BLOCK`。关闭 [#89713](https://github.com/ClickHouse/ClickHouse/issues/89713)。[#90665](https://github.com/ClickHouse/ClickHouse/pull/90665) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复了在分区键中使用 `LowCardinality` 列时出现的类型转换错误。关闭 [#89412](https://github.com/ClickHouse/ClickHouse/issues/89412)。[#90666](https://github.com/ClickHouse/ClickHouse/pull/90666) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复了一个问题：当查询的过滤谓词中包含由非确定性函数 (例如 `shardNum()`) 折叠出的常量时，可能会错误地使用查询条件缓存。[#90692](https://github.com/ClickHouse/ClickHouse/pull/90692) ([Eduard Karacharov](https://github.com/korowa)).
* 修复了在 `JOIN ON` 子句中，包含 EXISTS 函数的查询导致段错误的问题。现在，此类查询会直接返回 `INVALID_JOIN_ON_EXPRESSION` 错误。关闭 [#90698](https://github.com/ClickHouse/ClickHouse/issues/90698)。[#90719](https://github.com/ClickHouse/ClickHouse/pull/90719) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复逻辑错误：在未指定任何表的情况下使用默认数据库时，AccessRightsElement 会出现 'AST 格式不一致'。[#90742](https://github.com/ClickHouse/ClickHouse/pull/90742) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复在将 `localhost` 用作目标主机且使用 `remote` 表函数时，`ALTER UPDATE` 查询的访问校验问题。[#90761](https://github.com/ClickHouse/ClickHouse/pull/90761) ([pufit](https://github.com/pufit)).
* 修复命名集合中隐藏敏感信息依赖于 `display_secrets_in_show_and_select` 和 `format_display_secrets_in_show_and_select` 的问题。[#90765](https://github.com/ClickHouse/ClickHouse/pull/90765) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 禁用 `enable_shared_storage_snapshot_in_query` (会造成内存泄漏) 。[#90770](https://github.com/ClickHouse/ClickHouse/pull/90770) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在启用并行副本时，分布式表上的 RIGHT JOIN 导致数据重复的问题。[#90806](https://github.com/ClickHouse/ClickHouse/pull/90806) ([zoomxi](https://github.com/zoomxi)).
* 修复了 JSON 中共享数据与动态路径可能出现的状态不一致问题，避免其导致逻辑错误和意外结果。[#90816](https://github.com/ClickHouse/ClickHouse/pull/90816) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 SharedCatalog (仅限云端功能) 中 ALTER MODIFY QUERY 在 CSE 中使用 dictGet() 和字典名称时的问题。[#90860](https://github.com/ClickHouse/ClickHouse/pull/90860) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 String 聚合状态内存序列化的兼容性问题。如果聚合查询在不同版本的实例上执行，不同的序列化方式可能会导致结果重复。可通过 `serialize_string_in_memory_with_zero_byte` 启用新的序列化方式。[#90880](https://github.com/ClickHouse/ClickHouse/pull/90880) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在频繁 INSERT 时 Buffer 后台 flush 的问题。[#90892](https://github.com/ClickHouse/ClickHouse/pull/90892) ([Azat Khuzhin](https://github.com/azat)).
* 不要在 system.licenses 中列出 contrib/ 父目录。[#90901](https://github.com/ClickHouse/ClickHouse/pull/90901) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复读取 JSON/Dynamic/Variant 列时内存占用过高的问题。[#90907](https://github.com/ClickHouse/ClickHouse/pull/90907) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `base58Decode` 函数中的缓冲区分配问题。[#90909](https://github.com/ClickHouse/ClickHouse/pull/90909) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了这样一种潜在的逻辑错误：在已发送带有 `finish=true` 标志的响应后，又收到了来自副本的另一条读取请求。其原因是 `MergeTreeReadPoolParallelReplicas` 中存在逻辑竞态条件，不过这种情况极少发生。[#90921](https://github.com/ClickHouse/ClickHouse/pull/90921) ([Nikita Taranov](https://github.com/nickitat)).
* 修复部分撤销时对通配符授权的检查问题。添加了更多测试。[#90922](https://github.com/ClickHouse/ClickHouse/pull/90922) ([pufit](https://github.com/pufit)).
* 修复了 `SummingMergeTree` 在 `Nested` `LowCardinality` 列上的聚合问题。[#90927](https://github.com/ClickHouse/ClickHouse/pull/90927) ([Ivan Babrou](https://github.com/bobrik)) 。
* 修复通配符撤销对全局授权的处理 修复了一个问题：撤销通配符授权时，可能会误撤销某些全局级授权，例如 `CREATE USER`。[#90928](https://github.com/ClickHouse/ClickHouse/pull/90928) ([pufit](https://github.com/pufit)).
* 修复 Azure 列出 blob 时可能陷入无限循环的问题。[#90947](https://github.com/ClickHouse/ClickHouse/pull/90947) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复 Buffer 过度 flush 的问题 (会消耗 CPU 并产生大量日志) 。[#91000](https://github.com/ClickHouse/ClickHouse/pull/91000) ([Azat Khuzhin](https://github.com/azat)) 。
* ... 不再允许将 adaptive\_write\_buffer\_initial\_size 设置为 0。 [#91001](https://github.com/ClickHouse/ClickHouse/pull/91001) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了 JSON 中的一个问题：在禁用 `write_marks_for_substreams_in_compact_parts` 的情况下，于 Compact parts 中读取子对象时，某一路径可能同时存在于 shared data 和动态路径中。[#91014](https://github.com/ClickHouse/ClickHouse/pull/91014) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在不带参数的 `dictGet` 的 CTE 中触发的 std::out\_of\_range 错误。关闭 [#91027](https://github.com/ClickHouse/ClickHouse/issues/91027)。[#91022](https://github.com/ClickHouse/ClickHouse/pull/91022) ([Pavel Kruglov](https://github.com/Avogar))。
* 修复了在变更操作中从物化列读取动态子列的问题。关闭 [#90653](https://github.com/ClickHouse/ClickHouse/issues/90653)。[#91040](https://github.com/ClickHouse/ClickHouse/pull/91040) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在使用空数组和 `isNull` 函数时，`arrayFilter` 函数无法正常工作的问题。关闭 [#73849](https://github.com/ClickHouse/ClickHouse/issues/73849)。[#91105](https://github.com/ClickHouse/ClickHouse/pull/91105) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了在某个表列为空 Tuple 列时，`ARRAY JOIN` 中的逻辑错误。关闭 [#90801](https://github.com/ClickHouse/ClickHouse/issues/90801)。[#91123](https://github.com/ClickHouse/ClickHouse/pull/91123) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了旧 parts 中通过 alter add column 添加的列的惰性物化问题。[#91142](https://github.com/ClickHouse/ClickHouse/pull/91142) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 Summing/Aggregating/Coalescing MergeTree 中 JSON 列的合并问题。此前，这可能会在写入数据分区片段时导致意外的动态路径。[#91151](https://github.com/ClickHouse/ClickHouse/pull/91151) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 compact parts 写入过程中可能出现的动态结构不一致问题，此问题可能导致段错误。[#91152](https://github.com/ClickHouse/ClickHouse/pull/91152) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了科学计数法中次正规浮点值的解析问题。关闭 [#78903](https://github.com/ClickHouse/ClickHouse/issues/78903)。[#91162](https://github.com/ClickHouse/ClickHouse/pull/91162) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在从具有隐式 schema 的数据源子查询执行 INSERT SELECT 时的 schema 推断错误。[#91204](https://github.com/ClickHouse/ClickHouse/pull/91204) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复 [https://github.com/clickhouse/clickhouse/issues/91206：创建带有统计信息的表、写入一些数据并删除其中一项统计信息后，再次读取时会崩溃。原因是我们此前假设序列化和反序列化时的统计信息类型是相同的。在此次修复中，我们会检查当前元数据是否包含已序列化的统计信息；如果不包含，则构造一个模拟统计信息，仅执行反序列化以将其跳过。](https://github.com/clickhouse/clickhouse/issues/91206：创建带有统计信息的表、写入一些数据并删除其中一项统计信息后，再次读取时会崩溃。原因是我们此前假设序列化和反序列化时的统计信息类型是相同的。在此次修复中，我们会检查当前元数据是否包含已序列化的统计信息；如果不包含，则构造一个模拟统计信息，仅执行反序列化以将其跳过。) [#91227](https://github.com/ClickHouse/ClickHouse/pull/91227) ([Han Fei](https://github.com/hanfei1991)).
* 修复向包含 JSON/Dynamic 的 Tuple 和 LowCardinality 的 CoalescingMergeTree 列中插入数据时的问题。关闭 [#91215](https://github.com/ClickHouse/ClickHouse/issues/91215)。[#91270](https://github.com/ClickHouse/ClickHouse/pull/91270) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 SYSTEM DROP FILESYSTEM CACHE ON CLUSTER 的问题。 [#91304](https://github.com/ClickHouse/ClickHouse/pull/91304) ([Anton Ivashkin](https://github.com/ianton-ru)).
* 修复可能的逻辑错误 "从类型 DB::ColumnSparse 到 DB::ColumnNullable 的错误类型转换"。关闭 [#91284](https://github.com/ClickHouse/ClickHouse/issues/91284)。[#91309](https://github.com/ClickHouse/ClickHouse/pull/91309) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了一个崩溃问题：恶意构造的字节流在反序列化为嵌套的 QBit 类型时可能导致崩溃；这种情况理论上不应发生，但可能被利用来使服务器崩溃。[#91313](https://github.com/ClickHouse/ClickHouse/pull/91313) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了 Replicated 数据库中参数为空的别名表问题。已解决 [#91378](https://github.com/ClickHouse/ClickHouse/issues/91378)。[#91382](https://github.com/ClickHouse/ClickHouse/pull/91382) ([Kai Zhu](https://github.com/nauu))。
* 当前，该设置为 false，因此当 async insert 队列 flush 到远程服务器时，insert 操作始终为同步方式。即使某个用户将该设置设为 True，也是如此。[#91386](https://github.com/ClickHouse/ClickHouse/pull/91386) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 从合并算法的头信息中移除稀疏列。关闭 [#91377](https://github.com/ClickHouse/ClickHouse/issues/91377)。[#91396](https://github.com/ClickHouse/ClickHouse/pull/91396) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 25.8 中的 Hive 分区问题，该问题可能会导致误抛异常 `A hive partitioned file can't contain only partition columns`。[#91403](https://github.com/ClickHouse/ClickHouse/pull/91403) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 `dictGetDescendants` 中由 `NULL` 引发的崩溃：当字典类型支持 Hierarchy，但没有任何列为 `HIERARCHICAL` 时，会出现该问题。关闭 [#92026](https://github.com/ClickHouse/ClickHouse/issues/92026)。关闭 [#92121](https://github.com/ClickHouse/ClickHouse/issues/92121)。[#91420](https://github.com/ClickHouse/ClickHouse/pull/91420) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在使用 lambda 和非常量 tuple 参数时，`IN` 函数崩溃的问题。关闭 [#91379](https://github.com/ClickHouse/ClickHouse/issues/91379)。[#91446](https://github.com/ClickHouse/ClickHouse/pull/91446) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了 MaterializedView 插入到不支持并行写入的存储时会触发并行写入的问题。[#91449](https://github.com/ClickHouse/ClickHouse/pull/91449) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 处理 Ytsaurus XML 字典中的 NULL 值。[#91465](https://github.com/ClickHouse/ClickHouse/pull/91465) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 修复了 `QBit` 类型在使用诸如 `SET param_q=[1,2,3,4]; SELECT {q:QBit(Float32,4)}` 这类查询参数时会失败的问题。[#91488](https://github.com/ClickHouse/ClickHouse/pull/91488) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了在常量表达式中使用 untuple 时触发的 LOGICAL\_ERROR。[#91507](https://github.com/ClickHouse/ClickHouse/pull/91507) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复 `librdkafka` 中可能出现的数据竞争问题。[#91521](https://github.com/ClickHouse/ClickHouse/pull/91521) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了 `remote` 函数中 asterisks 参数导致的逻辑错误。关闭 [#90568](https://github.com/ClickHouse/ClickHouse/issues/90568)。[#91524](https://github.com/ClickHouse/ClickHouse/pull/91524) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了从 ORC 格式读取 Date 和 DateTime64 类型时的溢出问题。关闭了 [#70976](https://github.com/ClickHouse/ClickHouse/issues/70976)。[#91572](https://github.com/ClickHouse/ClickHouse/pull/91572) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 禁止对对象存储表引擎执行 ALTER 操作。例如，`ALTER ADD PROJECTION` 可能会导致服务器无法重新启动，因为对象存储引擎不支持 projections。[#91573](https://github.com/ClickHouse/ClickHouse/pull/91573) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了在使用非常量参考向量 (例如来自表的向量) 时，[`L2DistanceTransposed`](/zh/reference/functions/regular-functions/distance-functions#L2DistanceTransposed) 返回错误结果的问题。[#91517](https://github.com/ClickHouse/ClickHouse/issues/91517)。[#91593](https://github.com/ClickHouse/ClickHouse/pull/91593) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了一个 bug：在分发阶段，针对 FALSE 条件的 JOIN 会返回 `LOGICAL_ERROR`。关闭 [#91173](https://github.com/ClickHouse/ClickHouse/issues/91173)。[#91598](https://github.com/ClickHouse/ClickHouse/pull/91598) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复 join 中使用“附加过滤器”时内存占用增加的问题，关闭 [#91011](https://github.com/ClickHouse/ClickHouse/issues/91011)。[#91664](https://github.com/ClickHouse/ClickHouse/pull/91664) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在使用视图并启用并行副本时的 JOIN 查询问题。 [#91813](https://github.com/ClickHouse/ClickHouse/pull/91813) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了 delta lake 设置 `delta_lake_snapshot_version` 的问题：如果此前使用过快照版本，那么之后在表引擎 (而非表函数) 中将其设为值 -1 (禁用) 时，可能返回错误结果。关闭 [#87676](https://github.com/ClickHouse/ClickHouse/issues/87676)。[#91818](https://github.com/ClickHouse/ClickHouse/pull/91818) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复 RecursiveCTEChunkGenerator 中的 LOGICAL\_ERROR。[#91827](https://github.com/ClickHouse/ClickHouse/pull/91827) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了使用 FINAL 和 PREWHERE 的查询中块结构不匹配的问题。[#91847](https://github.com/ClickHouse/ClickHouse/pull/91847) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了同时使用 `join_use_nulls`、多个 join 以及 cross join 时的逻辑错误。[#91853](https://github.com/ClickHouse/ClickHouse/pull/91853) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 为共享数据中存在重复 path 以及动态 path 的 JSON 添加了修复机制；这种情况可能由 [https://github.com/ClickHouse/ClickHouse/pull/90816](https://github.com/ClickHouse/ClickHouse/pull/90816) 中已修复的 bug 导致。[#91886](https://github.com/ClickHouse/ClickHouse/pull/91886) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 ORC 读取器在读取使用 DICTIONARY\_V2 编码且仅包含 NULL 值的字符串列时的缺陷。[#91889](https://github.com/ClickHouse/ClickHouse/pull/91889) ([Peng Jian](https://github.com/fastio)) 。
* 修复 Tuple 列中稀疏与 Nullable 子流之间的序列化不一致问题，该问题可能导致 parts 损坏或在读取时崩溃。此修复对应 [https://github.com/ClickHouse/ClickHouse/pull/91851](https://github.com/ClickHouse/ClickHouse/pull/91851) 。@Algunenano 能否帮忙检查一下，这是否能修复私有仓库中的压力测试？@CurtizJ 也麻烦你帮忙看一下，可以吗？谢谢！[#91932](https://github.com/ClickHouse/ClickHouse/pull/91932) ([Amos Bird](https://github.com/amosbird)).
* 修复了在普通可重写磁盘上创建备份时出现 `Directory '{}' does not exist (LOGICAL_ERROR)` 错误的问题。[#91935](https://github.com/ClickHouse/ClickHouse/pull/91935) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复了使用 named collections 连接到 MongoDB 时发生崩溃的问题。[#91959](https://github.com/ClickHouse/ClickHouse/pull/91959) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在执行某些针对 compact parts 的 `ALTER` 查询后可能出现的 "TOO\_MANY\_MARKS" 错误。 [#91980](https://github.com/ClickHouse/ClickHouse/pull/91980) ([alesapin](https://github.com/alesapin)).
* 关闭 [https://github.com/clickhouse/clickhouse/issues/87417：v1](https://github.com/clickhouse/clickhouse/issues/87417：v1) 格式的写入 schema 存在错误："added\_snapshot\_id" 的类型应为 "long"，而不是 "null, long"，因为它是必填项。这是一个 bug，因为它与 Spark 等其他系统不兼容。在混用这些 manifest 文件时，就会触发该 bug。[#92078](https://github.com/ClickHouse/ClickHouse/pull/92078) ([Han Fei](https://github.com/hanfei1991)) 。
* 修复了 `readWKT`、`readWKB` 的名称错误：它们在先前版本中的命名风格不正确。[#92094](https://github.com/ClickHouse/ClickHouse/pull/92094) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `midpoint` 函数中的大量逻辑错误、溢出问题和功能缺陷。关闭 [#91816](https://github.com/ClickHouse/ClickHouse/issues/91816)。[#92102](https://github.com/ClickHouse/ClickHouse/pull/92102) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在使用稀疏编码读取某些子列 (例如字符串大小) 时可能出现的错误结果。 [#92156](https://github.com/ClickHouse/ClickHouse/pull/92156) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `system.view_refreshes` 因报错 `No macro 'replica' in config` 而无法运行的问题。[#92203](https://github.com/ClickHouse/ClickHouse/pull/92203) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 format 中 UDF 替换的问题。[#92210](https://github.com/ClickHouse/ClickHouse/pull/92210) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在 `ddlworker::markreplicasactive` 中，如果未找到活动主机，且 `remote_servers` 中包含一些 host\_ids，则会记录一条警告日志，而不是抛出异常。[#92223](https://github.com/ClickHouse/ClickHouse/pull/92223) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 为运算符 `IN` 和 `NOT IN` 加上括号。修复了 [#85075](https://github.com/ClickHouse/ClickHouse/issues/85075)。[#92225](https://github.com/ClickHouse/ClickHouse/pull/92225) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 修复了 KeeperMap 和 Memory 表的备份问题。对于使用这两种引擎之一且将 `max_compress_block_size` 设置为 `0` 的表，创建备份时可能会导致崩溃。[#92237](https://github.com/ClickHouse/ClickHouse/pull/92237) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了从 Log 引擎同时读取 String 数据和 `.size` 子列时发生的崩溃问题。此修复解决了 [#89909](https://github.com/ClickHouse/ClickHouse/issues/89909) 中的问题。此项还包含 [#92290](https://github.com/ClickHouse/ClickHouse/issues/92290) 中的部分提交。[#92341](https://github.com/ClickHouse/ClickHouse/pull/92341) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在 `caseWithExpression` 函数参数中使用 `Nothing` 类型所导致的逻辑错误。关闭 [#85354](https://github.com/ClickHouse/ClickHouse/issues/85354)。[#92351](https://github.com/ClickHouse/ClickHouse/pull/92351) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复聚合函数在 MEMORY\_LIMIT\_EXCEEDED 后可能崩溃的问题。[#92390](https://github.com/ClickHouse/ClickHouse/pull/92390) ([Azat Khuzhin](https://github.com/azat)) 。

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

* 在 CI 中使用 `clang-21`。[#87074](https://github.com/ClickHouse/ClickHouse/pull/87074) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 避免在交叉编译时通过 cmake 下载内容。[#90506](https://github.com/ClickHouse/ClickHouse/pull/90506) ([Raúl Marín](https://github.com/Algunenano)).

<div id="2511">
  ### ClickHouse 发行版 25.11，2025-11-27
</div>

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

* 移除已弃用的 `Object` 类型。[#85718](https://github.com/ClickHouse/ClickHouse/pull/85718) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 移除已废弃的 `LIVE VIEW` 功能。如果你在使用 `LIVE VIEW`，将无法升级到新版本。[#88706](https://github.com/ClickHouse/ClickHouse/pull/88706) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在之前的版本中，`Geometry` 类型是 `String` 的别名，但现在它已成为功能完备的类型。[#83344](https://github.com/ClickHouse/ClickHouse/pull/83344) ([scanhex12](https://github.com/scanhex12)) 。
* 对 MergeTree 表的 Wide 数据分区片段中为 `Variant` 类型子列生成的文件名进行转义。此变更会破坏与旧表 (使用 Variant/Dynamic/JSON 数据类型) 的兼容性。它修复了在 Variant 中存储包含特殊符号的类型时的问题 (例如包含 `\` 的特定 timezone 的 DateTime) 。可通过修改 MergeTree setting `escape_variant_subcolumn_filenames` 来禁用转义 (若要保持兼容性，请在 MergeTree 配置中禁用该 setting，或在升级前将 `compatibility` setting 设为之前的版本) 。解决了 [#69590](https://github.com/ClickHouse/ClickHouse/issues/69590)。[#87300](https://github.com/ClickHouse/ClickHouse/pull/87300) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 默认对 `String` 数据类型启用 `with_size_stream` serialization format。此变更本身向后兼容，但新的 serialization format 仅从 25.10 版本开始受支持，这意味着无法降级到 25.10 之前的版本。如果你希望保留降级到 25.9 及更早版本的能力，请在 server configuration 的 `merge_tree` 部分中将 `serialization_info_version` 配置为 `basic`，并将 `string_serialization_version` 配置为 `single_stream`。[#89329](https://github.com/ClickHouse/ClickHouse/pull/89329) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 HTTP 结果响应增加异常标签支持，以便客户端能更可靠地解析异常。解决了 [#75175](https://github.com/ClickHouse/ClickHouse/issues/75175)。为保持不同 format 之间的一致性，setting `http_write_exception_in_output_format` 默认处于禁用状态。[#88818](https://github.com/ClickHouse/ClickHouse/pull/88818) ([Kaviraj Kanagaraj](https://github.com/kavirajk)) 。虽然按理说这不应破坏任何现有行为 (最坏情况下，只会在异常消息中多出一个奇怪的字符串) ，但出于提醒目的，仍有必要将其归类为“向后不兼容的变更” (因为谁也不知道某些垃圾脚本会如何解析异常消息) 。
* 禁止在共享 object storage path 上创建多个 `plain-rewritable` 磁盘，因为这可能会在不同元数据存储事务发生冲突时导致未定义行为。[#89038](https://github.com/ClickHouse/ClickHouse/pull/89038) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 修复 Kafka 存储 SASL setting 的优先级问题。现在，在 CREATE TABLE queries 中指定的表级 SASL setting 会正确覆盖 configuration files 中针对消费者/生产者的 setting。[#89401](https://github.com/ClickHouse/ClickHouse/pull/89401) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* Parquet 无 timezone 的 timestamp (isAdjustedToUTC=false) 现在会被读取为 DateTime64(..., 'UTC')，而不是 DateTime64(...)。这样虽然不能算完全正确，但相对没那么错，因为将这类 UTC timestamp 转换为字符串时，会生成正确的本地时间表示。使用 `input_format_parquet_local_time_as_utc = 0` 可恢复旧行为。解决了 [#87469](https://github.com/ClickHouse/ClickHouse/issues/87469)。[#87872](https://github.com/ClickHouse/ClickHouse/pull/87872) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 对 `T64` codec 的一项小改进：它不再接受与压缩元素大小不对齐的数据类型，否则会触发一个 bug。解决了 [#89282](https://github.com/ClickHouse/ClickHouse/issues/89282)。[#89432](https://github.com/ClickHouse/ClickHouse/pull/89432) ([yanglongwei](https://github.com/ylw510)) 。

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

* 引入 `Geometry` 类型，并支持读取其 `WKB` 和 `WKT` 格式。在之前的版本中，`Geometry` 类型是 `String` 的别名，但现在已成为功能完整的类型。[#83344](https://github.com/ClickHouse/ClickHouse/pull/83344) ([scanhex12](https://github.com/scanhex12)) 。
* 新增了 SQL 语句 `EXECUTE AS`，支持用户身份模拟。修复了 [#39048](https://github.com/ClickHouse/ClickHouse/issues/39048)。[#70775](https://github.com/ClickHouse/ClickHouse/pull/70775) ([Shankar](https://github.com/shiyer7474)) 。
* 新增 `naiveBayesClassifier` 函数，使用基于 ngrams 的朴素贝叶斯对文本进行分类。[#88677](https://github.com/ClickHouse/ClickHouse/pull/88677) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增对分数形式 `LIMIT` 和 `OFFSET` 的支持，可用于选择表中的一部分数据。关闭 [#81892](https://github.com/ClickHouse/ClickHouse/issues/81892)。[#88755](https://github.com/ClickHouse/ClickHouse/pull/88755) ([Ahmed Gouda](https://github.com/0xgouda)).
* 新增用于 Microsoft OneLake catalog 的 ClickHouse 子系统。[#89366](https://github.com/ClickHouse/ClickHouse/pull/89366) ([scanhex12](https://github.com/scanhex12)) 。
* 新增 `flipCoordinates` 函数，用于展开数组中指定数量的维度，并交换 Tuple 列内部的指针。解决了 [#79469](https://github.com/ClickHouse/ClickHouse/issues/79469)。[#79634](https://github.com/ClickHouse/ClickHouse/pull/79634) ([Sachin Kumar Singh](https://github.com/sachinkumarsingh092)) 。
* 新增 `system.unicode` 表，包含 Unicode 字符及其属性列表。关闭 [#80055](https://github.com/ClickHouse/ClickHouse/issues/80055)。[#80857](https://github.com/ClickHouse/ClickHouse/pull/80857) ([wxybear](https://github.com/wxybear)) 。
* 新增 MergeTree 设置 `merge_max_dynamic_subcolumns_in_wide_part`，可在合并后限制 Wide part 中动态子列的数量，而不受数据类型中指定参数的影响。[#87646](https://github.com/ClickHouse/ClickHouse/pull/87646) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 新增对 `cume_dist` 窗口函数的支持。修复了 [#86920](https://github.com/ClickHouse/ClickHouse/issues/86920)。[#88102](https://github.com/ClickHouse/ClickHouse/pull/88102) ([Manuel](https://github.com/raimannma)) 。
* 用户现在可以在构建文本索引时添加一个新的参数 `preprocessor`。该参数是一个任意表达式，用于在标记化之前转换每个文档。[#88272](https://github.com/ClickHouse/ClickHouse/pull/88272) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 为 `X-ClickHouse-Progress` 和 `X-ClickHouse-Summary` 新增了 `memory_usage` 字段。可用于在客户端实时采集查询的内存使用情况。[#88393](https://github.com/ClickHouse/ClickHouse/pull/88393) ([Christoph Wurm](https://github.com/cwurm)).
* 添加设置 `into_outfile_create_parent_directories`，可为 `INTO OUTFILE` 自动创建父目录，避免输出路径不存在时报错。这简化了 queries 将结果写入嵌套目录的工作流。解决了 [#88610](https://github.com/ClickHouse/ClickHouse/issues/88610)。[#88795](https://github.com/ClickHouse/ClickHouse/pull/88795) ([Saksham](https://github.com/Saksham10-11)) 。
* 支持对临时表使用 `CREATE OR REPLACE` 语法。修复 [#35888](https://github.com/ClickHouse/ClickHouse/issues/35888)。[#89450](https://github.com/ClickHouse/ClickHouse/pull/89450) ([Aleksandr Musorin](https://github.com/AVMusorin)) 。
* 支持 `arrayRemove`，可从数组 `arr` 中移除所有等于 `elem` 的元素。它仅用于兼容 Postgres，因为 ClickHouse 已经提供了功能强大得多的 `arrayFilter` 函数。解决了 [#52099](https://github.com/ClickHouse/ClickHouse/issues/52099)。[#89585](https://github.com/ClickHouse/ClickHouse/pull/89585) ([tiwarysaurav](https://github.com/tiwarysaurav)).
* 新增了用于计算平均值的 `midpoint` 标量函数。修复了 [#89029](https://github.com/ClickHouse/ClickHouse/issues/89029)。[#89679](https://github.com/ClickHouse/ClickHouse/pull/89679) ([simonmichal](https://github.com/simonmichal)) 。
* Web UI 现已提供下载按钮。即使 UI 只显示部分结果，也可以下载完整结果。[#89768](https://github.com/ClickHouse/ClickHouse/pull/89768) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `arrow_flight_request_descriptor_type` 设置，以支持 Dremio 和其他需要命令式描述符的 Arrow Flight 服务器。实现了 [#89523](https://github.com/ClickHouse/ClickHouse/issues/89523)。[#89826](https://github.com/ClickHouse/ClickHouse/pull/89826) ([Shreyas Ganesh](https://github.com/shreyasganesh0)).
* 新增聚合函数 `argAndMin` 和 `argAndMax`，可返回参数及其对应的极值。在之前的版本中，也可以通过将 Tuple 用作参数来实现这一点。[#89884](https://github.com/ClickHouse/ClickHouse/pull/89884) ([AbdAlRahman Gad](https://github.com/AbdAlRahmanGad)).
* 用于写入和校验 Parquet 校验和的设置。[#79012](https://github.com/ClickHouse/ClickHouse/pull/79012) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 在 Kafka 表引擎中新增了 `kafka_schema_registry_skip_bytes` 设置，用于在解析消息载荷之前跳过封套头部字节 (例如 AWS Glue Schema Registry 的 19 字节前缀) 。这样，ClickHouse 就能够消费来自会添加元数据头的 Schema Registry 的消息。[#89621](https://github.com/ClickHouse/ClickHouse/pull/89621) ([Taras Polishchuk](https://github.com/wake-up-neo)).
* 新增 `h3PolygonToCells` 函数，可用 H3 六边形网格填充几何图形。解决了 [#33991](https://github.com/ClickHouse/ClickHouse/issues/33991)。[#66262](https://github.com/ClickHouse/ClickHouse/pull/66262) ([Zacharias Knudsen](https://github.com/zachasme)) 。
* 新增虚拟列 `_tags` (`Map(String, String)`) ，包含与 S3 中 blob 关联的所有标签 (注意：如果 blob 没有任何标签，则不会发起额外请求) 。解决了 [#72945](https://github.com/ClickHouse/ClickHouse/issues/72945)。[#77773](https://github.com/ClickHouse/ClickHouse/pull/77773) ([Zicong Qu](https://github.com/zicongleoqu)) 。

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

* 支持从 ACME 提供商获取 TLS 证书，参见 [RFC 8555](https://datatracker.ietf.org/doc/html/rfc8555)，例如 Let's Encrypt。这使得在分布式集群上自动配置 TLS 成为可能。[#66315](https://github.com/ClickHouse/ClickHouse/pull/66315) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 支持部分 Prometheus HTTP Query API。要启用该功能，请在配置文件的 `<prometheus>` 部分中添加一条类型为 `query_api` 的规则。支持的处理程序包括 `/api/v1/query_range` 和 `/api/v1/query`。[#86132](https://github.com/ClickHouse/ClickHouse/pull/86132) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 全文搜索现已进入 Beta 阶段 (此前处于 Experimental 阶段) 。[#88928](https://github.com/ClickHouse/ClickHouse/pull/88928) ([Robert Schulze](https://github.com/rschu1ze)) 。
* `Alias` 现已归入 Experimental，可通过 `allow_experimental_alias_table_engine = 1` 启用。[#89712](https://github.com/ClickHouse/ClickHouse/pull/89712) ([Kai Zhu](https://github.com/nauu)) 。

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

* Parquet reader v3 默认启用。[#88827](https://github.com/ClickHouse/ClickHouse/pull/88827) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 分布式执行：按行组 ID 而不是按文件拆分任务，效果更好。[#87508](https://github.com/ClickHouse/ClickHouse/pull/87508) ([scanhex12](https://github.com/scanhex12)) 。
* `RIGHT` 和 `FULL` JOIN 现已使用 ConcurrentHashJoin；这意味着这两类 JOIN 现在可以以更高的并行度运行。在多种 RIGHT 和 FULL JOIN 场景下，性能最高可提升至两倍。解决了 [#78027](https://github.com/ClickHouse/ClickHouse/issues/78027)。[#78462](https://github.com/ClickHouse/ClickHouse/pull/78462) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 针对查询中常量表达式取值较大时进行了优化。已关闭 [#72880](https://github.com/ClickHouse/ClickHouse/issues/72880)。[#81104](https://github.com/ClickHouse/ClickHouse/pull/81104) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 在具有 10K+ 个 parts 的表上，对于大量分区裁剪的 `SELECT` 查询，速度最高可提升至 8 倍。[#85535](https://github.com/ClickHouse/ClickHouse/pull/85535) ([James Morrison](https://github.com/jawm)).
* 当查询在聚合状态中使用固定哈希映射时 (即按小整数进行 group by) ，ClickHouse 会并行合并聚合状态，以加快查询速度。[#87366](https://github.com/ClickHouse/ClickHouse/pull/87366) ([Jianfei Hu](https://github.com/incfly)) 。
* 允许将投影 (使用针对 `_part_offset` 的 SELECT 且具有不同的 ORDER BY) 作为次级索引使用。启用后，某些查询谓词可用于从 projection parts 读取并生成 bitmap，从而在 PREWHERE 阶段高效过滤行。这是继 [#80343](https://github.com/ClickHouse/ClickHouse/issues/80343) 之后，实现投影索引的第三步。[#81021](https://github.com/ClickHouse/ClickHouse/pull/81021) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了少数 Aarch64 系统以及可能的其他架构/内核组合中的 VDSO 问题。[#86096](https://github.com/ClickHouse/ClickHouse/pull/86096) ([Tomas Hulata](https://github.com/tombokombo)) 。
* 通过简化代码并调整[选择算法](https://clickhouse.com/blog/lz4-compression-in-clickhouse#how-to-choose-the-best-algorithm)，优化了 LZ4 解压速度。[#88360](https://github.com/ClickHouse/ClickHouse/pull/88360) ([Raúl Marín](https://github.com/Algunenano)) 。
* S3 会根据键名前缀在内部对对象进行分区，并可自动扩展以支持每个分区的高请求速率。此次更改引入了两个新的 BACKUP 设置：data\_file\_name\_generator 和 data\_file\_name\_prefix\_length。当 data\_file\_name\_generator=checksum 时，备份数据文件会根据其内容的哈希值命名。示例：对于 checksum = `abcd1234ef567890abcd1234ef567890` 且 `data_file_name_prefix_length = 3`，生成的路径将为：`abc/d1234ef567890abcd1234ef567890`。这种生成的键分布有助于提升 S3 分区间的负载均衡，并降低发生限流的风险。[#88418](https://github.com/ClickHouse/ClickHouse/pull/88418) ([Julia Kartseva](https://github.com/jkartseva)).
* 通过缓存字典块，并使用哈希表而非二分查找进行标记查找，提升了文本索引性能。[#88786](https://github.com/ClickHouse/ClickHouse/pull/88786) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 现在，查询可以同时利用 `optimize_read_in_order` 和 `query_plan_optimize_lazy_materialization`。已解决 [#88767](https://github.com/ClickHouse/ClickHouse/issues/88767)。[#88866](https://github.com/ClickHouse/ClickHouse/pull/88866) ([Manuel](https://github.com/raimannma)) 。
* 为带有 `DISTINCT` 的查询使用聚合投影。关闭 [#86925](https://github.com/ClickHouse/ClickHouse/issues/86925)。[#88894](https://github.com/ClickHouse/ClickHouse/pull/88894) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 通过缓存倒排列表来提升连续运行时的性能。[#88912](https://github.com/ClickHouse/ClickHouse/pull/88912) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 当输入的排序顺序与 LIMIT BY 的键一致时，执行流式 LIMIT BY 转换。[#88969](https://github.com/ClickHouse/ClickHouse/pull/88969) ([Eduard Karacharov](https://github.com/korowa)) 。
* 在某些情况下，允许将 `ANY LEFT JOIN` 或 `ANY RIGHT JOIN` 改写为 `ALL INNER JOIN`。[#89403](https://github.com/ClickHouse/ClickHouse/pull/89403) ([Dmitry Novik](https://github.com/novikd)) 。
* 降低日志开销：减少每条记录所需的原子操作。[#89651](https://github.com/ClickHouse/ClickHouse/pull/89651) ([Sergei Trifonov](https://github.com/serxa)).
* 当在包含多个 JOIN 的查询中启用运行时过滤器并添加了多个运行时过滤器时，优先下推新添加的过滤步骤。[#89725](https://github.com/ClickHouse/ClickHouse/pull/89725) ([Alexander Gololobov](https://github.com/davenger)) 。
* 通过降低哈希表合并的开销，小幅加快了一些 `uniqExact` 操作。[#89727](https://github.com/ClickHouse/ClickHouse/pull/89727) ([Raúl Marín](https://github.com/Algunenano)) 。
* 将 lazy materialization 的行数上限从 10 提高到 100。[#89772](https://github.com/ClickHouse/ClickHouse/pull/89772) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认启用设置 `allow_special_serialization_kinds_in_output_formats`。这将降低内存占用，并提升在某些行输出格式下输出 Sparse/Replicated 列时的查询速度。[#89402](https://github.com/ClickHouse/ClickHouse/pull/89402) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 为 `ALTER TABLE ... FREEZE` 查询添加了并行执行支持。[#71743](https://github.com/ClickHouse/ClickHouse/pull/71743) ([Kirill](https://github.com/kirillgarbar)) 。
* 为 bcrypt 身份验证增加缓存机制。[#87115](https://github.com/ClickHouse/ClickHouse/pull/87115) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 如果在带有 `FINAL` 的查询中使用的跳过索引位于主键中的某一列上，则无需额外检查其他 parts 中的主键交集，现已不再执行该步骤。解决了 [#85897](https://github.com/ClickHouse/ClickHouse/issues/85897)。[#88368](https://github.com/ClickHouse/ClickHouse/pull/88368) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 优化项 `enable_lazy_columns_replication` 现已默认启用，这将减少 join 中的内存占用。[#89316](https://github.com/ClickHouse/ClickHouse/pull/89316) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 parts 引入按表划分的 `ColumnsDescription` 缓存，在表包含大量 parts 和列时可降低内存使用量。 [#89352](https://github.com/ClickHouse/ClickHouse/pull/89352) ([Azat Khuzhin](https://github.com/azat)).
* 为文本索引反序列化后的请求头新增了缓存，以减少 I/O 并提升查询性能。该缓存可通过以下新增的服务端设置进行配置：- `text_index_header_cache_policy` - `text_index_header_cache_size` - `text_index_header_cache_max_entries` - `text_index_header_cache_size_ratio`。[#89513](https://github.com/ClickHouse/ClickHouse/pull/89513) ([Elmi Ahmadov](https://github.com/ahmadov)) 。

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

* 设置 `use_variant_as_common_type` 时，如有需要，UNION 应使用 `Variant` 来统一类型。解决了 [#82772](https://github.com/ClickHouse/ClickHouse/issues/82772)。[#83246](https://github.com/ClickHouse/ClickHouse/pull/83246) ([Mithun p](https://github.com/mithunputhusseri)).
* 现已支持将 SQL 中定义的角色授予 `users.xml` 中定义的用户。[#88139](https://github.com/ClickHouse/ClickHouse/pull/88139) ([c-end](https://github.com/c-end)).
* 记录内部查询 (即由字典、可刷新materialized view 等内部执行的查询) ，并在 `system.query_log` 中新增 `is_internal` 列。[#83277](https://github.com/ClickHouse/ClickHouse/pull/83277) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 增强了 `IS NOT DISTINCT FROM` (`<=>`) 运算符：新增对其逆运算 `IS DISTINCT FROM` 的支持，并支持不同类型但彼此兼容的数值操作数 (例如 `Nullable(UInt32)` 和 `Nullable(Int64)`) 。修复了 [#86763](https://github.com/ClickHouse/ClickHouse/issues/86763)。[#87581](https://github.com/ClickHouse/ClickHouse/pull/87581) ([yanglongwei](https://github.com/ylw510)).
* `clickhouse-client` 和 `clickhouse-local` 在交互模式下，会在命令行中高亮显示与当前光标所在标识符同名的其他标识符。[#89689](https://github.com/ClickHouse/ClickHouse/pull/89689) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 与输出格式相关的设置现在不会再影响查询缓存。此外，查询缓存会忽略 `http_response_headers` 设置。这是为了支持实现一些功能，例如在 Web UI 中从缓存下载结果。[#89756](https://github.com/ClickHouse/ClickHouse/pull/89756) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使用查询结果缓存时，HTTP 接口会提供 `Age` 和 `Expires` 请求头。是否存在 `Age` 请求头表明结果是否来自缓存，而 `Expires` 也会在首次写入时设置。新增 profile events：`QueryCacheAgeSeconds`、`QueryCacheReadRows`、`QueryCacheReadBytes`、`QueryCacheWrittenRows`、`QueryCacheWrittenBytes`。[#89759](https://github.com/ClickHouse/ClickHouse/pull/89759) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 允许在启用 `disable_insertion_and_mutation` 时向远程表和数据湖表插入数据 (即 ClickHouse Cloud 中的只读仓库) 。[#88549](https://github.com/ClickHouse/ClickHouse/pull/88549) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 新增 `SYSTEM DROP TEXT INDEX CACHES` 查询。[#90287](https://github.com/ClickHouse/ClickHouse/pull/90287) ([Anton Popov](https://github.com/CurtizJ)) 。
* 默认启用 `enable_shared_storage_snapshot_in_query`，以获得更好的一致性保障。应该没有任何负面影响。[#82634](https://github.com/ClickHouse/ClickHouse/pull/82634) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `send_profile_events` 设置，当不使用 profile events 时，客户端可借此减少网络流量。[#89588](https://github.com/ClickHouse/ClickHouse/pull/89588) ([Kaviraj Kanagaraj](https://github.com/kavirajk)).
* 允许按查询禁用对邻近分段的后台下载。修复了 [#89524](https://github.com/ClickHouse/ClickHouse/issues/89524)。[#89668](https://github.com/ClickHouse/ClickHouse/pull/89668) ([tanner-bruce](https://github.com/tanner-bruce)) 。
* 当 Replicated MergeTree 表中存在损坏的磁盘时，允许执行 `FETCH PARTITION`。[#58663](https://github.com/ClickHouse/ClickHouse/pull/58663) ([Duc Canh Le](https://github.com/canhld94)) 。
* 修复了在 MySQL database engine 中获取 MySQL 表 schema 时出现的未捕获异常。[#69358](https://github.com/ClickHouse/ClickHouse/pull/69358) ([Duc Canh Le](https://github.com/canhld94)) 。
* 所有 DDL `ON CLUSTER` 查询现在都会在原始查询用户的上下文中执行，以便更准确地进行访问验证。[#71334](https://github.com/ClickHouse/ClickHouse/pull/71334) ([pufit](https://github.com/pufit)).
* 新增了对 `Parquet` 中以逻辑类型 `UUID` 的 `FixedString(16)` 表示的 `UUID` 的支持。[#74484](https://github.com/ClickHouse/ClickHouse/pull/74484) ([alekseev-maksim](https://github.com/alekseev-maksim)).
* 默认在非服务端二进制文件中禁用 ThreadFuzzer。[#89115](https://github.com/ClickHouse/ClickHouse/pull/89115) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过推迟其物化，使查询计划优化对相关子查询的输入子计划可见。属于 [#79890](https://github.com/ClickHouse/ClickHouse/issues/79890) 的一部分。[#85455](https://github.com/ClickHouse/ClickHouse/pull/85455) ([Dmitry Novik](https://github.com/novikd)).
* 你可以在 clickhouse-client 中查看包含 `SELECT` 的 `CREATE OR REPLACE TABLE` 查询的进度条、日志和性能统计信息。即使 `SELECT` 非常耗时，此类查询也不再会导致超时。修复了 [#38416](https://github.com/ClickHouse/ClickHouse/issues/38416)。[#87247](https://github.com/ClickHouse/ClickHouse/pull/87247) ([Diskein](https://github.com/Diskein)) 。
* 支持在哈希函数中使用 `JSON` 和 `Dynamic` 类型。解决了 [#87734](https://github.com/ClickHouse/ClickHouse/issues/87734)。[#87791](https://github.com/ClickHouse/ClickHouse/pull/87791) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 完善 ArrowFlight server 中缺失的部分。[#88013](https://github.com/ClickHouse/ClickHouse/pull/88013) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 为服务器和 Keeper 新增多个直方图指标，用于记录 Keeper 请求执行各阶段的耗时。将为服务器新增以下指标：`keeper_client_queue_duration_milliseconds`、`keeper_client_send_duration_milliseconds`、`keeper_client_roundtrip_duration_milliseconds`。将为 Keeper 新增以下指标：`keeper_server_preprocess_request_duration_milliseconds`、`keeper_server_process_request_duration_milliseconds`、`keeper_server_queue_duration_milliseconds`、`keeper_server_send_duration_milliseconds`。[#88158](https://github.com/ClickHouse/ClickHouse/pull/88158) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 为 `EXPLAIN` 查询新增 `input_headers` 选项，用于在各个步骤中显示输入头信息。[#88311](https://github.com/ClickHouse/ClickHouse/pull/88311) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 新增了 profile events，用于统计因限流器而延迟的 S3 和 AzureBlobStorage 请求数量。修复了与磁盘相关和非磁盘相关的 ThrottlerCount profile events 不一致的问题。现在，AzureBlobStorage 的 HTTP DELETE 请求不再受限流。[#88535](https://github.com/ClickHouse/ClickHouse/pull/88535) ([Sergei Trifonov](https://github.com/serxa)).
* 缓存表级统计信息，并新增两个设置：MergeTree 设置 `refresh_statistics_interval` 表示统计信息缓存的刷新时间间隔，0 表示不创建缓存。会话设置 `use_statistics_cache` 表示查询时是否使用表级统计信息。有时为了获得更准确的统计信息，我们会选择忽略缓存。[#88670](https://github.com/ClickHouse/ClickHouse/pull/88670) ([Han Fei](https://github.com/hanfei1991)).
* 已修复 `Array` 和 `Map` 的二进制反序列化：在校验大小限制时，现改为使用 `max_binary_array_size` 设置，而非 `max_binary_string_size`。这可确保在读取 `RowBinary` 格式时应用的是正确的限制。[#88744](https://github.com/ClickHouse/ClickHouse/pull/88744) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 引入了 `LockGuardWithStopWatch` 类，并将其用于 background pool 中执行 merge 的场景。如果某个 mutex 被持有超过一秒，或某个线程在一秒内仍难以获取该 mutex，就会打印一条警告信息。将 `MergeMutateSelectedEntry` 析构函数中的重量级代码移至 `finalize` 方法，以避免在 `MergeTreeBackground` 执行器中持锁过久。[#88898](https://github.com/ClickHouse/ClickHouse/pull/88898) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 当端点中未指定区域时，允许自动为 S3 使用需选择加入的 AWS 区域。参考：[需选择加入的 AWS 区域](https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html)。[#88930](https://github.com/ClickHouse/ClickHouse/pull/88930) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 用户现在可以在分页器运行期间按 Ctrl-C 取消 clickhouse-client 中的查询。已解决 [#80778](https://github.com/ClickHouse/ClickHouse/issues/80778)。[#88935](https://github.com/ClickHouse/ClickHouse/pull/88935) ([Grigorii](https://github.com/GSokol)) 。
* Web UI 即使在值为负数时，也会在表中显示条形。因此，它可以显示双向条形图，并为负值和正值两侧的条形使用不同的颜色。[#89016](https://github.com/ClickHouse/ClickHouse/pull/89016) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 禁用 `shared_merge_tree_create_per_replica_metadata_nodes`，以减少 `SharedMergeTree` 在 Keeper 中存储的元数据量。[#89036](https://github.com/ClickHouse/ClickHouse/pull/89036) ([Alexander Tokmakov](https://github.com/tavplubix)).
* 使 `S3Queue` 遵循 `disable_insertion_and_mutation` 服务器级设置。[#89048](https://github.com/ClickHouse/ClickHouse/pull/89048) ([Raúl Marín](https://github.com/Algunenano)) 。
* 将 25.6 中默认的 `s3_retry_attempts` 设置为 500，以确保在 S3 重新分区、且 S3 返回 slow-down 错误持续超过 10 分钟时，备份仍能成功完成。[#89051](https://github.com/ClickHouse/ClickHouse/pull/89051) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 现在，`kafka_compression_codec` 和 `kafka_compression_level` 设置可用于在两种 Kafka 引擎中为 Kafka 生产者指定压缩方式。[#89073](https://github.com/ClickHouse/ClickHouse/pull/89073) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 在 `system.columns` 中新增 `statistics` 列，用于标示该表上已构建的统计信息类型。如果某类统计信息是自动创建的，则会在后缀中显示为 (auto)。[#89086](https://github.com/ClickHouse/ClickHouse/pull/89086) ([Han Fei](https://github.com/hanfei1991)) 。
* 当向 `*Cluster` 表函数传入通用展开而非集群名称时，改进了错误信息。[#89093](https://github.com/ClickHouse/ClickHouse/pull/89093) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* YTsaurus：允许将 replicated\_table 作为数据源使用。[#89107](https://github.com/ClickHouse/ClickHouse/pull/89107) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 在 CLI 中，以空白字符开头的查询不再保存到历史记录中。[#89116](https://github.com/ClickHouse/ClickHouse/pull/89116) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 支持将 Array(String) 用作 `hasAnyTokens` 或 `hasAllTokens` 函数的输入。[#89124](https://github.com/ClickHouse/ClickHouse/pull/89124) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 调整纯可重写磁盘在内存中存储元数据的方式，修复了大量与目录嵌套等相关的 bug。[#89125](https://github.com/ClickHouse/ClickHouse/pull/89125) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 查询 Iceberg 表时，IN 表达式中的子查询会在分区裁剪分析之前被正确地预先计算。[#89177](https://github.com/ClickHouse/ClickHouse/pull/89177) ([Daniil Ivanik](https://github.com/divanik)) 。
* 默认启用 `create_table_empty_primary_key_by_default`。这样可用性更好。[#89333](https://github.com/ClickHouse/ClickHouse/pull/89333) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `Backup` 数据库引擎中的错误：在使用 `SHOW CREATE DATABASE` 或查询 `system.databases` 中的 `engine_full` 时，可能会生成无效的查询。关闭 [#89477](https://github.com/ClickHouse/ClickHouse/issues/89477)。[#89341](https://github.com/ClickHouse/ClickHouse/pull/89341) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在早期版本中，如果你在 CREATE TABLE 查询中未指定表引擎，设置 `create_table_empty_primary_key_by_default` 将不会生效。[#89342](https://github.com/ClickHouse/ClickHouse/pull/89342) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `chdig` 更新至 v25.11.1——包含对日志功能的重大改进以及其他多项增强 ([25.11 发布说明](https://github.com/azat/chdig/releases/tag/v25.11.1)) 。[#89957](https://github.com/ClickHouse/ClickHouse/pull/89957) ([Azat Khuzhin](https://github.com/azat)) 。 ([25.10 发布说明](https://github.com/azat/chdig/releases/tag/v25.10.1)) 。[#89452](https://github.com/ClickHouse/ClickHouse/pull/89452) ([Azat Khuzhin](https://github.com/azat)) 。
* 将 Web UI 中查询文本区域的大小调节控件改为全宽，使用起来会稍微方便一些。此外，浏览器原生的大小调节控件在 iPad 上的 Safari 中不可用；此次更改后，至少只要你知道这一点，就可以拖动文本区域底部来调整大小。[#89457](https://github.com/ClickHouse/ClickHouse/pull/89457) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进了哈希 JOIN 结果生成中的内存跟踪。此前，生成 JOIN 结果期间的临时分配未被正确跟踪，可能会导致超出内存限制。[#89560](https://github.com/ClickHouse/ClickHouse/pull/89560) ([Azat Khuzhin](https://github.com/azat)).
* 异步服务器日志：提前刷新并增大默认队列大小。[#89597](https://github.com/ClickHouse/ClickHouse/pull/89597) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 `system.asynchronous_metrics` 中错误的 `FilesystemCacheBytes` (以及其他项) 。对文件系统缓存仅运行一次 `SYSTEM` 查询。为 `system.filesystem_caches` 中指向同一路径的缓存创建原子视图。[#89640](https://github.com/ClickHouse/ClickHouse/pull/89640) ([Azat Khuzhin](https://github.com/azat)) 。
* 进一步明确了 `system.view_refreshes` 中部分列的说明。[#89701](https://github.com/ClickHouse/ClickHouse/pull/89701) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 与 STS 端点交互时，会缓存 S3 凭证，以便在不同的函数调用中复用。缓存凭证的数量可通过 `s3_credentials_provider_max_cache_size` 控制。[#89734](https://github.com/ClickHouse/ClickHouse/pull/89734) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了运行时过滤器下推在其下方存在多个表达式步骤时的问题。[#89741](https://github.com/ClickHouse/ClickHouse/pull/89741) ([Alexander Gololobov](https://github.com/davenger)) 。
* 如果系统内存低于 5GB，默认不对可执行文件执行 mlock。[#89751](https://github.com/ClickHouse/ClickHouse/pull/89751) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Web UI 中的类型提示不再溢出到表头。还修复了工具提示的显示问题——它们不再被表头遮挡。[#89753](https://github.com/ClickHouse/ClickHouse/pull/89753) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中显示表的属性。点击行数或字节数会显示来自 `system.tables` 的查询。点击表引擎会显示 `SHOW TABLES`。[#89771](https://github.com/ClickHouse/ClickHouse/pull/89771) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 支持为使用未实现追加写入的磁盘的表启用 `non_replicated_deduplication_window`。解决了 [#87281](https://github.com/ClickHouse/ClickHouse/issues/87281)。[#89796](https://github.com/ClickHouse/ClickHouse/pull/89796) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 在命令 `SYSTEM FLUSH ASYNC INSERT QUEUE` 中新增了指定要刷新的表列表的功能。[#89915](https://github.com/ClickHouse/ClickHouse/pull/89915) ([Sema Checherinda](https://github.com/CheSema)) 。
* 在 `system.part_log` 中存储去重块 ID。[#89928](https://github.com/ClickHouse/ClickHouse/pull/89928) ([Sema Checherinda](https://github.com/CheSema)) 。
* 将文件系统缓存设置 `keep_free_space_remove_batch` 的默认值从 10 调整为 100，因为这样更合理。 [#90030](https://github.com/ClickHouse/ClickHouse/pull/90030) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 引入生存时间 (TTL) DROP 合并类型，并且在此类合并后，不再更新下一次删除 TTL 合并的计划。[#90077](https://github.com/ClickHouse/ClickHouse/pull/90077) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 在清理 S3Queue 时，为 RemoveRecursive Keeper 请求使用更低的节点限制。[#90201](https://github.com/ClickHouse/ClickHouse/pull/90201) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 让 `SYSTEM FLUSH LOGS` 查询即使在日志为空时也会等待表创建完成。[#89408](https://github.com/ClickHouse/ClickHouse/pull/89408) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了以下情况下 `rows_before_limit_at_least` 不正确的问题：分布式合并聚合涉及多个远程分片，或者存在 IN 子查询。此修复解决了 [#63280](https://github.com/ClickHouse/ClickHouse/issues/63280)。[#63511](https://github.com/ClickHouse/ClickHouse/pull/63511) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在 `INSERT INTO ... SELECT` 查询后显示 `0 rows in set` 的问题。关闭 [#47800](https://github.com/ClickHouse/ClickHouse/issues/47800)。[#79462](https://github.com/ClickHouse/ClickHouse/pull/79462) ([Engel Danila](https://github.com/aaaengel)).

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复了 `multiIf` 在常量参数和短路求值场景下的问题。关闭 [#72714](https://github.com/ClickHouse/ClickHouse/issues/72714)。[#84546](https://github.com/ClickHouse/ClickHouse/pull/84546) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了查询带有子查询约束的表时出现的逻辑错误。解决了 [#84190](https://github.com/ClickHouse/ClickHouse/issues/84190)。[#85575](https://github.com/ClickHouse/ClickHouse/pull/85575) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复了一个与使用包含问号的 URI 的特殊查询有关的 bug。[#85663](https://github.com/ClickHouse/ClickHouse/pull/85663) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 `EXPLAIN indexes = 1` 输出中有时会缺少列的问题。解决了 [#86696](https://github.com/ClickHouse/ClickHouse/issues/86696)。[#87083](https://github.com/ClickHouse/ClickHouse/pull/87083) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了可能出现的错误“Cannot add subcolumn with parallel replicas”。已关闭 [#84888](https://github.com/ClickHouse/ClickHouse/issues/84888)。[#87514](https://github.com/ClickHouse/ClickHouse/pull/87514) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 parquet writer 中，以正确的格式输出 `created_by` 字符串，例如 `ClickHouse version 25.10.1 (build 5b1dfb14925db8901a4e9202cd5d63c11ecfbb9f)`，而不是 `ClickHouse v25.9.1.1-testing`。修复了 Parquet reader 与旧版 parquet-mr 写出的有问题文件之间的兼容性问题。[#87735](https://github.com/ClickHouse/ClickHouse/pull/87735) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 phi-squared 计算问题，避免 `cramersV`、`cramersVBiasCorrected`、`theilsU` 和 `contingency` 返回错误结果。[#87831](https://github.com/ClickHouse/ClickHouse/pull/87831) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在 JSON 中读取由 Float 和 Bool 混合组成的数组时的问题。此前插入这类数据会导致异常。[#88008](https://github.com/ClickHouse/ClickHouse/pull/88008) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 TCPHandler 中为 QueryState 使用 shared\_ptr，以便在 setProgressCallback、setFileProgressCallback 和 setBlockMarshallingCallback 中检测状态是否已失效。[#88201](https://github.com/ClickHouse/ClickHouse/pull/88201) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复在 query\_plan\_optimize\_join\_order\_limit > 1 时 cross join 重排中的逻辑错误，关闭 [#89409](https://github.com/ClickHouse/ClickHouse/issues/89409)。[#88286](https://github.com/ClickHouse/ClickHouse/pull/88286) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 [#88426](https://github.com/ClickHouse/ClickHouse/issues/88426)：1. 不再允许在 Alias 中显式定义列，列会自动从目标表加载。这样可确保别名始终与目标表的 schema 一致。2. 代理 IStorage 的更多方法。[#88552](https://github.com/ClickHouse/ClickHouse/pull/88552) ([Kai Zhu](https://github.com/nauu)) 。
* 恢复后，Replicated 数据库的副本可能会长时间卡住，并持续打印类似 `Failed to marked query-0004647339 as finished (finished=No node, synced=No node)` 的消息；该问题已修复。[#88671](https://github.com/ClickHouse/ClickHouse/pull/88671) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 修复新的 analyzer 处理子查询时可能出现的 "Context has expired" 问题。[#88694](https://github.com/ClickHouse/ClickHouse/pull/88694) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在 input\_format\_parquet\_local\_file\_min\_bytes\_for\_seek 设置为 0 时，Parquet 读取器发生段错误的问题。解决了 [#78456](https://github.com/ClickHouse/ClickHouse/issues/78456)。[#88784](https://github.com/ClickHouse/ClickHouse/pull/88784) ([Animesh](https://github.com/anibilthare)) 。
* 修复了当 PK 为逆序时 `min(PK)`/`max(PK)` 结果错误的问题。此修复解决了 [#83619](https://github.com/ClickHouse/ClickHouse/issues/83619)。[#88796](https://github.com/ClickHouse/ClickHouse/pull/88796) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了对内部表执行 DROP 时，设置 max\_table\_size\_to\_drop 和 max\_partition\_size\_to\_drop 的大小限制未能正确生效的问题。[#88812](https://github.com/ClickHouse/ClickHouse/pull/88812) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复 `top_k` 在仅传入单个参数调用时未遵循阈值参数的问题。关闭 [#88757](https://github.com/ClickHouse/ClickHouse/issues/88757)。[#88867](https://github.com/ClickHouse/ClickHouse/pull/88867) ([Manuel](https://github.com/raimannma)).
* 需要通过 SSL 连接的 ArrowFlight 端点源 (例如位于 AWS ALB 后方的端点源) 现在已能正确请求特定数据集。[#88868](https://github.com/ClickHouse/ClickHouse/pull/88868) ([alex-shchetkov](https://github.com/alex-shchetkov)) 。
* 修复了对非物化 Nested(Tuple(...)) (通过 ALTER 添加) 的处理问题。修复 [#83133](https://github.com/ClickHouse/ClickHouse/issues/83133)。[#88879](https://github.com/ClickHouse/ClickHouse/pull/88879) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了函数 `reverseUTF8` 中的一个错误。在之前的版本中，它会错误地反转长度为 4 的 UTF-8 码点的字节序。这解决了 [#88913](https://github.com/ClickHouse/ClickHouse/issues/88913)。[#88914](https://github.com/ClickHouse/ClickHouse/pull/88914) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `icebergS3Cluster` 协议。现在，iceberg cluster function 已开始支持 schema 演进、位置删除和相等删除。解决了 [#88287](https://github.com/ClickHouse/ClickHouse/issues/88287)。[#88919](https://github.com/ClickHouse/ClickHouse/pull/88919) ([Yang Jiang](https://github.com/Ted-Jiang)) 。
* 对于在分布式表上使用并行副本的查询，禁用 parallel\_replicas\_support\_projection。关闭了 [#88899](https://github.com/ClickHouse/ClickHouse/issues/88899)。[#88922](https://github.com/ClickHouse/ClickHouse/pull/88922) ([zoomxi](https://github.com/zoomxi)).
* 在内部类型转换中传递上下文。修复了多个类型转换设置未能传递的问题。关闭 [#88873](https://github.com/ClickHouse/ClickHouse/issues/88873)。关闭 [#78025](https://github.com/ClickHouse/ClickHouse/issues/78025)。[#88929](https://github.com/ClickHouse/ClickHouse/pull/88929) ([Manuel](https://github.com/raimannma)).
* 修复了 `file()` 函数中根据通配符判断文件格式的问题。解决了 [#88920](https://github.com/ClickHouse/ClickHouse/issues/88920)。[#88947](https://github.com/ClickHouse/ClickHouse/pull/88947) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在使用 SQL SECURITY DEFINER 创建视图时，不检查 `SET DEFINER <current_user>:definer` 的访问权限。[#88968](https://github.com/ClickHouse/ClickHouse/pull/88968) ([pufit](https://github.com/pufit)).
* 修复了 `L2DistanceTransposed(vec1, vec2, p)` 中的 `LOGICAL_ERROR`：当 `p` 为 `Nullable` 时，用于部分 `QBit` 读取的优化错误地将返回类型中的 `Nullable` 移除了。[#88974](https://github.com/ClickHouse/ClickHouse/pull/88974) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了由未知 catalog 类型导致的崩溃。解决了 [#88819](https://github.com/ClickHouse/ClickHouse/issues/88819)。[#88987](https://github.com/ClickHouse/ClickHouse/pull/88987) ([scanhex12](https://github.com/scanhex12)) 。
* 此项修复已关闭 [#88081](https://github.com/ClickHouse/ClickHouse/issues/88081)。[#88988](https://github.com/ClickHouse/ClickHouse/pull/88988) ([scanhex12](https://github.com/scanhex12)) 。
* 修复了分析跳过索引时的性能下降问题。[#89004](https://github.com/ClickHouse/ClickHouse/pull/89004) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复具有不存在角色的用户尝试执行 clusterAllReplicas 时出现的 ACCESS\_ENTITY\_NOT\_FOUND 错误。解决了 [#87670](https://github.com/ClickHouse/ClickHouse/issues/87670)。[#89068](https://github.com/ClickHouse/ClickHouse/pull/89068) ([pufit](https://github.com/pufit))。
* 修复 CHECK 约束处理稀疏列时的问题。关闭 [#88637](https://github.com/ClickHouse/ClickHouse/issues/88637)。[#89076](https://github.com/ClickHouse/ClickHouse/pull/89076) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复了 MergeTreeReaderTextIndex 在填充虚拟列时行数统计错误的问题，该问题会导致因 LOGICAL\_ERROR 发生崩溃。[#89095](https://github.com/ClickHouse/ClickHouse/pull/89095) ([Peng Jian](https://github.com/fastio)) 。
* 防止在合并准备过程中发生异常时出现生存时间 (TTL) 合并计数器泄漏。修复了 [#89019](https://github.com/ClickHouse/ClickHouse/issues/89019)。[#89127](https://github.com/ClickHouse/ClickHouse/pull/89127) ([save-my-heart](https://github.com/save-my-heart))。
* 修复了 base32/base58 编码和解码操作所需缓冲区大小的计算错误。[#89133](https://github.com/ClickHouse/ClickHouse/pull/89133) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了 Distributed 中因关闭与后台 INSERT 之间的竞争条件而导致的释放后使用问题。解决了 [#88640](https://github.com/ClickHouse/ClickHouse/issues/88640)。[#89136](https://github.com/ClickHouse/ClickHouse/pull/89136) ([Azat Khuzhin](https://github.com/azat)) 。
* 避免在解析 Parquet 时因异常对象可变而产生潜在的数据竞争。修复了 [#88385](https://github.com/ClickHouse/ClickHouse/issues/88385)。[#89174](https://github.com/ClickHouse/ClickHouse/pull/89174) ([Azat Khuzhin](https://github.com/azat)).
* 可刷新materialized view：修复了一个罕见的服务器崩溃问题，该问题会在刷新期间源表被完全删除时触发。[#89203](https://github.com/ClickHouse/ClickHouse/pull/89203) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 在 HTTP 接口中，如果在压缩 stream 中途发送 error，会刷新缓冲区。[#89256](https://github.com/ClickHouse/ClickHouse/pull/89256) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 避免将查询脱敏规则误用于 DDL 语句。[#89272](https://github.com/ClickHouse/ClickHouse/pull/89272) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 修复了 MergeTreeReaderTextIndex 在填充虚拟列时行数计数错误的问题，该问题会导致因 LOGICAL\_ERROR 发生崩溃。重新打开 [#89095](https://github.com/ClickHouse/ClickHouse/issues/89095)。[#89303](https://github.com/ClickHouse/ClickHouse/pull/89303) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复了 Statistics countmin 不支持估算 LowCardinality(Nullable(String)) 数据类型并触发 LOGICAL\_ERROR 的问题。[#89343](https://github.com/ClickHouse/ClickHouse/pull/89343) ([Han Fei](https://github.com/hanfei1991)).
* 在 IN 函数中，如果主键列类型与 IN 函数右侧的列类型不同，可能会导致崩溃或未定义行为。示例：SELECT string\_column, int\_column FROM test\_table WHERE (string\_column, int\_column) IN (SELECT '5', 'not a number')。当选中的行数较多，且其中包含类型不兼容的行时，就可能出现此问题。 [#89367](https://github.com/ClickHouse/ClickHouse/pull/89367) ([Ilya Golshtein](https://github.com/ilejn)).
* 修复 `countIf(*)` 参数被截断的问题。关闭 [#89372](https://github.com/ClickHouse/ClickHouse/issues/89372)。[#89373](https://github.com/ClickHouse/ClickHouse/pull/89373) ([Manuel](https://github.com/raimannma)) 。
* 避免丢失变更统计信息中的未压缩校验和。[#89381](https://github.com/ClickHouse/ClickHouse/pull/89381) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `L2DistanceTransposed(vec1, vec2, p)` 中的 LOGICAL\_ERROR：当 p 为 `LowCardinality(Nullable(T))` 时，针对部分 QBit 读取的优化错误地从返回类型中移除了 Nullable。解决了 [#88362](https://github.com/ClickHouse/ClickHouse/issues/88362)。[#89397](https://github.com/ClickHouse/ClickHouse/pull/89397) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了加载采用错误稀疏序列化的表时出现的问题，具体是针对 Tuple 本身的情况 (由较旧版本的 ClickHouse 写入) 。[#89405](https://github.com/ClickHouse/ClickHouse/pull/89405) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在使用 `deduplicate_merge_projection_mode='ignore'` 时，对因生存时间 (TTL) 被清空但投影仍非空的 parts 的错误 merge 处理。解决了 [#89430](https://github.com/ClickHouse/ClickHouse/issues/89430)。[#89458](https://github.com/ClickHouse/ClickHouse/pull/89458) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了 `full&#95;sorting&#95;merge` join 在存在重复列时的逻辑错误。解决了 [#86957](https://github.com/ClickHouse/ClickHouse/issues/86957)。[#89495](https://github.com/ClickHouse/ClickHouse/pull/89495) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了 Keeper 启动时在轮转过程中因更新日志未正确重命名而导致无法读取更新日志的问题。[#89496](https://github.com/ClickHouse/ClickHouse/pull/89496) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在使用 OR 条件且右侧表键唯一时，JOIN 结果不正确的问题。解决了 [#89391](https://github.com/ClickHouse/ClickHouse/issues/89391)。[#89512](https://github.com/ClickHouse/ClickHouse/pull/89512) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 analyzer 与 PK IN (子查询) 一起使用时可能出现的 "Context has expired" 问题 (v2) 。修复了 [#89433](https://github.com/ClickHouse/ClickHouse/issues/89433)。[#89527](https://github.com/ClickHouse/ClickHouse/pull/89527) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 MaterializedPostgreSQL 在处理配置了大写列名的表复制时的问题。解决了 [#72363](https://github.com/ClickHouse/ClickHouse/issues/72363)。[#89530](https://github.com/ClickHouse/ClickHouse/pull/89530) ([Danylo Osipchuk](https://github.com/Lenivaya)) 。
* 修复了以下情况下的崩溃问题：聚合函数的状态中包含 `LowCardinality(String)` 列的序列化值。[#89550](https://github.com/ClickHouse/ClickHouse/pull/89550) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在启用 `enable_lazy_columns_replication` 设置的情况下，在 JOIN 右侧使用 `ARRAY JOIN` 时发生崩溃的问题。[#89551](https://github.com/ClickHouse/ClickHouse/pull/89551) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 query\_plan\_convert\_join\_to\_in 中的逻辑错误。解决了 [#89066](https://github.com/ClickHouse/ClickHouse/issues/89066)。[#89554](https://github.com/ClickHouse/ClickHouse/pull/89554) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了统计信息估算器中的一个异常：当尝试估算列类型与常量类型不匹配且无法转换的条件时，会触发该异常。[#89596](https://github.com/ClickHouse/ClickHouse/pull/89596) ([Han Fei](https://github.com/hanfei1991)) 。
* 仅对受支持的 JOIN 算法 (即哈希 JOIN) 添加运行时过滤器。只有在 JOIN 算法先完整读取右侧、再读取左侧时，才能构建过滤器；例如，FullSortingMergeJoin 会同时读取两侧。修复了 [#89220](https://github.com/ClickHouse/ClickHouse/issues/89220)。[#89652](https://github.com/ClickHouse/ClickHouse/pull/89652) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复了 `hasAnyTokens`、`hasAllTokens` 和 `tokens` 函数在使用 `sparseGrams` 分词器时并发执行的问题。解决了 [#89605](https://github.com/ClickHouse/ClickHouse/issues/89605)。[#89665](https://github.com/ClickHouse/ClickHouse/pull/89665) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 修复了在某些情况下由 join 运行时过滤器导致的逻辑错误/崩溃。修复 [#89062](https://github.com/ClickHouse/ClickHouse/issues/89062)。[#89666](https://github.com/ClickHouse/ClickHouse/pull/89666) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复了在启用 `enable_lazy_columns_replication` 时，对 Map 列执行 ARRAY JOIN 可能导致的逻辑错误。关闭 [#89705](https://github.com/ClickHouse/ClickHouse/issues/89705)。[#89717](https://github.com/ClickHouse/ClickHouse/pull/89717) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 避免在取消期间执行远程查询时，因断开连接后仍从远程服务器读取而导致崩溃。解决了 [#89468](https://github.com/ClickHouse/ClickHouse/issues/89468)。[#89740](https://github.com/ClickHouse/ClickHouse/pull/89740) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了投影索引读取路径中的竞态条件。解决了 [#89497](https://github.com/ClickHouse/ClickHouse/issues/89497)。[#89762](https://github.com/ClickHouse/ClickHouse/pull/89762) ([Peng Jian](https://github.com/fastio)) 。
* 修复了投影索引读取中的一个 bug，该问题可能导致竞态条件。解决了 [#89497](https://github.com/ClickHouse/ClickHouse/issues/89497)。[#89775](https://github.com/ClickHouse/ClickHouse/pull/89775) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了 Paimon 表函数对无分区表的处理问题。解决了 [#89690](https://github.com/ClickHouse/ClickHouse/issues/89690)。[#89793](https://github.com/ClickHouse/ClickHouse/pull/89793) ([JIaQi](https://github.com/JiaQiTang98)) 。
* 修复了在高级 JSON 共享数据序列化中读取路径及其子列时可能出现的逻辑错误。关闭 [#89805](https://github.com/ClickHouse/ClickHouse/issues/89805)。[#89819](https://github.com/ClickHouse/ClickHouse/pull/89819) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复数据类型二进制反序列化过程中可能发生的栈溢出问题。关闭 [#88710](https://github.com/ClickHouse/ClickHouse/issues/88710)。[#89822](https://github.com/ClickHouse/ClickHouse/pull/89822) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `IN` 函数中空元组导致的逻辑错误。关闭 [#88343](https://github.com/ClickHouse/ClickHouse/issues/88343)。[#89850](https://github.com/ClickHouse/ClickHouse/pull/89850) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 为保持兼容性，在旧版 analyzer 中，无论 `optimize_injective_functions_in_group_by` 如何设置，都会从 `GROUP BY` 中移除单射函数。已解决 [#89854](https://github.com/ClickHouse/ClickHouse/issues/89854)。[#89870](https://github.com/ClickHouse/ClickHouse/pull/89870) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 如果合并因内存限制等原因中断，merge mutate 后台执行器会在不加锁的情况下对合并任务调用 `cancel`；但在这种情况下，已部分创建的结果分片不会被移除 (因为它尚未完成，并且在此阶段还不可见) 。随后，合并任务会被销毁，从而触发结果分片的销毁。这样会回滚磁盘事务，并导致数据从 S3 中被删除。最后，这一垃圾清理操作是在持有 merge mutate 后台执行器锁的情况下执行的。[#89875](https://github.com/ClickHouse/ClickHouse/pull/89875) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 修复了 `reverse` 和 `CAST` 函数中空元组引发的逻辑错误。关闭 [#89137](https://github.com/ClickHouse/ClickHouse/issues/89137)。[#89908](https://github.com/ClickHouse/ClickHouse/pull/89908) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 现在，ClickHouse 默认会在 `SHOW DATABASES` 查询结果中显示数据湖 catalog 数据库。[#89914](https://github.com/ClickHouse/ClickHouse/pull/89914) ([alesapin](https://github.com/alesapin)) 。
* 修复了在 GCS 上使用原生复制进行备份的问题。由于客户端克隆不正确，GCS 原生复制始终会失败，转而采用效率较低的手动读写数据方式。[#89923](https://github.com/ClickHouse/ClickHouse/pull/89923) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了 `base32Encode` 的缓冲区大小计算问题。对长度小于 5 的字符串列执行 `base32Encode` 计算时，可能会导致崩溃。解决了 [#89911](https://github.com/ClickHouse/ClickHouse/issues/89911)。[#89929](https://github.com/ClickHouse/ClickHouse/pull/89929) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复 `SHOW COLUMNS` 和 `SHOW FUNCTIONS` 查询中的错误转义。[#89942](https://github.com/ClickHouse/ClickHouse/pull/89942) ([alesapin](https://github.com/alesapin)).
* 修复了 MongoDB 引擎中用户名包含 '@' 字符时的 URL 验证问题。此前，由于编码不当，带有 '@' 的用户名会引发错误。[#89970](https://github.com/ClickHouse/ClickHouse/pull/89970) ([Kai Zhu](https://github.com/nauu)).
* 已在 [#90592](https://github.com/ClickHouse/ClickHouse/issues/90592) 中回移：修复了远程查询中在 `IN` 内使用 `ARRAY JOIN` 且启用 `enable_lazy_columns_replication` 设置时可能发生的崩溃问题。解决了 [#90361](https://github.com/ClickHouse/ClickHouse/issues/90361)。[#89997](https://github.com/ClickHouse/ClickHouse/pull/89997) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 已在 [#90448](https://github.com/ClickHouse/ClickHouse/issues/90448) 中回移：修复了在某些情况下，从文本格式中的 String 推断出错误 DateTime64 值的问题。解决了 [#89368](https://github.com/ClickHouse/ClickHouse/issues/89368)。[#90013](https://github.com/ClickHouse/ClickHouse/pull/90013) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 `BSONEachRow` 和 `MsgPack` 中由空 Tuple 列导致的逻辑错误。关闭 [#89814](https://github.com/ClickHouse/ClickHouse/issues/89814)。关闭 [#71536](https://github.com/ClickHouse/ClickHouse/issues/71536)。[#90018](https://github.com/ClickHouse/ClickHouse/pull/90018) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 已在 [#90457](https://github.com/ClickHouse/ClickHouse/issues/90457) 中回移：从聚合状态和其他来源反序列化数据时进行大小检查。[#90031](https://github.com/ClickHouse/ClickHouse/pull/90031) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复在包含重复列的 JOIN 中可能出现的 'Invalid number of rows in Chunk' 错误。解决了 [#89411](https://github.com/ClickHouse/ClickHouse/issues/89411)。[#90053](https://github.com/ClickHouse/ClickHouse/pull/90053) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 已在 [#90588](https://github.com/ClickHouse/ClickHouse/issues/90588) 中回移：修复了在启用 `enable_lazy_columns_replication` 设置并使用 `ARRAY JOIN` 进行插入时，可能出现的错误 `Column with Array type is not represented by ColumnArray column: Replicated`。[#90066](https://github.com/ClickHouse/ClickHouse/pull/90066) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 允许 user\_files 中包含以点开头的文件。修复了 [#89662](https://github.com/ClickHouse/ClickHouse/issues/89662)。[#90079](https://github.com/ClickHouse/ClickHouse/pull/90079) ([Raúl Marín](https://github.com/Algunenano)) 。
* 已在 [#90647](https://github.com/ClickHouse/ClickHouse/issues/90647) 中回移：修复了在使用较大步长时，`numbers` 系统表中的逻辑错误和取模 bug。关闭 [#83398](https://github.com/ClickHouse/ClickHouse/issues/83398)。[#90123](https://github.com/ClickHouse/ClickHouse/pull/90123) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复字典参数解析中的整数溢出问题。关闭 [#78506](https://github.com/ClickHouse/ClickHouse/issues/78506)。[#90171](https://github.com/ClickHouse/ClickHouse/pull/90171) ([Raúl Marín](https://github.com/Algunenano)) 。
* 已在 [#90468](https://github.com/ClickHouse/ClickHouse/issues/90468) 中回移：修复了 hive 分区在 25.8 中的兼容性问题，该问题会导致无法平滑升级 (修复了升级期间出现的错误 `All hive partitioning columns must be present in the schema`) 。[#90202](https://github.com/ClickHouse/ClickHouse/pull/90202) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在启用查询条件缓存的情况下，`SELECT` 查询在轻量级更新后可能返回错误结果的问题。修复了 [#90176](https://github.com/ClickHouse/ClickHouse/issues/90176)。修复了 [#90054](https://github.com/ClickHouse/ClickHouse/issues/90054)。[#90204](https://github.com/ClickHouse/ClickHouse/pull/90204) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了 StorageDistributed 在解析格式错误的分片目录名时发生崩溃的问题。 [#90243](https://github.com/ClickHouse/ClickHouse/pull/90243) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* 在 `LogicalExpressionOptimizerPass` 中处理从字符串到整数或布尔值的隐式转换问题。解决了 [#89803](https://github.com/ClickHouse/ClickHouse/issues/89803)。[#90245](https://github.com/ClickHouse/ClickHouse/pull/90245) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 修复了表定义中某些跳过索引格式错误的问题，该问题会导致 `METADATA_MISMATCH`，并使 Replicated 数据库中无法创建新副本。[#90251](https://github.com/ClickHouse/ClickHouse/pull/90251) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 已在 [#90381](https://github.com/ClickHouse/ClickHouse/issues/90381) 中回移：修复了 MergeTreeReaderIndex 中的行数不匹配问题，该问题会在该分片仅有的行数少于 index\_granularity 时出现。解决了 [#89691](https://github.com/ClickHouse/ClickHouse/issues/89691)。[#90254](https://github.com/ClickHouse/ClickHouse/pull/90254) ([Peng Jian](https://github.com/fastio)).
* 已在 [#90608](https://github.com/ClickHouse/ClickHouse/issues/90608) 中回移：修复了在 compact parts 中从 JSON 读取子列时的一个 bug，该问题可能导致 `CANNOT_READ_ALL_DATA` 错误。解决了 [#90264](https://github.com/ClickHouse/ClickHouse/issues/90264)。[#90302](https://github.com/ClickHouse/ClickHouse/pull/90302) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `trim`、`ltrim`、`rtrim` 函数在使用两个参数时无法正常工作的问题。关闭 [#90170](https://github.com/ClickHouse/ClickHouse/issues/90170)。[#90305](https://github.com/ClickHouse/ClickHouse/pull/90305) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 已在 [#90625](https://github.com/ClickHouse/ClickHouse/issues/90625) 中回移：修复在 `index&#95;granularity&#95;bytes=0` 时，对不存在的 JSON 路径使用 prewhere 可能导致的逻辑错误。解决了 [#86924](https://github.com/ClickHouse/ClickHouse/issues/86924)。[#90375](https://github.com/ClickHouse/ClickHouse/pull/90375) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 已在 [#90484](https://github.com/ClickHouse/ClickHouse/issues/90484) 中回移：修复了 `L2DistanceTransposed` 中的一个 bug，该 bug 会在 `precision` 参数超出有效范围时引发崩溃。关闭 [#90401](https://github.com/ClickHouse/ClickHouse/issues/90401)。[#90405](https://github.com/ClickHouse/ClickHouse/pull/90405) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 已在 [#90577](https://github.com/ClickHouse/ClickHouse/issues/90577) 中回移：修复了在使用数组引用向量 (默认为 `Array(Float64))`) 时，若配合元素类型非 `Float64` (`Float32`、`BFloat16`) 的 `QBit` 列，`L2DistanceTransposed` 会出现距离计算错误的问题。该函数现在会自动将引用向量转换为与 `QBit` 元素类型相匹配的类型。解决了 [#89976](https://github.com/ClickHouse/ClickHouse/issues/89976)。[#90485](https://github.com/ClickHouse/ClickHouse/pull/90485) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 已在 [#90601](https://github.com/ClickHouse/ClickHouse/issues/90601) 中回移：修复了 `equals` 函数中一种罕见情况下导致的逻辑错误。关闭 [#88142](https://github.com/ClickHouse/ClickHouse/issues/88142)。[#90557](https://github.com/ClickHouse/ClickHouse/pull/90557) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复 `CoalescingMergeTree` 在 `Tuple` 类型上的问题。[#88828](https://github.com/ClickHouse/ClickHouse/pull/88828) ([scanhex12](https://github.com/scanhex12)) 。

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

* 修复在 Docker 中运行 ClickHouse，使用 initdb SQL 脚本并重写 TCP 端口配置时出现的 `Connection refused` 错误。[#88042](https://github.com/ClickHouse/ClickHouse/pull/88042) ([Grigorii](https://github.com/GSokol)).
* 实验性支持 e2k 作为 ClickHouse 的新平台。[#90159](https://github.com/ClickHouse/ClickHouse/pull/90159) ([Ramil Sattarov](https://github.com/r-a-sattarov)).
* 移除 CMake 中剩余的 `FindPackage` 用法。构建不应依赖系统软件包。[#89380](https://github.com/ClickHouse/ClickHouse/pull/89380) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 CMake 配置过程中在构建中使用编译器缓存 (例如 `protoc`) 。[#89613](https://github.com/ClickHouse/ClickHouse/pull/89613) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 使用 FreeBSD 13.4 的 sysroot。[#89617](https://github.com/ClickHouse/ClickHouse/pull/89617) ([Konstantin Bogdanov](https://github.com/thevar1able)).

<div id="2510">
  ### ClickHouse 发行版 25.10，2025-10-31
</div>

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

* 将默认的 `schema_inference_make_columns_nullable` 设置改为遵循 Parquet/ORC/Arrow 元数据中的列 `Nullable` 信息，而不是将所有列都设为 Nullable。文本格式无变化。[#71499](https://github.com/ClickHouse/ClickHouse/pull/71499) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 查询结果缓存将忽略 `log_comment` 设置，因此仅修改查询的 `log_comment` 将不再导致缓存未命中。虽然用户有较小的可能性会通过变更 `log_comment` 来有意划分缓存，但此次变更会改变这种行为，因此属于向后不兼容。请改用设置 `query_cache_tag` 来实现此目的。[#79878](https://github.com/ClickHouse/ClickHouse/pull/79878) ([filimonov](https://github.com/filimonov)).
* 在之前的版本中，对于与运算符实现函数同名的表函数，相关查询的格式化结果并不一致。关闭 [#81601](https://github.com/ClickHouse/ClickHouse/issues/81601)。关闭 [#81977](https://github.com/ClickHouse/ClickHouse/issues/81977)。关闭 [#82834](https://github.com/ClickHouse/ClickHouse/issues/82834)。关闭 [#82835](https://github.com/ClickHouse/ClickHouse/issues/82835)。`EXPLAIN SYNTAX` 查询将不再始终格式化运算符——新行为更符合解释语法这一用途。对于 `clickhouse-format`、`formatQuery` 及类似工具，如果查询中以函数形式使用了这些内容，则不会将函数格式化为运算符。[#82825](https://github.com/ClickHouse/ClickHouse/pull/82825) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 禁止在 `JOIN` 键中使用 `Dynamic` 类型。在将 `Dynamic` 类型的值与非 `Dynamic` 类型比较时，可能会产生意外结果。更好的做法是将 `Dynamic` 列 CAST 为所需类型。[#86358](https://github.com/ClickHouse/ClickHouse/pull/86358) ([Pavel Kruglov](https://github.com/Avogar)).
* `storage_metadata_write_full_object_key` server 选项现已默认启用，且目前无法关闭。这是一项向后兼容的变更，仅供您知悉。此变更仅与 25.x 版本前向兼容。这意味着，如果您需要回滚新版本，则只能降级到某个 25.x 版本。[#87335](https://github.com/ClickHouse/ClickHouse/pull/87335) ([Sema Checherinda](https://github.com/CheSema)).
* 将 `replicated_deduplication_window_seconds` 从一周缩短至一小时，以便在插入速率较低时减少 zookeeper 中存储的 znode 数量。[#87414](https://github.com/ClickHouse/ClickHouse/pull/87414) ([Sema Checherinda](https://github.com/CheSema)) 。
* 将设置 `query_plan_use_new_logical_join_step` 更名为 `query_plan_use_logical_join_step`。[#87679](https://github.com/ClickHouse/ClickHouse/pull/87679) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 新语法使文本索引的分词器参数能够以更灵活的方式表达。[#87997](https://github.com/ClickHouse/ClickHouse/pull/87997) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 将函数 `searchAny` 和 `searchAll` 重命名为 `hasAnyTokens` 和 `hasAllTokens`，以更好地与现有函数 `hasToken` 保持一致。[#88109](https://github.com/ClickHouse/ClickHouse/pull/88109) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 从文件系统缓存中移除 `cache_hits_threshold`。该功能是在我们有 SLRU 缓存策略之前由外部贡献者添加的，如今既然已经有了 SLRU，就没必要再同时支持两者。[#88344](https://github.com/ClickHouse/ClickHouse/pull/88344) ([Kseniia Sumarokova](https://github.com/kssenii)).
* `min_free_disk_ratio_to_perform_insert` 和 `min_free_disk_bytes_to_perform_insert` 这两个设置的工作方式有两处小改动：- 使用未预留字节数而不是可用字节数来判断是否应拒绝 insert。如果为后台 merges 和 mutations 预留的空间相对于已配置阈值较小，这一点可能并不关键，但这样似乎更合理。- 不要将这些设置应用于系统表。原因是我们仍然希望像 `query_log` 这样的表能够继续更新。这对调试很有帮助。写入系统表的数据量通常远小于实际数据，因此在设置了合理的 `min_free_disk_ratio_to_perform_insert` 阈值时，它们通常可以继续运行更长时间。[#88468](https://github.com/ClickHouse/ClickHouse/pull/88468) ([c-end](https://github.com/c-end)).
* 为 Keeper 内部复制启用异步模式。Keeper 将保持与之前相同的行为，同时可能提升性能。如果你要从早于 23.9 的版本升级，需要先升级到 23.9+，再升级到 25.10+。你也可以在升级前将 `keeper_server.coordination_settings.async_replication` 设为 0，并在升级完成后再启用它。 [#88515](https://github.com/ClickHouse/ClickHouse/pull/88515) ([Antonio Andelic](https://github.com/antonio2368)).

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

* 新增了对负 `LIMIT` 和负 `OFFSET` 的支持。修复了 [#28913](https://github.com/ClickHouse/ClickHouse/issues/28913)。[#88411](https://github.com/ClickHouse/ClickHouse/pull/88411) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* `Alias` 引擎会创建一个指向另一张表的代理。所有读写操作都会转发到目标表，而别名本身不存储任何数据，只保留对目标表的引用。[#87965](https://github.com/ClickHouse/ClickHouse/pull/87965) ([Kai Zhu](https://github.com/nauu)).
* 现已全面支持运算符 `IS NOT DISTINCT FROM` (`<=>`)。[#88155](https://github.com/ClickHouse/ClickHouse/pull/88155) ([simonmichal](https://github.com/simonmichal)) 。
* 新增了在 `MergeTree` 表中为所有适用列自动创建统计信息的功能。新增了表级设置 `auto_statistics_types`，用于存储要创建的统计信息类型，以逗号分隔 (例如 `auto_statistics_types = 'minmax, uniq, countmin'`) 。[#87241](https://github.com/ClickHouse/ClickHouse/pull/87241) ([Anton Popov](https://github.com/CurtizJ)) 。
* 新增了一个用于文本的 bloom filter 索引 `sparse_gram`。 [#79985](https://github.com/ClickHouse/ClickHouse/pull/79985) ([scanhex12](https://github.com/scanhex12)) 。
* 新增了一个 `conv` 函数，用于在不同进制之间转换数字，目前支持 `2-36` 进制。[#83058](https://github.com/ClickHouse/ClickHouse/pull/83058) ([hp](https://github.com/hp77-creator)).
* 新增了对 `LIMIT BY ALL` 语法的支持。与 `GROUP BY ALL` 和 `ORDER BY ALL` 类似，`LIMIT BY ALL` 会自动展开，将 SELECT 子句中的所有非聚合表达式用作 LIMIT BY 键。例如，`SELECT id, name, count(*) FROM table GROUP BY id LIMIT 1 BY ALL` 等同于 `SELECT id, name, count(*) FROM table GROUP BY id LIMIT 1 BY id, name`。当你希望按所有已选择的非聚合列进行限制，而不必显式列出它们时，这项功能可以简化查询。关闭 [#59152](https://github.com/ClickHouse/ClickHouse/issues/59152)。[#84079](https://github.com/ClickHouse/ClickHouse/pull/84079) ([Surya Kant Ranjan](https://github.com/iit2009046)) 。
* 新增了在 ClickHouse 中查询 Apache Paimon 的支持。该集成将使 ClickHouse 用户能够直接访问 Paimon 的数据湖存储。[#84423](https://github.com/ClickHouse/ClickHouse/pull/84423) ([JIaQi](https://github.com/JiaQiTang98)).
* 新增了 `studentTTestOneSample` 聚合函数。[#85436](https://github.com/ClickHouse/ClickHouse/pull/85436) ([Dylan](https://github.com/DylanBlakemore)) 。
* 聚合函数 `quantilePrometheusHistogram` 将直方图桶的上界和累积值作为参数，并在分位数位置所在桶的上下界之间进行线性插值。其行为与经典直方图上的 PromQL `histogram_quantile` 函数类似。[#86294](https://github.com/ClickHouse/ClickHouse/pull/86294) ([Stephen Chi](https://github.com/stephchi0)) 。
* 新增一个用于 Delta Lake 元数据文件的系统表。[#87263](https://github.com/ClickHouse/ClickHouse/pull/87263) ([scanhex12](https://github.com/scanhex12)) 。
* 新增 `ALTER TABLE REWRITE PARTS` —— 使用所有新设置从头重写表的 parts (因为某些设置 (如 `use_const_adaptive_granularity`) 只会应用于新的 parts) 。[#87774](https://github.com/ClickHouse/ClickHouse/pull/87774) ([Azat Khuzhin](https://github.com/azat)).
* 添加了 `SYSTEM RECONNECT ZOOKEEPER` 命令，用于强制 ZooKeeper 断开后重新连接 ([https://github.com/ClickHouse/ClickHouse/issues/87317](https://github.com/ClickHouse/ClickHouse/issues/87317)) 。[#87318](https://github.com/ClickHouse/ClickHouse/pull/87318) ([Pradeep Chhetri](https://github.com/chhetripradeep)) 。
* 可通过设置 `max_named_collection_num_to_warn` 和 `max_named_collection_num_to_throw` 来限制命名集合的数量。新增指标 `NamedCollection` 和错误 `TOO_MANY_NAMED_COLLECTIONS`。[#87343](https://github.com/ClickHouse/ClickHouse/pull/87343) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 新增了优化后的 `startsWith` 和 `endsWith` 函数的不区分大小写变体：`startsWithCaseInsensitive`、`endsWithCaseInsensitive`、`startsWithCaseInsensitiveUTF8` 和 `endsWithCaseInsensitiveUTF8`。[#87374](https://github.com/ClickHouse/ClickHouse/pull/87374) ([Guang Zhao](https://github.com/zheguang)) 。
* 新增了一种方式，可通过服务器配置 "resources\_and\_workloads" 部分在 SQL 中提供 `WORKLOAD` 和 `RESOURCE` 定义。 [#87430](https://github.com/ClickHouse/ClickHouse/pull/87430) ([Sergei Trifonov](https://github.com/serxa)) 。
* 新增表设置 `min_level_for_wide_part`，可指定将分片创建为 wide part 所需的最低级别。[#88179](https://github.com/ClickHouse/ClickHouse/pull/88179) ([Christoph Wurm](https://github.com/cwurm)) 。
* 在 Keeper 客户端中为 `cp`-`cpr` 和 `mv`-`mvr` 命令新增递归版本。[#88570](https://github.com/ClickHouse/ClickHouse/pull/88570) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 新增会话设置，可在插入时将指定的跳过索引排除在物化范围之外 (`exclude_materialize_skip_indexes_on_insert`) 。新增 MergeTree 表设置，可在合并期间将指定的跳过索引排除在物化范围之外 (`exclude_materialize_skip_indexes_on_merge`) 。[#87252](https://github.com/ClickHouse/ClickHouse/pull/87252) ([George Larionov](https://github.com/george-larionov)).

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

* 实现了 `QBit` 数据类型，用于以位切片格式存储向量；同时实现了 `L2DistanceTransposed` 函数，可执行近似向量搜索，且可通过参数控制精度与速度之间的权衡。[#87922](https://github.com/ClickHouse/ClickHouse/pull/87922) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* `searchAll` 和 `searchAny` 函数现在也可用于不包含文本列的列；在这种情况下，它们会使用默认分词器。[#87722](https://github.com/ClickHouse/ClickHouse/pull/87722) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。

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

* 在 JOIN 和 ARRAY JOIN 中实现列的惰性复制。避免在某些输出格式中将 Sparse 和 Replicated 等特殊列表示形式转换为普通列，从而避免内存中不必要的数据复制。[#88752](https://github.com/ClickHouse/ClickHouse/pull/88752) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 为 MergeTree 表中的顶层 String 列添加可选的 `.size` 子列序列化，以提升压缩率并实现高效的子列访问。引入新的 MergeTree 设置，用于控制序列化版本，并优化空字符串表达式。 [#82850](https://github.com/ClickHouse/ClickHouse/pull/82850) ([Amos Bird](https://github.com/amosbird)).
* 支持 Iceberg 按顺序读取。[#88454](https://github.com/ClickHouse/ClickHouse/pull/88454) ([scanhex12](https://github.com/scanhex12)) 。
* 通过在运行时基于右子树构建布隆过滤器，并将其传递给左子树的扫描阶段，可以加速某些 JOIN 查询。这对诸如 `SELECT avg(o_totalprice) FROM orders, customer, nation WHERE c_custkey = o_custkey AND c_nationkey=n_nationkey AND n_name = 'FRANCE'` 这样的查询尤其有益。[#84772](https://github.com/ClickHouse/ClickHouse/pull/84772) ([Alexander Gololobov](https://github.com/davenger)) 。
* 通过重构 Query Condition Cache (QCC) 与索引分析的执行顺序及集成方式，查询性能得到了提升。现在会先应用 QCC 过滤，再进行主键和跳过索引分析，从而减少不必要的索引计算。索引分析现已扩展为支持多个范围过滤器，其过滤结果也会回写到 QCC 中。这显著加快了那些执行时间主要耗费在索引分析上的查询——尤其是依赖跳过索引 (例如向量索引或倒排索引) 的查询。[#82380](https://github.com/ClickHouse/ClickHouse/pull/82380) ([Amos Bird](https://github.com/amosbird)).
* 一系列微优化，提升小型查询的速度。[#83096](https://github.com/ClickHouse/ClickHouse/pull/83096) ([Raúl Marín](https://github.com/Algunenano)).
* 在原生协议中压缩日志和 profile events。在拥有 100+ 个副本的集群中，未压缩的 profile events 会占用 1..10 MB/sec 的带宽，而且在较慢的互联网连接下，进度条会很卡顿。此更改关闭了 [#82533](https://github.com/ClickHouse/ClickHouse/issues/82533)。[#83586](https://github.com/ClickHouse/ClickHouse/pull/83586) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使用 [StringZilla](https://github.com/ashvardanian/StringZilla) 库，并在可用时利用 SIMD CPU 指令，以提升区分大小写的字符串搜索性能 (如过滤器等操作，例如 `WHERE URL LIKE '%google%'`) 。[#84161](https://github.com/ClickHouse/ClickHouse/pull/84161) ([Raúl Marín](https://github.com/Algunenano)) 。
* 当表包含 `SimpleAggregateFunction(anyLast)` 类型的列时，优化了从带有 FINAL 的 AggregatingMergeTree 表查询时的内存分配和内存拷贝。[#84428](https://github.com/ClickHouse/ClickHouse/pull/84428) ([Duc Canh Le](https://github.com/canhld94)).
* 提供了析取型 JOIN 谓词下推的处理逻辑。示例：在 TPC-H Q7 中，对于两个表 n1 和 n2 上的条件 `(n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY') OR (n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE')`，我们会为每个表分别提取部分过滤器：对 n1 提取 `n1.n_name = 'FRANCE' OR n1.n_name = 'GERMANY'`，对 n2 提取 `n2.n_name = 'GERMANY' OR n2.n_name = 'FRANCE'`。[#84735](https://github.com/ClickHouse/ClickHouse/pull/84735) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 通过新的默认设置 `optimize_rewrite_like_perfect_affix`，提升了带有前缀或后缀的 `LIKE` 的性能。[#85920](https://github.com/ClickHouse/ClickHouse/pull/85920) ([Guang Zhao](https://github.com/zheguang)) 。
* 修复了在按多个字符串/数值列分组时，因序列化键过大而导致的性能下降问题。这是对 [#83884](https://github.com/ClickHouse/ClickHouse/pull/83884) 的后续修复。[#85924](https://github.com/ClickHouse/ClickHouse/pull/85924) ([李扬](https://github.com/taiyang-li)).
* 新增 `joined_block_split_single_row` 设置，用于降低哈希 JOIN 在每个键对应大量匹配时的内存占用。这样一来，哈希 JOIN 的结果即使对于左表中的单行匹配结果，也可以在匹配过程中进一步分块；当左表中的一行会匹配右表中的成千上万甚至数百万行时，这一点尤其有用。此前，所有匹配结果都必须一次性在内存中物化。这样可以降低峰值内存占用，但可能会增加 CPU 使用量。[#87913](https://github.com/ClickHouse/ClickHouse/pull/87913) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 对 SharedMutex 的改进 (提升大量并发查询时的性能) 。[#87491](https://github.com/ClickHouse/ClickHouse/pull/87491) ([Raúl Marín](https://github.com/Algunenano)) 。
* 提升了为主要包含低频标记的文档构建文本索引的性能。 [#87546](https://github.com/ClickHouse/ClickHouse/pull/87546) ([Anton Popov](https://github.com/CurtizJ)) 。
* 加快 `Field` 析构函数在常见情况下的执行速度 (提升大量小查询场景下的性能) 。[#87631](https://github.com/ClickHouse/ClickHouse/pull/87631) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在 JOIN 优化期间跳过对运行时哈希表统计信息的重新计算 (可提升所有含 JOIN 查询的性能) 。新增了 profile events `JoinOptimizeMicroseconds` 和 `QueryPlanOptimizeMicroseconds`。[#87683](https://github.com/ClickHouse/ClickHouse/pull/87683) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 启用将标记保存到缓存中，并避免 MergeTreeLazy 读取器使用直接 IO。这提升了带有 ORDER BY 且 LIMIT 较小的查询性能。[#87989](https://github.com/ClickHouse/ClickHouse/pull/87989) ([Nikita Taranov](https://github.com/nickitat)) 。
* 对包含 `is_deleted` 列的 `ReplacingMergeTree` 表执行带有 `FINAL` 子句的 SELECT 查询现在更快了，这得益于现有两项优化对并行化的改进：1. 对仅包含单个 `part` 分片的表分区应用 `do_not_merge_across_partitions_select_final` 优化；2. 将表中其他选定范围拆分为 `intersecting / non-intersecting`，只有相交范围才需要经过 FINAL 合并转换。 [#88090](https://github.com/ClickHouse/ClickHouse/pull/88090) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 降低未使用故障注入点时的影响 (即未启用调试时走的默认代码路径) 。[#88196](https://github.com/ClickHouse/ClickHouse/pull/88196) ([Raúl Marín](https://github.com/Algunenano)) 。
* 避免在按 `uuid` 过滤 `system.tables` 时进行全表扫描 (如果你手头只有来自日志或 ZooKeeper 路径的 UUID，这会很有用) 。[#88379](https://github.com/ClickHouse/ClickHouse/pull/88379) ([Azat Khuzhin](https://github.com/azat)) 。
* 优化了函数 `tokens`、`hasAllTokens`、`hasAnyTokens` 的性能。[#88416](https://github.com/ClickHouse/ClickHouse/pull/88416) ([Anton Popov](https://github.com/CurtizJ)) 。
* 将 `AddedColumns::appendFromBlock` 内联，在某些情况下可略微提升 JOIN 性能。[#88455](https://github.com/ClickHouse/ClickHouse/pull/88455) ([Nikita Taranov](https://github.com/nickitat)).
* 使用 `system.completions` 而不是执行多个系统表查询后，客户端自动补全速度更快，且一致性更好。[#84694](https://github.com/ClickHouse/ClickHouse/pull/84694) ([|2ustam](https://github.com/RuS2m)).
* 新增 `dictionary_block_frontcoding_compression` 文本索引参数，用于控制字典压缩。默认情况下，该参数已启用，并使用 `front-coding` 压缩。[#87175](https://github.com/ClickHouse/ClickHouse/pull/87175) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 在插入到 materialized views 之前，会根据设置 `min_insert_block_size_rows_for_materialized_views` 和 `min_insert_block_size_bytes_for_materialized_views`，先将来自所有线程的数据压缩合并。此前，如果启用了 `parallel_view_processing`，每个向特定 materialized view 插入数据的线程都会独立进行压缩合并，这可能导致生成更多的 parts。[#87280](https://github.com/ClickHouse/ClickHouse/pull/87280) ([Antonio Andelic](https://github.com/antonio2368)).
* 添加设置 `temporary_files_buffer_size`，用于控制临时 File 写入器缓冲区的大小。 \* 优化 `scatter` 操作在 `LowCardinality` 列上的内存占用 (例如在 grace hash join 中会用到该操作) 。[#88237](https://github.com/ClickHouse/ClickHouse/pull/88237) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 新增了在并行副本下从文本索引直接读取的支持。提升了从对象存储中读取文本索引的性能。[#88262](https://github.com/ClickHouse/ClickHouse/pull/88262) ([Anton Popov](https://github.com/CurtizJ)).
* 涉及数据湖目录中表的查询将使用并行副本进行分布式处理。[#88273](https://github.com/ClickHouse/ClickHouse/pull/88273) ([scanhex12](https://github.com/scanhex12)) 。
* 名为 "to\_remove\_small\_parts\_at\_right" 的、用于调优后台合并算法的内部启发式规则，将在计算合并范围评分之前执行。在此之前，合并选择器会选择 wide merge；之后，它会过滤其后缀。修复了：[#85374](https://github.com/ClickHouse/ClickHouse/issues/85374)。[#88736](https://github.com/ClickHouse/ClickHouse/pull/88736) ([Mikhail Artemenko](https://github.com/Michicosun)) 。

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

* 现在，函数 `generateSerialID` 支持将 series 名称作为非常量参数传入。关闭了 [#83750](https://github.com/ClickHouse/ClickHouse/issues/83750)。[#88270](https://github.com/ClickHouse/ClickHouse/pull/88270) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 `generateSerialID` 函数新增了可选参数 `start_value`，用于为新序列指定自定义的起始值。[#88085](https://github.com/ClickHouse/ClickHouse/pull/88085) ([Manuel](https://github.com/raimannma)) 。
* 在 `clickhouse-format` 中新增 `--semicolons_inline` 选项，用于格式化查询，使分号位于末行而不是另起一行。[#88018](https://github.com/ClickHouse/ClickHouse/pull/88018) ([Jan Rada](https://github.com/ZelvaMan)) 。
* 支持在 Keeper 中覆盖配置时设置服务器级别的限流。关闭 [#73964](https://github.com/ClickHouse/ClickHouse/issues/73964)。[#74066](https://github.com/ClickHouse/ClickHouse/pull/74066) ([JIaQi](https://github.com/JiaQiTang98)) 。
* 当两个样本都只包含相同的值时，`mannWhitneyUTest` 不再抛出异常。现在会返回有效结果，并与 SciPy 保持一致。此修复关闭了：[#79814](https://github.com/ClickHouse/ClickHouse/issues/79814)。[#80009](https://github.com/ClickHouse/ClickHouse/pull/80009) ([DeanNeaht](https://github.com/DeanNeaht)).
* Rewrite 磁盘对象存储事务会在元数据事务提交后删除先前的远程 blob。[#81787](https://github.com/ClickHouse/ClickHouse/pull/81787) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了冗余相等表达式的优化过程中的一个问题：当结果类型的 `LowCardinality` 在优化前后不一致时，会触发该问题。[#82651](https://github.com/ClickHouse/ClickHouse/pull/82651) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 当 HTTP 客户端除了设置 `Expect: 100-continue` 外，还在请求头中设置 `X-ClickHouse-100-Continue: defer` 时，ClickHouse 会在配额校验通过后才向客户端发送 `100 Continue` 响应，从而避免传输那些最终反正会被丢弃的请求体，浪费网络带宽。这与 INSERT 查询有关：查询本身可以通过 URL 查询字符串发送，而数据则通过请求体发送。在 HTTP/1.1 中，如果在未发送完整请求体的情况下中止请求，将无法复用连接；但对于大数据量的 INSERT 来说，建立新连接带来的额外延迟，与总耗时相比通常微不足道。[#84304](https://github.com/ClickHouse/ClickHouse/pull/84304) ([c-end](https://github.com/c-end)).
* 在使用 DATABASE ENGINE = Backup 和 S3 存储时，对日志中的 S3 凭据进行脱敏。[#85336](https://github.com/ClickHouse/ClickHouse/pull/85336) ([Kenny Sun](https://github.com/hwabis)) 。
* 通过推迟其物化，使查询计划优化对关联子查询的输入子计划可见。[#79890](https://github.com/ClickHouse/ClickHouse/issues/79890) 的一部分。 [#85455](https://github.com/ClickHouse/ClickHouse/pull/85455) ([Dmitry Novik](https://github.com/novikd)).
* 对 SYSTEM DROP DATABASE REPLICA 的一项变更：- 删除某个数据库或整个副本时：还会删除该数据库中每个表的副本 - 如果提供了 'WITH TABLES'，则会删除每个存储的副本 - 否则，逻辑不变，仅删除数据库上的副本 - 当通过 keeper path 删除数据库副本时：- 如果提供了 'WITH TABLES'：- 将数据库恢复为 Atomic - 根据 Keeper 中的 statement 恢复 RMT 表 - 删除该数据库 (恢复出的表也会一并删除)  - 否则，仅删除所提供 keeper path 上的副本。[#85637](https://github.com/ClickHouse/ClickHouse/pull/85637) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了当生存时间 (TTL) 包含 `materialize` 函数时格式不一致的问题。关闭 [#82828](https://github.com/ClickHouse/ClickHouse/issues/82828)。[#85749](https://github.com/ClickHouse/ClickHouse/pull/85749) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Iceberg 表的状态不再存储在存储对象中。这将使 ClickHouse 中的 Iceberg 支持并发查询。[#86062](https://github.com/ClickHouse/ClickHouse/pull/86062) ([Daniil Ivanik](https://github.com/divanik)) 。
* 将 S3Queue 有序模式中的 bucket 锁改为持久模式，类似于 `use_persistent_processing_nodes = 1` 时的 processing 节点。并在测试中加入 Keeper 故障注入。[#86628](https://github.com/ClickHouse/ClickHouse/pull/86628) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 当用户拼错 format 名称时，提供提示。关闭 [#86761](https://github.com/ClickHouse/ClickHouse/issues/86761)。[#87092](https://github.com/ClickHouse/ClickHouse/pull/87092) ([flynn](https://github.com/ucasfl)) 。
* 当不存在投影时，远程副本将跳过索引分析。[#87096](https://github.com/ClickHouse/ClickHouse/pull/87096) ([zoomxi](https://github.com/zoomxi)) 。
* 允许对 ytsaurus 表禁用 UTF-8 编码。[#87150](https://github.com/ClickHouse/ClickHouse/pull/87150) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 默认情况下禁用 `s3_slow_all_threads_after_retryable_error`。[#87198](https://github.com/ClickHouse/ClickHouse/pull/87198) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 将表函数 `arrowflight` 重命名为 `arrowFlight`。[#87249](https://github.com/ClickHouse/ClickHouse/pull/87249) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 已更新 `clickhouse-benchmark`，使其在 CLI 标志中支持使用 `-` 替代 `_`。 [#87251](https://github.com/ClickHouse/ClickHouse/pull/87251) ([Ahmed Gouda](https://github.com/0xgouda)).
* 将信号处理期间向 `system.crash_log` 刷新的操作改为同步执行。[#87253](https://github.com/ClickHouse/ClickHouse/pull/87253) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增了设置 `inject_random_order_for_select_without_order_by`，会为不带 `ORDER BY` 子句的顶层 `SELECT` 查询自动注入 `ORDER BY rand()`。[#87261](https://github.com/ClickHouse/ClickHouse/pull/87261) ([Rui Zhang](https://github.com/zhangruiddn)) 。
* 改进 `joinGet` 的错误消息，使其能够准确说明 `join_keys` 的数量与 `right_table_keys` 的数量不一致。[#87279](https://github.com/ClickHouse/ClickHouse/pull/87279) ([Isak Ellmer](https://github.com/spinojara)) 。
* 新增了在写入事务期间检查任意 Keeper 节点 stat 的能力。这有助于检测 ABA 问题。[#87282](https://github.com/ClickHouse/ClickHouse/pull/87282) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 将高负载的 ytsaurus 请求重定向到 heavy 代理。[#87342](https://github.com/ClickHouse/ClickHouse/pull/87342) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 修复了针对磁盘事务元数据，在各种可能的工作负载下 `unlink`/`rename`/`removeRecursive`/`removeDirectory` 等操作以及硬链接计数的回滚问题，并简化了接口，使其更通用，从而可在其他元数据存储中复用。[#87358](https://github.com/ClickHouse/ClickHouse/pull/87358) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 新增 `keeper_server.tcp_nodelay` 配置参数，允许为 Keeper 禁用 `TCP_NODELAY`。[#87363](https://github.com/ClickHouse/ClickHouse/pull/87363) (Copilot) 。
* 在 `clickhouse-benchmarks` 中支持 `--connection`。其用法与 `clickhouse-client` 支持的方式相同，你可以在客户端 `config.xml`/`config.yaml` 的 `connections_credentials` 路径下配置预定义 connection，以避免通过命令行参数显式指定用户/密码。为 `clickhouse-benchmark` 添加了对 `--accept-invalid-certificate` 的支持。[#87370](https://github.com/ClickHouse/ClickHouse/pull/87370) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在，`max_insert_threads` 设置会在 Iceberg 表上生效。[#87407](https://github.com/ClickHouse/ClickHouse/pull/87407) ([alesapin](https://github.com/alesapin)).
* 向 `PrometheusMetricsWriter` 添加直方图和带维度的指标。这样一来，`PrometheusRequestHandler` 处理程序就具备了所有关键指标，可用于在云环境中以可靠且低开销的方式采集指标。[#87521](https://github.com/ClickHouse/ClickHouse/pull/87521) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 函数 `hasToken` 现在对于空标记将返回零个匹配结果 (此前则会抛出异常) 。[#87564](https://github.com/ClickHouse/ClickHouse/pull/87564) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 为 `Array` 和 `Map` (`mapKeys` 和 `mapValues`) 类型的值新增了文本索引支持。支持的函数包括 `mapContainsKey` 和 `has`。[#87602](https://github.com/ClickHouse/ClickHouse/pull/87602) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 新增一个 `ZooKeeperSessionExpired` 指标，用于指示已过期的全局 ZooKeeper 会话数量。[#87613](https://github.com/ClickHouse/ClickHouse/pull/87613) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 使用带有备份专用设置 (例如 backup\_slow\_all\_threads\_after\_retryable\_s3\_error) 的 S3 存储客户端，将服务器端 (原生) 复制到备份目标位置。将 s3\_slow\_all\_threads\_after\_retryable\_error 标记为废弃。[#87660](https://github.com/ClickHouse/ClickHouse/pull/87660) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了在使用 Experimental `make_distributed_plan` 进行查询计划序列化时，对设置 `max_joined_block_size_rows` 和 `max_joined_block_size_bytes` 处理不正确的问题。[#87675](https://github.com/ClickHouse/ClickHouse/pull/87675) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 现在，`enable_http_compression` 设置已默认启用。这意味着，如果客户端接受 HTTP 压缩，服务器就会使用它。不过，这一变更也有一些弊端。客户端可以请求开销较大的压缩方法，例如 `bzip2`，这并不合理，而且会增加服务器的资源消耗 (不过这只有在传输大型结果时才会明显) 。客户端也可以请求 `gzip`，虽然不算太差，但相比 `zstd` 仍不是最优选择。已关闭 [#71591](https://github.com/ClickHouse/ClickHouse/issues/71591)。[#87703](https://github.com/ClickHouse/ClickHouse/pull/87703) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 `system.server_settings` 中新增了一个条目 `keeper_hosts`，可显示 ClickHouse 可连接的 \[Zoo]Keeper 主机列表。[#87718](https://github.com/ClickHouse/ClickHouse/pull/87718) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 在系统仪表盘中添加 `from` 和 `to` 值，以便进行历史问题排查。[#87823](https://github.com/ClickHouse/ClickHouse/pull/87823) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 为 Iceberg SELECT 查询补充了更多性能跟踪信息。[#87903](https://github.com/ClickHouse/ClickHouse/pull/87903) ([Daniil Ivanik](https://github.com/divanik)) 。
* 文件系统缓存改进：在线程并发预留缓存空间时，复用缓存优先级迭代器。[#87914](https://github.com/ClickHouse/ClickHouse/pull/87914) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 新增了对 `Keeper` 请求进行限制的功能 (`max_request_size` 设置，与 `ZooKeeper` 的 `jute.maxbuffer` 相同；为保持向后兼容性，默认关闭，后续版本将启用) 。[#87952](https://github.com/ClickHouse/ClickHouse/pull/87952) ([Azat Khuzhin](https://github.com/azat)).
* 让 `clickhouse-benchmark` 默认不再在错误信息中包含栈跟踪。[#87954](https://github.com/ClickHouse/ClickHouse/pull/87954) ([Ahmed Gouda](https://github.com/0xgouda)) 。
* 当标记已在缓存中时，应避免使用线程池异步加载标记 (`load_marks_asynchronously=1`)  (因为线程池可能负载较高，即使标记已经在缓存中，查询仍会因此受到额外影响) 。[#87967](https://github.com/ClickHouse/ClickHouse/pull/87967) ([Azat Khuzhin](https://github.com/azat)).
* Ytsaurus：允许仅使用部分列创建表/表函数/字典。[#87982](https://github.com/ClickHouse/ClickHouse/pull/87982) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 现在，`system.zookeeper_connection_log` 已默认启用，可用于获取 Keeper 会话的信息。[#88011](https://github.com/ClickHouse/ClickHouse/pull/88011) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 在传入重复的外部表时，使 TCP 和 HTTP 的行为保持一致。HTTP 允许多次传入同一个临时表。[#88032](https://github.com/ClickHouse/ClickHouse/pull/88032) ([Sema Checherinda](https://github.com/CheSema)) 。
* 移除用于读取 Arrow/ORC/Parquet 的自定义 MemoryPools。在 [#84082](https://github.com/ClickHouse/ClickHouse/pull/84082) 之后，这个组件似乎已无必要，因为现在无论如何都会跟踪所有分配。[#88035](https://github.com/ClickHouse/ClickHouse/pull/88035) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 允许创建不带参数的 `Replicated` 数据库。[#88044](https://github.com/ClickHouse/ClickHouse/pull/88044) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* `clickhouse-keeper-client`：新增了对连接 clickhouse-keeper 的 TLS 端口的支持，并将标志名称保持为与 clickhouse-client 相同。[#88065](https://github.com/ClickHouse/ClickHouse/pull/88065) ([Pradeep Chhetri](https://github.com/chhetripradeep)) 。
* 新增了一个新的 profile 事件，用于跟踪后台 merge 因超出内存限制而被拒绝的次数。[#88084](https://github.com/ClickHouse/ClickHouse/pull/88084) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* 启用 analyzer 来验证 CREATE/ALTER TABLE 中表列的默认表达式。[#88087](https://github.com/ClickHouse/ClickHouse/pull/88087) ([Max Justus Spransy](https://github.com/maxjustus)) 。
* 内部查询计划改进：`CROSS JOIN` 现使用 JoinStepLogical。[#88151](https://github.com/ClickHouse/ClickHouse/pull/88151) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 为 `hasAnyTokens` (`hasAnyToken`) 和 `hasAllTokens` (`hasAllToken`) 函数新增了别名。[#88162](https://github.com/ClickHouse/ClickHouse/pull/88162) ([George Larionov](https://github.com/george-larionov)) 。
* 默认启用全局采样分析器 (即使是与查询无关的服务器线程也会启用) ：每累计 10 秒 CPU 时间和实际时间，就采集所有线程的调用栈。[#88209](https://github.com/ClickHouse/ClickHouse/pull/88209) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 更新 Azure SDK，纳入了对复制和创建容器功能中出现的 'Content-Length' 问题的修复。[#88278](https://github.com/ClickHouse/ClickHouse/pull/88278) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 为兼容 MySQL，让函数 `lag` 支持大小写不敏感。[#88322](https://github.com/ClickHouse/ClickHouse/pull/88322) ([Lonny Kapelushnik](https://github.com/lonnylot)) 。
* 允许 `clickhouse-local` 从 `clickhouse-server` 目录启动。在之前的版本中，这会报错 `Cannot parse UUID: .`。现在，无需启动服务器，也可以启动 clickhouse-local 并操作服务器中的数据库。[#88383](https://github.com/ClickHouse/ClickHouse/pull/88383) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增配置 `keeper_server.coordination_settings.check_node_acl_on_remove`。启用后，每次删除节点前都会校验该节点本身及其父节点的 ACL；否则，只会校验父节点的 ACL。[#88513](https://github.com/ClickHouse/ClickHouse/pull/88513) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 使用 `Vertical` 格式时，`JSON` 列现已支持美化输出。关闭 [#81794](https://github.com/ClickHouse/ClickHouse/issues/81794)。[#88524](https://github.com/ClickHouse/ClickHouse/pull/88524) ([Frank Rosner](https://github.com/FRosner)) 。
* 将 `clickhouse-client` 文件 (如查询历史) 存储到 [XDG Base Directories](https://specifications.freedesktop.org/basedir-spec/latest/index.html) 规范定义的位置，而不是主目录根目录下。如果 `~/.clickhouse-client-history` 已存在，仍会继续使用它。[#88538](https://github.com/ClickHouse/ClickHouse/pull/88538) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了 `GLOBAL IN` 导致的内存泄漏问题 ([https://github.com/ClickHouse/ClickHouse/issues/88615)。\[#88617](https://github.com/ClickHouse/ClickHouse/issues/88615\)。\[#88617)]\([https://github.com/ClickHouse/ClickHouse/pull/88617](https://github.com/ClickHouse/ClickHouse/pull/88617)) ([pranavmehta94](https://github.com/pranavmehta94)).
* 为 hasAny/hasAllTokens 添加了可接受字符串输入的重载。[#88679](https://github.com/ClickHouse/ClickHouse/pull/88679) ([George Larionov](https://github.com/george-larionov)) 。
* 在 `clickhouse-keeper` 的 postinstall 脚本中添加一个步骤，以支持开机自启。[#88746](https://github.com/ClickHouse/ClickHouse/pull/88746) ([YenchangChan](https://github.com/YenchangChan)) 。
* 仅在粘贴时才在 Web UI 中检查凭据，而不是在每次按键时都检查。这样可避免由 LDAP server 配置错误导致的问题。此更改关闭了 [#85777](https://github.com/ClickHouse/ClickHouse/issues/85777)。[#88769](https://github.com/ClickHouse/ClickHouse/pull/88769) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在违反约束时限制异常消息的长度。在之前的版本中，如果插入了很长的字符串，可能会产生一条很长的异常消息，并最终被写入 query\_log。关闭 [#87032](https://github.com/ClickHouse/ClickHouse/issues/87032)。[#88801](https://github.com/ClickHouse/ClickHouse/pull/88801) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了创建表时向 ArrowFlight 服务器请求数据集结构的问题。[#87542](https://github.com/ClickHouse/ClickHouse/pull/87542) ([Vitaly Baranov](https://github.com/vitlibar)).

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复了 GeoParquet 引发的客户端协议错误。[#84020](https://github.com/ClickHouse/ClickHouse/pull/84020) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了在发起节点上解析子查询中依赖主机的函数 (如 shardNum()) 的问题。 [#84409](https://github.com/ClickHouse/ClickHouse/pull/84409) ([Eduard Karacharov](https://github.com/korowa)).
* 修复了多个日期时间相关函数在处理带小数秒的纪元前日期时的错误，例如 `parseDateTime64BestEffort`、`change{Year,Month,Day}` 和 `makeDateTime64`。此前，亚秒部分会从秒数中扣除，而不是加到秒数上。例如，`parseDateTime64BestEffort('1969-01-01 00:00:00.468')` 之前返回的是 `1968-12-31 23:59:59.532`，而不是 `1969-01-01 00:00:00.468`。[#85396](https://github.com/ClickHouse/ClickHouse/pull/85396) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复了在同一条 ALTER 语句中列状态发生变化时，ALTER COLUMN IF EXISTS 命令执行失败的问题。DROP COLUMN IF EXISTS、MODIFY COLUMN IF EXISTS、COMMENT COLUMN IF EXISTS 和 RENAME COLUMN IF EXISTS 等命令现在能够正确处理以下情况：列已被同一语句中的前一条命令删除。[#86046](https://github.com/ClickHouse/ClickHouse/pull/86046) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复日期超出支持范围时对 Date/DateTime/DateTime64 的推断问题。[#86184](https://github.com/ClickHouse/ClickHouse/pull/86184) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了一个崩溃问题：某些用户提交到 `AggregateFunction(quantileDD)` 列的有效数据可能导致合并陷入无限递归。[#86560](https://github.com/ClickHouse/ClickHouse/pull/86560) ([Raphaël Thériault](https://github.com/raphael-theriault-swi)).
* 支持在通过 `cluster` 表函数创建的表中使用 JSON/Dynamic 类型。[#86821](https://github.com/ClickHouse/ClickHouse/pull/86821) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了查询中 CTE 里计算出的函数结果具有非确定性的问题。[#86967](https://github.com/ClickHouse/ClickHouse/pull/86967) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了在主键列上对 pointInPolygon 使用 EXPLAIN 时出现的 LOGICAL\_ERROR。[#86971](https://github.com/ClickHouse/ClickHouse/pull/86971) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复名称中包含百分号编码序列的数据湖表的问题。关闭 [#86626](https://github.com/ClickHouse/ClickHouse/issues/86626)。[#87020](https://github.com/ClickHouse/ClickHouse/pull/87020) ([Anton Ivashkin](https://github.com/ianton-ru)) 。
* 修复启用 `optimize_functions_to_subcolumns` 时，`OUTER JOIN` 中 Nullable 列上的错误 `IS NULL` 行为，关闭 [#78625](https://github.com/ClickHouse/ClickHouse/issues/78625)。[#87058](https://github.com/ClickHouse/ClickHouse/pull/87058) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在跟踪 `max_temporary_data_on_disk_size` 限制时，临时数据释放量统计错误的问题，关闭 [#87118](https://github.com/ClickHouse/ClickHouse/issues/87118)。[#87140](https://github.com/ClickHouse/ClickHouse/pull/87140) ([JIaQi](https://github.com/JiaQiTang98)).
* 函数 checkHeaders 现已能正确验证提供的请求头，并拒绝不允许的请求头。原作者：Michael Anastasakis (@michael-anastasakis)。[#87172](https://github.com/ClickHouse/ClickHouse/pull/87172) ([Raúl Marín](https://github.com/Algunenano)) 。
* 使 `toDate` 和 `toDate32` 在所有数值类型上的行为一致。修复了从 int16 转换时对 Date32 下溢的检查。[#87176](https://github.com/ClickHouse/ClickHouse/pull/87176) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复了在带有多个 JOIN 的查询中使用并行副本时出现的逻辑错误，尤其是在 LEFT/INNER JOIN 之后使用 RIGHT JOIN 的情况下。[#87178](https://github.com/ClickHouse/ClickHouse/pull/87178) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 使 schema 推断缓存遵循 `input_format_try_infer_variants` 设置。[#87180](https://github.com/ClickHouse/ClickHouse/pull/87180) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 确保 pathStartsWith 仅匹配该前缀下的路径。[#87181](https://github.com/ClickHouse/ClickHouse/pull/87181) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `_row_number` 虚拟列以及 Iceberg 位置删除中的逻辑错误。[#87220](https://github.com/ClickHouse/ClickHouse/pull/87220) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了因 const 和非 const 块混用，导致 `JOIN` 中出现 "Too large size passed to allocator" `LOGICAL_ERROR` 的问题。[#87231](https://github.com/ClickHouse/ClickHouse/pull/87231) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了轻量级更新在使用从另一个 `MergeTree` 表读取数据的子查询时的问题。[#87285](https://github.com/ClickHouse/ClickHouse/pull/87285) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了在存在行策略时 move-to-prewhere 优化不起作用的问题。这是 [#85118](https://github.com/ClickHouse/ClickHouse/issues/85118) 的后续。关闭 [#69777](https://github.com/ClickHouse/ClickHouse/issues/69777)。关闭 [#83748](https://github.com/ClickHouse/ClickHouse/issues/83748)。[#87303](https://github.com/ClickHouse/ClickHouse/pull/87303) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了将补丁应用到带有默认表达式、但在数据分区片段中缺失的列时出现的问题。[#87347](https://github.com/ClickHouse/ClickHouse/pull/87347) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在 MergeTree 表中使用重复分区字段名时出现的段错误。[#87365](https://github.com/ClickHouse/ClickHouse/pull/87365) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复 EmbeddedRocksDB 升级相关问题。 [#87392](https://github.com/ClickHouse/ClickHouse/pull/87392) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了对象存储中从文本索引直接读取的问题。[#87399](https://github.com/ClickHouse/ClickHouse/pull/87399) ([Anton Popov](https://github.com/CurtizJ)) 。
* 防止创建引用不存在引擎的权限。[#87419](https://github.com/ClickHouse/ClickHouse/pull/87419) ([Jitendra](https://github.com/jitendra1411)) 。
* 对于 `s3_plain_rewritable`，仅忽略“未找到”错误 (否则可能会引发各种问题) 。[#87426](https://github.com/ClickHouse/ClickHouse/pull/87426) ([Azat Khuzhin](https://github.com/azat)).
* 修复了使用 YTSaurus 数据源和 \*range\_hashed 布局的字典的问题。[#87490](https://github.com/ClickHouse/ClickHouse/pull/87490) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* 修复创建空元组数组时的问题。[#87520](https://github.com/ClickHouse/ClickHouse/pull/87520) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在创建临时表时检查非法列。[#87524](https://github.com/ClickHouse/ClickHouse/pull/87524) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 绝不要将 Hive 分区列放入格式头中。修复了 [#87515](https://github.com/ClickHouse/ClickHouse/issues/87515)。[#87528](https://github.com/ClickHouse/ClickHouse/pull/87528) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 修复 DeltaLake 在使用文本 format 时准备从 format 读取数据的问题。[#87529](https://github.com/ClickHouse/ClickHouse/pull/87529) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了对 Buffer 表执行 select 和 insert 时访问验证的问题。[#87545](https://github.com/ClickHouse/ClickHouse/pull/87545) ([pufit](https://github.com/pufit)).
* 不允许为 S3 表创建数据跳过索引。[#87554](https://github.com/ClickHouse/ClickHouse/pull/87554) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 避免异步日志中的已跟踪内存发生泄漏 (可能造成明显漂移，10 小时内约 \~100GiB) 以及 text\_log 中出现同类问题 (也可能产生几乎相同的漂移) 。[#87584](https://github.com/ClickHouse/ClickHouse/pull/87584) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一个 bug：如果某个 View 或 Materialized View 被异步删除，且在后台清理完成前服务器重启，则其 SELECT 设置可能会覆盖全局服务器设置。[#87603](https://github.com/ClickHouse/ClickHouse/pull/87603) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 在计算内存过载警告时，尽可能排除用户态页缓存字节数。 [#87610](https://github.com/ClickHouse/ClickHouse/pull/87610) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了一个问题：CSV 反序列化过程中，如果类型顺序不正确，会导致 `LOGICAL_ERROR`。 [#87622](https://github.com/ClickHouse/ClickHouse/pull/87622) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 executable 字典中 `command_read_timeout` 处理不当的问题。[#87627](https://github.com/ClickHouse/ClickHouse/pull/87627) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在使用新的 analyzer 并对替换后的列进行过滤时，WHERE 子句中 `SELECT * REPLACE` 的错误行为。[#87630](https://github.com/ClickHouse/ClickHouse/pull/87630) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复了在 `Distributed` 上使用 `Merge` 时的两级聚合问题。[#87687](https://github.com/ClickHouse/ClickHouse/pull/87687) ([c-end](https://github.com/c-end)) 。
* 修复了 HashJoin 算法在未使用右侧行列表时输出块生成的问题。修复 [#87401](https://github.com/ClickHouse/ClickHouse/issues/87401)。[#87699](https://github.com/ClickHouse/ClickHouse/pull/87699) ([Dmitry Novik](https://github.com/novikd)) 。
* 如果在进行索引分析后没有数据可读，可能会错误地选择并行副本读取模式。关闭 [#87653](https://github.com/ClickHouse/ClickHouse/issues/87653)。[#87700](https://github.com/ClickHouse/ClickHouse/pull/87700) ([zoomxi](https://github.com/zoomxi)).
* 修复 Glue 中对 `timestamp` / `timestamptz` 列的处理问题。[#87733](https://github.com/ClickHouse/ClickHouse/pull/87733) ([Andrey Zvonov](https://github.com/zvonand)).
* 已修复 [#86587](https://github.com/ClickHouse/ClickHouse/issues/86587)。[#87761](https://github.com/ClickHouse/ClickHouse/pull/87761) ([scanhex12](https://github.com/scanhex12)) 。
* 修复 PostgreSQL 接口中布尔值写入的问题。[#87762](https://github.com/ClickHouse/ClickHouse/pull/87762) ([Artem Yurov](https://github.com/ArtemYurov)) 。
* 修复在带有 CTE 的 INSERT SELECT 查询中出现的未知表错误，[#85368](https://github.com/ClickHouse/ClickHouse/issues/85368)。[#87789](https://github.com/ClickHouse/ClickHouse/pull/87789) ([Guang Zhao](https://github.com/zheguang)) 。
* 修复了从不能置于 Nullable 内部的 Variant 中读取 null map 子列的问题。[#87798](https://github.com/ClickHouse/ClickHouse/pull/87798) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了这样一个问题：在辅助节点上未能在集群中完全删除 database 时，会导致错误处理异常。[#87802](https://github.com/ClickHouse/ClickHouse/pull/87802) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复了多个跳过索引相关问题。[#87817](https://github.com/ClickHouse/ClickHouse/pull/87817) ([Raúl Marín](https://github.com/Algunenano)).
* 在 AzureBlobStorage 中，现已更新为优先尝试原生复制，并在出现 'Unauthroized' 错误时切换为读写方式 (在 AzureBlobStorage 中，如果源端和目标端的存储账户不同，则会出现 'Unauthorized' 错误) 。同时修复了在配置中定义端点时，"use\_native\_copy" 未正确生效的问题。[#87826](https://github.com/ClickHouse/ClickHouse/pull/87826) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 如果 ArrowStream 文件包含不唯一的字典，ClickHouse 会发生崩溃。[#87863](https://github.com/ClickHouse/ClickHouse/pull/87863) ([Ilya Golshtein](https://github.com/ilejn)).
* 修复了使用 approx\_top\_k 和 finalizeAggregation 时出现的致命错误。[#87892](https://github.com/ClickHouse/ClickHouse/pull/87892) ([Jitendra](https://github.com/jitendra1411)) 。
* 修复在最后一个块为空时带有投影的合并问题。[#87928](https://github.com/ClickHouse/ClickHouse/pull/87928) ([Raúl Marín](https://github.com/Algunenano)) 。
* 如果参数类型不允许在 GROUP BY 中使用，则不要从 GROUP BY 中移除单射函数。[#87958](https://github.com/ClickHouse/ClickHouse/pull/87958) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在查询中使用 `session_timezone` 设置时，基于 DateTime 的键在粒度/分区裁剪方面不正确的问题。[#87987](https://github.com/ClickHouse/ClickHouse/pull/87987) ([Eduard Karacharov](https://github.com/korowa)) 。
* PostgreSQL 接口现可在查询后返回受影响的行数。[#87990](https://github.com/ClickHouse/ClickHouse/pull/87990) ([Artem Yurov](https://github.com/ArtemYurov)) 。
* 限制在 PASTE JOIN 中使用过滤器下推功能，因为这可能导致结果错误。[#88078](https://github.com/ClickHouse/ClickHouse/pull/88078) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 在评估此前由 [https://github.com/ClickHouse/ClickHouse/pull/84503](https://github.com/ClickHouse/ClickHouse/pull/84503) 引入的授权检查之前，先进行 URI 规范化。[#88089](https://github.com/ClickHouse/ClickHouse/pull/88089) ([pufit](https://github.com/pufit)) 。
* 修复了新 analyzer 中 ARRAY JOIN COLUMNS() 未匹配到任何列时的逻辑错误。[#88091](https://github.com/ClickHouse/ClickHouse/pull/88091) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复 "ClickHouse 内存占用过高" 警告 (不包括页缓存) 。[#88092](https://github.com/ClickHouse/ClickHouse/pull/88092) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在为列设置了 `TTL` 的 `MergeTree` 表中可能发生的数据损坏问题。[#88095](https://github.com/ClickHouse/ClickHouse/pull/88095) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复在读取 `system.tables` 时，若已附加的外部数据库 (`PostgreSQL`/`SQLite`/...) 中存在无效表，可能出现未捕获异常的问题。[#88105](https://github.com/ClickHouse/ClickHouse/pull/88105) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 `mortonEncode` 和 `hilbertEncode` 函数在以空元组参数调用时发生崩溃的问题。[#88110](https://github.com/ClickHouse/ClickHouse/pull/88110) ([xiaohuanlin](https://github.com/xiaohuanlin)) 。
* 现在，如果集群中存在非活跃副本，`ON CLUSTER` 查询所需时间会更少。[#88153](https://github.com/ClickHouse/ClickHouse/pull/88153) ([alesapin](https://github.com/alesapin)).
* 现在，DDL 工作线程会清理副本集合中的过期主机。这将减少 ZooKeeper 中存储的元数据量。[#88154](https://github.com/ClickHouse/ClickHouse/pull/88154) ([alesapin](https://github.com/alesapin)).
* 修复了 ClickHouse 在无 cgroups 环境下运行的问题 (此前异步指标意外要求必须使用 cgroups) 。[#88164](https://github.com/ClickHouse/ClickHouse/pull/88164) ([Azat Khuzhin](https://github.com/azat)).
* 发生错误时，应正确撤销移动目录操作。我们需要重写执行过程中所有被修改的 `prefix.path` 对象，而不只是根对象。 [#88198](https://github.com/ClickHouse/ClickHouse/pull/88198) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了 `ColumnLowCardinality` 中 `is_shared` 标志传递不正确的问题。如果 `ReverseIndex` 中的哈希值已经预先计算并缓存后，又向某列插入了新值，则可能导致 group-by 结果错误。[#88213](https://github.com/ClickHouse/ClickHouse/pull/88213) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了 workload 设置 `max_cpu_share` 的问题。现在即使未设置 `max_cpus` workload 设置，也可以使用它。[#88217](https://github.com/ClickHouse/ClickHouse/pull/88217) ([Neerav](https://github.com/neeravsalaria)).
* 修复了一个问题：包含子查询的超大型变更可能会卡在准备阶段。现在可以使用 `SYSTEM STOP MERGES` 停止这些变更。[#88241](https://github.com/ClickHouse/ClickHouse/pull/88241) ([alesapin](https://github.com/alesapin)) 。
* 现在，关联子查询已支持对象存储。[#88290](https://github.com/ClickHouse/ClickHouse/pull/88290) ([alesapin](https://github.com/alesapin)) 。
* 避免在访问 `system.projections` 和 `system.data_skipping_indices` 时尝试初始化 DataLake 数据库。[#88330](https://github.com/ClickHouse/ClickHouse/pull/88330) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在，只有在显式启用 `show_data_lake_catalogs_in_system_tables` 后，数据湖目录才会显示在 system 内部信息表中。[#88341](https://github.com/ClickHouse/ClickHouse/pull/88341) ([alesapin](https://github.com/alesapin)) 。
* 修复了 DatabaseReplicated 未遵循 `interserver_http_host` 配置的问题。[#88378](https://github.com/ClickHouse/ClickHouse/pull/88378) ([xiaohuanlin](https://github.com/xiaohuanlin)) 。
* 现在，在定义投影时已明确禁用位置参数，因为在这一内部查询阶段使用它们没有意义。这修复了 [#48604](https://github.com/ClickHouse/ClickHouse/issues/48604)。[#88380](https://github.com/ClickHouse/ClickHouse/pull/88380) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了 `countMatches` 函数中的二次复杂度问题。已关闭 [#88400](https://github.com/ClickHouse/ClickHouse/issues/88400)。[#88401](https://github.com/ClickHouse/ClickHouse/pull/88401) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使 KeeperMap 表的 `ALTER COLUMN ... COMMENT` 命令可进行复制，从而将其提交到 Replicated database 元数据中，并传播到所有副本。关闭了 [#88077](https://github.com/ClickHouse/ClickHouse/issues/88077)。[#88408](https://github.com/ClickHouse/ClickHouse/pull/88408) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复了 Database Replicated 中 materialized views 误报循环依赖的问题，该问题会导致无法向数据库添加新副本。[#88423](https://github.com/ClickHouse/ClickHouse/pull/88423) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复在 `group_by_overflow_mode` 设置为 `any` 时，稀疏列聚合异常的问题。[#88440](https://github.com/ClickHouse/ClickHouse/pull/88440) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复在使用多个 FULL JOIN USING 子句且 `query_plan_use_logical_join_step=0` 时出现的“找不到列”错误。关闭 [#88103](https://github.com/ClickHouse/ClickHouse/issues/88103)。[#88473](https://github.com/ClickHouse/ClickHouse/pull/88473) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 对于节点数 > 10 的大型集群，在 restore 时很可能因错误 `[941] 67c45db4-4df4-4879-87c5-25b8d1e0d414 <Trace>: RestoreCoordinationOnCluster The version of node /clickhouse/backups/restore-7c551a77-bd76-404c-bad0-3213618ac58e/stage/num_hosts changed (attempt #9), will try again` 而失败。`num_hosts` 节点会被多台主机同时覆盖。该修复将用于控制重试次数的设置改为动态。关闭 [#87721](https://github.com/ClickHouse/ClickHouse/issues/87721)。[#88484](https://github.com/ClickHouse/ClickHouse/pull/88484) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 这个 PR 只是为了兼容 23.8 及更早版本。该兼容性问题是由这个 PR 引入的：[https://github.com/ClickHouse/ClickHouse/pull/54240](https://github.com/ClickHouse/ClickHouse/pull/54240) 这条 SQL 在 `enable_analyzer=0` 时会执行失败 (23.8 之前是正常的) 。[#88491](https://github.com/ClickHouse/ClickHouse/pull/88491) ([JIaQi](https://github.com/JiaQiTang98)).
* 修复在将大数值转换为 DateTime 时，`accurateCast` 错误信息中的 UBSAN 整数溢出问题。[#88520](https://github.com/ClickHouse/ClickHouse/pull/88520) ([xiaohuanlin](https://github.com/xiaohuanlin)) 。
* 修复了 coalescing merge tree 对 Tuple 类型的处理问题。这关闭了 [#88469](https://github.com/ClickHouse/ClickHouse/issues/88469)。[#88526](https://github.com/ClickHouse/ClickHouse/pull/88526) ([scanhex12](https://github.com/scanhex12)).
* 禁止对 `iceberg_format_version=1` 执行删除。这解决了 [#88444](https://github.com/ClickHouse/ClickHouse/issues/88444)。[#88532](https://github.com/ClickHouse/ClickHouse/pull/88532) ([scanhex12](https://github.com/scanhex12)) 。
* 此补丁修复了 `plain-rewritable` 磁盘在任意深度文件夹上的移动操作问题。[#88586](https://github.com/ClickHouse/ClickHouse/pull/88586) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 修复 \*cluster 函数中的 SQL SECURITY DEFINER 问题。[#88588](https://github.com/ClickHouse/ClickHouse/pull/88588) ([Julian Maicher](https://github.com/jmaicher)) 。
* 修复了因底层 const PREWHERE 列被并发变更而导致的潜在崩溃。[#88605](https://github.com/ClickHouse/ClickHouse/pull/88605) ([Azat Khuzhin](https://github.com/azat)).
* 修复了从文本索引读取数据的问题，并启用了查询条件缓存 (在启用 `use_skip_indexes_on_data_read` 和 `use_query_condition_cache` 设置时) 。[#88660](https://github.com/ClickHouse/ClickHouse/pull/88660) ([Anton Popov](https://github.com/CurtizJ)).
* `Poco::Net::HTTPChunkedStreamBuf::readFromDevice` 抛出的 `Poco::TimeoutException` 异常会触发 SIGABRT 崩溃。[#88668](https://github.com/ClickHouse/ClickHouse/pull/88668) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 已在 [#88910](https://github.com/ClickHouse/ClickHouse/issues/88910) 中回移：恢复后，Replicated 数据库的某个副本可能会长时间卡住，并持续打印类似 `Failed to marked query-0004647339 as finished (finished=No node, synced=No node)` 的消息；此问题已修复。[#88671](https://github.com/ClickHouse/ClickHouse/pull/88671) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 修复了在配置重新加载后，ClickHouse 首次建立连接时无法向 `system.zookeeper_connection_log` 追加记录的问题。[#88728](https://github.com/ClickHouse/ClickHouse/pull/88728) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了一个 bug：在处理时区时，如果将 DateTime64 转换为 Date 并设置 `date_time_overflow_behavior = 'saturate'`，对于超出范围的值可能会产生错误结果。[#88737](https://github.com/ClickHouse/ClickHouse/pull/88737) ([Manuel](https://github.com/raimannma)).
* 第 N 次尝试修复启用缓存的 S3 表引擎中的“zero bytes error”问题。[#88740](https://github.com/ClickHouse/ClickHouse/pull/88740) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了对 `loop` 表函数执行 select 时的权限校验问题。[#88802](https://github.com/ClickHouse/ClickHouse/pull/88802) ([pufit](https://github.com/pufit)) 。
* 在异步日志记录失败时捕获异常，以防止程序中止。[#88814](https://github.com/ClickHouse/ClickHouse/pull/88814) ([Raúl Marín](https://github.com/Algunenano)) 。
* 已在 [#89060](https://github.com/ClickHouse/ClickHouse/issues/89060) 中回移：修复 `top_k`，使其在仅传入单个参数调用时也会遵循阈值参数。关闭 [#88757](https://github.com/ClickHouse/ClickHouse/issues/88757)。[#88867](https://github.com/ClickHouse/ClickHouse/pull/88867) ([Manuel](https://github.com/raimannma)) 。
* 已在 [#88944](https://github.com/ClickHouse/ClickHouse/issues/88944) 中回移：修复了函数 `reverseUTF8` 中的一个错误。在之前的版本中，它会错误地反转长度为 4 的 UTF-8 码点的字节顺序。此修复解决了 [#88913](https://github.com/ClickHouse/ClickHouse/issues/88913)。[#88914](https://github.com/ClickHouse/ClickHouse/pull/88914) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 已在 [#88980](https://github.com/ClickHouse/ClickHouse/issues/88980) 中回移：使用 SQL SECURITY DEFINER 创建视图时，不再检查访问权限 `SET DEFINER <current_user>:definer`。[#88968](https://github.com/ClickHouse/ClickHouse/pull/88968) ([pufit](https://github.com/pufit)) 。
* 已在 [#89058](https://github.com/ClickHouse/ClickHouse/issues/89058) 中回移：修复了 `L2DistanceTransposed(vec1, vec2, p)` 中的 `LOGICAL_ERROR`。此前，针对部分 `QBit` 读取的优化在 `p` 为 `Nullable` 时，会错误地从返回类型中移除 `Nullable`。[#88974](https://github.com/ClickHouse/ClickHouse/pull/88974) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 已在 [#89167](https://github.com/ClickHouse/ClickHouse/issues/89167) 中回移：修复未知 catalog 类型导致的崩溃问题。解决了 [#88819](https://github.com/ClickHouse/ClickHouse/issues/88819)。[#88987](https://github.com/ClickHouse/ClickHouse/pull/88987) ([scanhex12](https://github.com/scanhex12)).
* 已在 [#89028](https://github.com/ClickHouse/ClickHouse/issues/89028) 中回移：修复了分析跳过索引时的性能下降问题。[#89004](https://github.com/ClickHouse/ClickHouse/pull/89004) ([Anton Popov](https://github.com/CurtizJ)) 。

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

* 使用 `postgres` 库 18.0 版本。[#87647](https://github.com/ClickHouse/ClickHouse/pull/87647) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 为 FreeBSD 启用 ICU。[#87891](https://github.com/ClickHouse/ClickHouse/pull/87891) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在动态分派到 SSE 4.2 而非 SSE 4 时，使用 SSE 4.2。[#88029](https://github.com/ClickHouse/ClickHouse/pull/88029) ([Raúl Marín](https://github.com/Algunenano)) 。
* 如果 `Speculative Store Bypass Safe` 不可用，则无需 `NO_ARMV81_OR_HIGHER` 标志。[#88051](https://github.com/ClickHouse/ClickHouse/pull/88051) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 当 ClickHouse 以 `ENABLE_LIBFIU=OFF` 构建时，与 failpoint 相关的函数会变为空操作，不再影响性能。在这种情况下，`SYSTEM ENABLE/DISABLE FAILPOINT` queries 会返回 `SUPPORT_IS_DISABLED` error。[#88184](https://github.com/ClickHouse/ClickHouse/pull/88184) ([c-end](https://github.com/c-end)) 。

<div id="259">
  ### ClickHouse 发行版 25.9，2025-09-25
</div>

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

* 禁用了对 IPv4/IPv6 的无意义二元运算：现已禁止将 IPv4/IPv6 与非整数类型做加/减运算。此前允许与浮点类型运算，并会对某些其他类型 (如 DateTime) 抛出逻辑错误。[#86336](https://github.com/ClickHouse/ClickHouse/pull/86336) ([Raúl Marín](https://github.com/Algunenano)).
* 弃用设置 `allow_dynamic_metadata_for_data_lakes`。现在，所有 Iceberg 表都会在执行每次查询前尝试从存储中拉取最新的表 schema。[#86366](https://github.com/ClickHouse/ClickHouse/pull/86366) ([Daniil Ivanik](https://github.com/divanik)).
* 调整了 `OUTER JOIN ... USING` 子句中合并列的解析方式，使其更加一致：此前，在 OUTER JOIN 中同时选择 USING 列和限定列 (`a, t1.a, t2.a`) 时，USING 列会被错误解析为 `t1.a`，导致右表中那些在左表没有匹配的行显示为 0/NULL。现在，USING 子句中的标识符始终解析为合并列，而限定标识符则解析为未合并的列，无论查询中是否还存在其他标识符。例如：\`\`\`sql SELECT a, t1.a, t2.a FROM (SELECT 1 as a WHERE 0) t1 FULL JOIN (SELECT 2 as a) t2 USING (a) -- Before: a=0, t1.a=0, t2.a=2 (incorrect - 'a' resolved to t1.a) -- After: a=2, t1.a=0, t2.a=2 (correct - 'a' is coalesced). [#80848](https://github.com/ClickHouse/ClickHouse/pull/80848) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 将 replicated 去重窗口增大到 10000。这一变更本身是完全兼容的，但可以预见的是，在表数量很多的情况下，它可能会导致较高的资源消耗。[#86820](https://github.com/ClickHouse/ClickHouse/pull/86820) ([Sema Checherinda](https://github.com/CheSema)).

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

* 现在，您可以为 NATS 引擎指定新增设置项 `nats_stream` 和 `nats_consumer`，以使用 NATS JetStream 消费消息。[#84799](https://github.com/ClickHouse/ClickHouse/pull/84799) ([Dmitry Novikov](https://github.com/dmitry-sles-novikov)) 。
* 为 `arrowFlight` 表函数新增了身份验证和 SSL 支持。[#87120](https://github.com/ClickHouse/ClickHouse/pull/87120) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 为 `S3` 表引擎和 `s3` 表函数新增了名为 `storage_class_name` 的参数，可用于指定 AWS 支持的智能分层。该参数同时支持键值格式和位置格式 (已弃用) 。[#87122](https://github.com/ClickHouse/ClickHouse/pull/87122) ([alesapin](https://github.com/alesapin)).
* Iceberg 表引擎支持 `ALTER UPDATE`。[#86059](https://github.com/ClickHouse/ClickHouse/pull/86059) ([scanhex12](https://github.com/scanhex12)) 。
* 新增系统表 `iceberg_metadata_log`，可在执行 SELECT 语句时获取 Iceberg 元数据文件。[#86152](https://github.com/ClickHouse/ClickHouse/pull/86152) ([scanhex12](https://github.com/scanhex12)).
* `Iceberg` 和 `DeltaLake` 表现已支持通过存储级设置 `disk` 进行自定义磁盘配置。[#86778](https://github.com/ClickHouse/ClickHouse/pull/86778) ([scanhex12](https://github.com/scanhex12)) 。
* 支持 Azure 数据湖磁盘。[#87173](https://github.com/ClickHouse/ClickHouse/pull/87173) ([scanhex12](https://github.com/scanhex12)) 。
* 支持在 Azure Blob 存储之上使用 `Unity` catalog。[#80013](https://github.com/ClickHouse/ClickHouse/pull/80013) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 支持 `Iceberg` 写入使用更多格式 (`ORC`、`Avro`) 。这修复了 [#86179](https://github.com/ClickHouse/ClickHouse/issues/86179)。[#87277](https://github.com/ClickHouse/ClickHouse/pull/87277) ([scanhex12](https://github.com/scanhex12)) 。
* 新增系统表 `database_replicas`，用于提供数据库副本相关信息。[#83408](https://github.com/ClickHouse/ClickHouse/pull/83408) ([Konstantin Morozov](https://github.com/k-morozov)) 。
* 新增函数 `arrayExcept`，用于从一个数组中减去另一个作为集合处理的数组。[#82368](https://github.com/ClickHouse/ClickHouse/pull/82368) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 新增了一个 `system.aggregated_zookeeper_log` 表。该表包含按会话 ID、父路径和操作类型分组的 ZooKeeper 操作统计信息 (例如操作次数、平均延迟、错误数) ，并会定期写入磁盘。[#85102](https://github.com/ClickHouse/ClickHouse/pull/85102) [#87208](https://github.com/ClickHouse/ClickHouse/pull/87208) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增函数 `isValidASCII`。如果输入字符串或 FixedString 仅包含 ASCII 字节 (0x00–0x7F) ，则返回 1，否则返回 0。修复了 [#85377](https://github.com/ClickHouse/ClickHouse/issues/85377)。... [#85786](https://github.com/ClickHouse/ClickHouse/pull/85786) ([rajat mohan](https://github.com/rajatmohan22)) 。
* 布尔设置可以在不提供参数的情况下指定，例如 `SET use_query_cache;`，这相当于将其设置为 true。[#85800](https://github.com/ClickHouse/ClickHouse/pull/85800) ([thraeka](https://github.com/thraeka)) 。
* 新增配置选项：`logger.startupLevel` 和 `logger.shutdownLevel` 允许分别在 ClickHouse 启动和关闭期间覆盖日志级别。[#85967](https://github.com/ClickHouse/ClickHouse/pull/85967) ([Lennard Eijsackers](https://github.com/Blokje5)) 。
* 聚合函数 `timeSeriesChangesToGrid` 和 `timeSeriesResetsToGrid`。其行为与 `timeSeriesRateToGrid` 类似，接受开始时间戳、结束时间戳、步长和回看窗口等参数，以及时间戳和值这两个参数，但要求每个窗口至少有 1 个样本，而不是 2 个。它会计算 PromQL `changes`/`resets`，对于由这些参数定义的时间网格中的每个时间戳，统计指定窗口内样本值发生变化或减少的次数。返回类型为 `Array(Nullable(Float64))`。[#86010](https://github.com/ClickHouse/ClickHouse/pull/86010) ([Stephen Chi](https://github.com/stephchi0)).
* 允许用户使用与临时表类似的语法 (`CREATE TEMPORARY VIEW`) 创建临时视图。 [#86432](https://github.com/ClickHouse/ClickHouse/pull/86432) ([Aly Kafoury](https://github.com/AlyHKafoury)) 。
* 在 `system.warnings` 表中新增 CPU 和内存使用量警告。[#86838](https://github.com/ClickHouse/ClickHouse/pull/86838) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 支持在 `Protobuf` 输入中使用 `oneof` 标识符。可使用一个特殊列来指示 oneof 中某一部分是否存在。如果消息包含 [oneof](https://protobuf.dev/programming-guides/proto3/#oneof)，且设置了 `input_format_protobuf_oneof_presence`，ClickHouse 会填充该列，以指示检测到了 oneof 的哪个字段。[#82885](https://github.com/ClickHouse/ClickHouse/pull/82885) ([Ilya Golshtein](https://github.com/ilejn)) 。
* 基于 jemalloc 的内部工具改进了内存分配性能分析。现在可通过配置 `jemalloc_enable_global_profiler` 启用全局 jemalloc Profiler。启用配置 `jemalloc_collect_global_profile_samples_in_trace_log` 后，采样得到的全局分配和释放信息可作为 `JemallocSample` 类型存储在 `system.trace_log` 中。现在也可通过设置 `jemalloc_enable_profiler` 为每个查询单独启用 jemalloc 性能分析。是否将样本存储到 `system.trace_log` 中，还可通过设置 `jemalloc_collect_profile_samples_in_trace_log` 按查询控制。将 jemalloc 更新到更新的版本。[#85438](https://github.com/ClickHouse/ClickHouse/pull/85438) ([Antonio Andelic](https://github.com/antonio2368)).
* 新增一项设置，可在删除 Iceberg 表时一并删除文件。这解决了 [#86211](https://github.com/ClickHouse/ClickHouse/issues/86211)。[#86501](https://github.com/ClickHouse/ClickHouse/pull/86501) ([scanhex12](https://github.com/scanhex12)) 。

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

* 倒排文本索引已完全重构，可扩展到适用于无法装入 RAM 的数据集。 [#86485](https://github.com/ClickHouse/ClickHouse/pull/86485) ([Anton Popov](https://github.com/CurtizJ)).
* Join 重排序现在会使用统计信息。可通过设置 `allow_statistics_optimize = 1` 和 `query_plan_optimize_join_order_limit = 10` 启用此功能。 [#86822](https://github.com/ClickHouse/ClickHouse/pull/86822) ([Han Fei](https://github.com/hanfei1991)).
* 支持 `alter table ... materialize statistics all`，可将表的所有统计信息物化。 [#87197](https://github.com/ClickHouse/ClickHouse/pull/87197) ([Han Fei](https://github.com/hanfei1991)).

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

* 支持在读取期间使用跳过索引来过滤数据分区片段，从而减少不必要的索引读取。此功能由新设置 `use_skip_indexes_on_data_read` 控制 (默认禁用) 。此更改解决了 [#75774](https://github.com/ClickHouse/ClickHouse/issues/75774)。其中还包含一些与 [#81021](https://github.com/ClickHouse/ClickHouse/issues/81021) 共享的通用基础工作。[#81526](https://github.com/ClickHouse/ClickHouse/pull/81526) ([Amos Bird](https://github.com/amosbird)) 。
* 新增了 JOIN 顺序优化，可自动重排 JOIN 以提升性能 (由 `query_plan_optimize_join_order_limit` 设置控制) 。请注意，当前 JOIN 顺序优化对统计信息的支持仍较有限，主要依赖存储引擎提供的行数估计；更完善的统计信息收集和基数估计将在后续版本中加入。**如果你在升级后遇到 JOIN 查询问题**，可以通过设置 `SET query_plan_use_new_logical_join_step = 0` 暂时禁用这一新实现，并报告该问题以便调查。**关于 `USING` 子句中标识符解析的说明**：`OUTER JOIN ... USING` 子句中合并后列的解析方式已调整为更一致的行为：此前，在 OUTER JOIN 中同时选择 USING 列和带限定符的列 (`a, t1.a, t2.a`) 时，USING 列会被错误地解析为 `t1.a`，导致右表中未与左表匹配的行显示为 0/NULL。现在，来自 USING 子句的标识符始终解析为合并后的列，而带限定符的标识符则解析为未合并的列，与查询中是否存在其他标识符无关。例如： \`\`\`sql SELECT a, t1.a, t2.a FROM (SELECT 1 as a WHERE 0) t1 FULL JOIN (SELECT 2 as a) t2 USING (a) -- 之前：a=0, t1.a=0, t2.a=2 (错误 - 'a' 被解析为 t1.a)  -- 之后：a=2, t1.a=0, t2.a=2 (正确 - 'a' 是合并后的值) 。 [#80848](https://github.com/ClickHouse/ClickHouse/pull/80848) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 面向数据湖的分布式 `INSERT SELECT`。[#86783](https://github.com/ClickHouse/ClickHouse/pull/86783) ([scanhex12](https://github.com/scanhex12)) 。
* 改进了对 `func(primary_column) = 'xx'` 和 `column in (xxx)` 等这类条件的 PREWHERE 优化。[#85529](https://github.com/ClickHouse/ClickHouse/pull/85529) ([李扬](https://github.com/taiyang-li)) 。
* 实现了对 JOIN 的重写：1. 如果对于已匹配或未匹配的行，过滤条件始终为 false，则将 `LEFT ANY JOIN` 和 `RIGHT ANY JOIN` 转换为 `SEMI`/`ANTI` JOIN。此优化由新设置 `query_plan_convert_any_join_to_semi_or_anti_join` 控制。2. 如果某一侧未匹配行的过滤条件始终为 false，则将 `FULL ALL JOIN` 转换为 `LEFT ALL` 或 `RIGHT ALL` JOIN。[#86028](https://github.com/ClickHouse/ClickHouse/pull/86028) ([Dmitry Novik](https://github.com/novikd)).
* 执行轻量级删除后，垂直合并性能有所提升。[#86169](https://github.com/ClickHouse/ClickHouse/pull/86169) ([Anton Popov](https://github.com/CurtizJ)) 。
* 在 `LEFT/RIGHT` join 中存在大量未匹配行时，`HashJoin` 的性能略有提升。[#86312](https://github.com/ClickHouse/ClickHouse/pull/86312) ([Nikita Taranov](https://github.com/nickitat)) 。
* 基数排序：帮助编译器利用 SIMD，并实现更好的预取。使用动态分发，仅在 Intel CPU 上启用软件预取。延续了 @taiyang-li 在 [https://github.com/ClickHouse/ClickHouse/pull/77029](https://github.com/ClickHouse/ClickHouse/pull/77029) 中的工作。[#86378](https://github.com/ClickHouse/ClickHouse/pull/86378) ([Raúl Marín](https://github.com/Algunenano)) 。
* 提升了包含大量 parts 的表上的短查询性能 (通过使用 `devector` 而非 `deque` 来优化 `MarkRanges`) 。[#86933](https://github.com/ClickHouse/ClickHouse/pull/86933) ([Azat Khuzhin](https://github.com/azat)) 。
* 优化了在 join 模式下应用补丁分区片段时的性能。[#87094](https://github.com/ClickHouse/ClickHouse/pull/87094) ([Anton Popov](https://github.com/CurtizJ)).
* 新增设置 `query_condition_cache_selectivity_threshold` (默认值：1.0) ，用于将低选择性谓词的扫描结果排除在写入查询条件缓存之外。这样可以降低查询条件缓存的内存占用，但代价是缓存命中率会下降。[#86076](https://github.com/ClickHouse/ClickHouse/pull/86076) ([zhongyuankai](https://github.com/zhongyuankai)).
* 降低 Iceberg 写入时的内存占用。 [#86544](https://github.com/ClickHouse/ClickHouse/pull/86544) ([scanhex12](https://github.com/scanhex12)).

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

* 支持在 Iceberg 中单次插入时写入多个数据文件。新增设置 `iceberg_insert_max_rows_in_data_file` 和 `iceberg_insert_max_bytes_in_data_file`，用于控制相关上限。[#86275](https://github.com/ClickHouse/ClickHouse/pull/86275) ([scanhex12](https://github.com/scanhex12)).
* 为 delta lake 中插入的 数据文件新增行数/字节限制。由设置 `delta_lake_insert_max_rows_in_data_file` 和 `delta_lake_insert_max_bytes_in_data_file` 控制。[#86357](https://github.com/ClickHouse/ClickHouse/pull/86357) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持 Iceberg 写入中的更多分区类型。此项更改修复了 [#86206](https://github.com/ClickHouse/ClickHouse/issues/86206)。[#86298](https://github.com/ClickHouse/ClickHouse/pull/86298) ([scanhex12](https://github.com/scanhex12)) 。
* 使 S3 重试策略可配置，并让 S3 磁盘的设置在更改配置 XML 文件后可热重载。[#82642](https://github.com/ClickHouse/ClickHouse/pull/82642) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 改进了 S3(Azure)Queue 表引擎，使其在 zookeeper 连接中断时仍可正常运行，并避免出现潜在的重复数据。需要启用 S3Queue 设置 `use_persistent_processing_nodes` (可通过 `ALTER TABLE MODIFY SETTING` 更改) 。[#85995](https://github.com/ClickHouse/ClickHouse/pull/85995) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 创建 materialized view 时，可在 `TO` 后使用查询参数，例如：`CREATE MATERIALIZED VIEW mv TO {to_table:Identifier} AS SELECT * FROM src_table`。[#84899](https://github.com/ClickHouse/ClickHouse/pull/84899) ([Diskein](https://github.com/Diskein)) 。
* 当为 `Kafka2` 表引擎指定了错误的设置时，向用户提供更明确的提示。 [#83701](https://github.com/ClickHouse/ClickHouse/pull/83701) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 现在已不再支持为 `Time` 类型指定时区 (因为这本来就没有意义) 。[#84689](https://github.com/ClickHouse/ClickHouse/pull/84689) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 简化了 `best_effort` 模式下 Time/Time64 解析相关的逻辑，并修复了一些 bug。[#84730](https://github.com/ClickHouse/ClickHouse/pull/84730) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 新增了 `deltaLakeAzureCluster` 函数 (类似于用于集群模式的 `deltaLakeAzure`) 以及 `deltaLakeS3Cluster` 函数 (`deltaLakeCluster` 的别名) 。解决了 [#85358](https://github.com/ClickHouse/ClickHouse/issues/85358)。[#85547](https://github.com/ClickHouse/ClickHouse/pull/85547) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 将 `azure_max_single_part_copy_size` 设置像用于备份一样应用于普通复制操作。[#85767](https://github.com/ClickHouse/ClickHouse/pull/85767) ([Ilya Golshtein](https://github.com/ilejn)) 。
* 在 S3 对象存储中发生可重试错误时，会降低 S3 客户端线程的速度。此更改将先前的设置 `backup_slow_all_threads_after_retryable_s3_error` 扩展到 S3 磁盘，并将其重命名为更通用的 `s3_slow_all_threads_after_retryable_error`。[#85918](https://github.com/ClickHouse/ClickHouse/pull/85918) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 将设置 allow\_experimental\_variant/dynamic/json 和 enable\_variant/dynamic/json 标记为废弃。现在这三种类型均会无条件启用。[#85934](https://github.com/ClickHouse/ClickHouse/pull/85934) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持在 `http_handlers` 中按完整 URL 字符串 (`full_url` 指令) 进行过滤，包括 schema 和 host:port。[#86155](https://github.com/ClickHouse/ClickHouse/pull/86155) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增设置项 `allow_experimental_delta_lake_writes`。[#86180](https://github.com/ClickHouse/ClickHouse/pull/86180) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复 init.d 脚本中 systemd 的检测问题 (修复 "Install packages" 检查) 。[#86187](https://github.com/ClickHouse/ClickHouse/pull/86187) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增了一个带维度的指标 `startup_scripts_failure_reason`。该指标用于区分导致启动脚本失败的不同错误类型。尤其是出于告警目的，我们需要区分瞬时错误 (例如 `MEMORY_LIMIT_EXCEEDED` 或 `KEEPER_EXCEPTION`) 和非瞬时错误。[#86202](https://github.com/ClickHouse/ClickHouse/pull/86202) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 允许在 Iceberg 表分区中省略 `identity` 函数。[#86314](https://github.com/ClickHouse/ClickHouse/pull/86314) ([scanhex12](https://github.com/scanhex12)) 。
* 新增了仅对特定通道启用 JSON 日志的功能；为此，请将 `logger.formatting.channel` 设置为 `syslog`/`console`/`errorlog`/`log` 之一。[#86331](https://github.com/ClickHouse/ClickHouse/pull/86331) ([Azat Khuzhin](https://github.com/azat)) 。
* 允许在 `WHERE` 中直接使用原生数值。它们已经可以用作逻辑函数的参数。这简化了过滤器下推和 move-to-prewhere 优化。[#86390](https://github.com/ClickHouse/ClickHouse/pull/86390) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了在对元数据已损坏的 Catalog 执行 `SYSTEM DROP REPLICA` 时出现的错误。[#86391](https://github.com/ClickHouse/ClickHouse/pull/86391) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 在 Azure 中为磁盘访问检查 (`skip_access_check = 0`) 增加额外重试，因为 Azure 可能需要相当长的时间来完成访问权限预配。[#86419](https://github.com/ClickHouse/ClickHouse/pull/86419) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 将 `timeSeries*()` 函数中的过期判定窗口调整为左开右闭。[#86588](https://github.com/ClickHouse/ClickHouse/pull/86588) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 新增 `FailedInternal*Query` profile events。[#86627](https://github.com/ClickHouse/ClickHouse/pull/86627) ([Shane Andrade](https://github.com/mauidude)) 。
* 修复了通过配置文件添加名称中带点的用户时的处理问题。[#86633](https://github.com/ClickHouse/ClickHouse/pull/86633) ([Mikhail Koviazin](https://github.com/mkmkme)).
* 为查询的内存使用情况添加异步指标 (`QueriesMemoryUsage` 和 `QueriesPeakMemoryUsage`) 。[#86669](https://github.com/ClickHouse/ClickHouse/pull/86669) ([Azat Khuzhin](https://github.com/azat)) 。
* 你可以使用 `clickhouse-benchmark --precise` 标志，更精确地报告 QPS 和其他按时间间隔统计的指标。当查询耗时与报告间隔 `--delay D` 接近时，它有助于获得更稳定的 QPS。[#86684](https://github.com/ClickHouse/ClickHouse/pull/86684) ([Sergei Trifonov](https://github.com/serxa)).
* 支持配置 Linux 线程的 nice 值，以便为某些线程 (merge/mutate、查询、materialized view、ZooKeeper 客户端) 设置更高或更低的优先级。[#86703](https://github.com/ClickHouse/ClickHouse/pull/86703) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了具有误导性的“指定的上传不存在”错误：在分段上传过程中，如果因竞态条件导致原始异常丢失，就会出现此错误。[#86725](https://github.com/ClickHouse/ClickHouse/pull/86725) ([Julia Kartseva](https://github.com/jkartseva)).
* 限制 `EXPLAIN` 查询中的查询计划描述长度。对于 `EXPLAIN` 之外的查询，不再计算该描述。新增设置 `query_plan_max_step_description_length`。[#86741](https://github.com/ClickHouse/ClickHouse/pull/86741) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 新增了调整待处理信号的能力，以尝试规避 `CANNOT&#95;CREATE&#95;TIMER` (针对查询分析器，`query_profiler_real_time_period_ns`/`query_profiler_cpu_time_period_ns`) 。此外，还会从 `/proc/self/status` 采集 `SigQ` 作为内部信息 (如果 `ProcessSignalQueueSize` 接近 `ProcessSignalQueueLimit`，则很可能会出现 `CANNOT_CREATE_TIMER` 错误) 。 [#86760](https://github.com/ClickHouse/ClickHouse/pull/86760) ([Azat Khuzhin](https://github.com/azat)).
* 优化 Keeper 中 `RemoveRecursive` 请求的性能。[#86789](https://github.com/ClickHouse/ClickHouse/pull/86789) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 移除了 `PrettyJSONEachRow` 在输出 JSON type 时多余的空白字符。[#86819](https://github.com/ClickHouse/ClickHouse/pull/86819) ([Pavel Kruglov](https://github.com/Avogar)).
* 现在，在普通可重写磁盘上删除目录时，我们会为 `prefix.path` 记录 blob 的大小。[#86908](https://github.com/ClickHouse/ClickHouse/pull/86908) ([alesapin](https://github.com/alesapin)).
* 支持对远程 ClickHouse 实例 (包括 ClickHouse Cloud) 进行性能测试。使用示例：`tests/performance/scripts/perf.py tests/performance/math.xml --runs 10 --user <username> --password <password> --host <hostname> --port <port> --secure`。[#86995](https://github.com/ClickHouse/ClickHouse/pull/86995) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 在一些已知会分配大量 (>16MiB) 内存的场景中 (排序、异步插入、文件日志) ，现会遵守内存限制。[#87035](https://github.com/ClickHouse/ClickHouse/pull/87035) ([Azat Khuzhin](https://github.com/azat)) 。
* 如果设置 `network_compression_method` 时指定的并非受支持的通用编解码器，则会抛出异常。[#87097](https://github.com/ClickHouse/ClickHouse/pull/87097) ([Robert Schulze](https://github.com/rschu1ze)).
* 系统表 `system.query_cache` 现在会返回*所有*查询结果缓存条目；而此前，它只会返回共享条目，或同一用户和角色的非共享条目。这是可以接受的，因为非共享条目按设计不应泄露*查询结果*，而 `system.query_cache` 返回的是*查询字符串*。这使该系统表的行为与 `system.query_log` 更为相似。[#87104](https://github.com/ClickHouse/ClickHouse/pull/87104) ([Robert Schulze](https://github.com/rschu1ze)).
* 为 `parseDateTime` 函数启用短路求值。[#87184](https://github.com/ClickHouse/ClickHouse/pull/87184) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 `system.parts_columns` 中新增了 `statistics` 列。[#87259](https://github.com/ClickHouse/ClickHouse/pull/87259) ([Han Fei](https://github.com/hanfei1991)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 对于 Replicated 数据库和内部复制表，alter 查询的结果此前仅在发起节点上验证。这将修复一种情况：已提交的 alter 查询可能会卡在其他节点上。[#83849](https://github.com/ClickHouse/ClickHouse/pull/83849) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 限制 `BackgroundSchedulePool` 中每种类型的任务数量。避免所有槽位都被某一种类型的任务占用，而其他任务长期得不到执行的情况。也可避免任务彼此等待时发生死锁。这由 `background_schedule_pool_max_parallel_tasks_per_type_ratio` 服务端设置控制。[#84008](https://github.com/ClickHouse/ClickHouse/pull/84008) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 在恢复数据库副本时正确关闭表。否则，在数据库副本恢复过程中，某些表引擎会触发 LOGICAL\_ERROR。[#84744](https://github.com/ClickHouse/ClickHouse/pull/84744) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在为 database 名称生成拼写纠错提示时检查访问权限。[#85371](https://github.com/ClickHouse/ClickHouse/pull/85371) ([Dmitry Novik](https://github.com/novikd)) 。
* 1. 对 Hive 列使用 LowCardinality 2. 在虚拟列之前填充 Hive 列 ([https://github.com/ClickHouse/ClickHouse/pull/81040](https://github.com/ClickHouse/ClickHouse/pull/81040) 所必需)  3. 修复 Hive 在空 format 上触发的 LOGICAL\_ERROR [#85528](https://github.com/ClickHouse/ClickHouse/issues/85528) 4. 修复对 Hive 分区列为唯一列情况的检查 5. 断言 schema 中已指定所有 Hive 列 6. 对 Hive 的 parallel\_replicas\_cluster 的部分修复 7. 在 Hive 工具的 extractkeyValuePairs 中使用有序容器 ([https://github.com/ClickHouse/ClickHouse/pull/81040](https://github.com/ClickHouse/ClickHouse/pull/81040) 所必需) 。[#85538](https://github.com/ClickHouse/ClickHouse/pull/85538) ([Arthur Passos](https://github.com/arthurpassos)).
* 避免对 `IN` 函数的第一个参数进行不必要的优化，因为在使用数组映射时，这种优化有时会导致错误。[#85546](https://github.com/ClickHouse/ClickHouse/pull/85546) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 写入 Parquet 文件时，Iceberg source ID 与 Parquet 名称之间的映射未按 schema 进行调整。此 PR 会针对每个 Iceberg 数据文件处理其对应的 schema，而不是当前的 schema。[#85829](https://github.com/ClickHouse/ClickHouse/pull/85829) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了将读取文件大小与打开文件分开处理的问题。这与 [https://github.com/ClickHouse/ClickHouse/pull/33372](https://github.com/ClickHouse/ClickHouse/pull/33372) 有关，后者是为修复 Linux 内核 `5.10` 之前版本中的一个缺陷而引入的。[#85837](https://github.com/ClickHouse/ClickHouse/pull/85837) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 在内核级别禁用 IPv6 的系统上 (例如设置了 `ipv6.disable=1` 的 RHEL) ，ClickHouse Keeper 启动时不再失败。如果初始的 IPv6 监听器启动失败，现在会尝试回退到 IPv4 监听器。[#85901](https://github.com/ClickHouse/ClickHouse/pull/85901) ([jskong1124](https://github.com/jskong1124)) 。
* 此 PR 解决了 [#77990](https://github.com/ClickHouse/ClickHouse/issues/77990)。为 globalJoin 中的并行副本添加了 TableFunctionRemote 支持。[#85929](https://github.com/ClickHouse/ClickHouse/pull/85929) ([zoomxi](https://github.com/zoomxi)).
* 修复 orcschemareader::initializeifneeded() 中的空指针问题。此 PR 解决了以下问题：[#85292](https://github.com/ClickHouse/ClickHouse/issues/85292) ### 面向用户可见变更的文档条目。 [#85951](https://github.com/ClickHouse/ClickHouse/pull/85951) ([yanglongwei](https://github.com/ylw510)).
* 新增了一项检查：只有当关联子查询使用了外层查询中的列时，才允许其出现在 FROM 子句中。修复了 [#85469](https://github.com/ClickHouse/ClickHouse/issues/85469)。修复了 [#85402](https://github.com/ClickHouse/ClickHouse/issues/85402)。[#85966](https://github.com/ClickHouse/ClickHouse/pull/85966) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了这样一个问题：对某列执行 ALTER UPDATE 时，如果其他列的物化表达式中使用了该列的子列，则更新不正确。此前，表达式中包含子列的物化列无法正确更新。[#85985](https://github.com/ClickHouse/ClickHouse/pull/85985) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 禁止修改其子列已用于 PK 或分区表达式的列。[#86005](https://github.com/ClickHouse/ClickHouse/pull/86005) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 DeltaLake 存储中使用非默认列映射模式时无法读取子列的问题。[#86064](https://github.com/ClickHouse/ClickHouse/pull/86064) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 JSON 中带有枚举提示的路径使用错误默认值的问题。[#86065](https://github.com/ClickHouse/ClickHouse/pull/86065) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 为 DataLake hive catalog URL 解析增加输入清理。关闭了 [#86018](https://github.com/ClickHouse/ClickHouse/issues/86018)。[#86092](https://github.com/ClickHouse/ClickHouse/pull/86092) ([rajat mohan](https://github.com/rajatmohan22)).
* 修复文件系统缓存在动态调整大小过程中的逻辑错误。关闭 [#86122](https://github.com/ClickHouse/ClickHouse/issues/86122)。关闭 [https://github.com/ClickHouse/clickhouse-core-incidents/issues/473。](https://github.com/ClickHouse/clickhouse-core-incidents/issues/473。) [#86130](https://github.com/ClickHouse/ClickHouse/pull/86130) ([Kseniia Sumarokova](https://github.com/kssenii))。
* 在 DatabaseReplicatedSettings 中，`logs_to_keep` 使用 `NonZeroUInt64`。[#86142](https://github.com/ClickHouse/ClickHouse/pull/86142) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 如果表 (例如 `ReplacingMergeTree`) 是在设置 `index_granularity_bytes = 0` 的情况下创建的，那么带有跳过索引的 `FINAL` 查询会抛出异常。该问题现已修复。[#86147](https://github.com/ClickHouse/ClickHouse/pull/86147) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 消除了 UB，并修复了 Iceberg 分区表达式解析中的问题。[#86166](https://github.com/ClickHouse/ClickHouse/pull/86166) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了一次 INSERT 中同时包含 const 和 non-const 块时的崩溃问题。[#86230](https://github.com/ClickHouse/ClickHouse/pull/86230) ([Azat Khuzhin](https://github.com/azat)) 。
* 从 SQL 创建磁盘时，默认会处理 `/etc/metrika.xml` 中的 include 配置。[#86232](https://github.com/ClickHouse/ClickHouse/pull/86232) ([alekar](https://github.com/alekar)) 。
* 修复了 accurateCastOrNull/accurateCastOrDefault 从 String 转换为 JSON 时的问题。 [#86240](https://github.com/ClickHouse/ClickHouse/pull/86240) ([Pavel Kruglov](https://github.com/Avogar)).
* 支持在 Iceberg 引擎中使用不含 '/' 的目录。[#86249](https://github.com/ClickHouse/ClickHouse/pull/86249) ([scanhex12](https://github.com/scanhex12)) 。
* 修复了 `replaceRegex` 在与 `FixedString` 类型的 haystack 和空 needle 一起使用时发生的崩溃。[#86270](https://github.com/ClickHouse/ClickHouse/pull/86270) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 ALTER UPDATE Nullable(JSON) 过程中发生的崩溃。[#86281](https://github.com/ClickHouse/ClickHouse/pull/86281) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 system.tables 中缺失 definer 列的问题。[#86295](https://github.com/ClickHouse/ClickHouse/pull/86295) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复将 LowCardinality(Nullable(T)) 转换为 Dynamic 的类型转换问题。[#86365](https://github.com/ClickHouse/ClickHouse/pull/86365) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复向 DeltaLake 写入时的逻辑错误。关闭 [#86175](https://github.com/ClickHouse/ClickHouse/issues/86175)。[#86367](https://github.com/ClickHouse/ClickHouse/pull/86367) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复 plain\_rewritable 磁盘从 Azure Blob 存储读取空 blob 时出现的 `416 The range specified is invalid for the current size of the resource. The range specified is invalid for the current size of the resource` 问题。[#86400](https://github.com/ClickHouse/ClickHouse/pull/86400) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复 `GROUP BY Nullable(JSON)` 的问题。[#86410](https://github.com/ClickHouse/ClickHouse/pull/86410) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 Materialized Views 中的一个问题：如果某个 MV 先被创建、删除，然后再以相同名称重新创建，可能无法正常工作。[#86413](https://github.com/ClickHouse/ClickHouse/pull/86413) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 从 \*cluster functions 读取时，如果所有副本都不可用，则会失败。[#86414](https://github.com/ClickHouse/ClickHouse/pull/86414) ([Julian Maicher](https://github.com/jmaicher)).
* 修复因 `Buffer` 表导致的 `MergesMutationsMemoryTracking` 内存泄漏，并修复从 `Kafka` (及其他来源) 进行流式处理时的 `query_views_log` 问题。[#86422](https://github.com/ClickHouse/ClickHouse/pull/86422) ([Azat Khuzhin](https://github.com/azat)).
* 修复删除别名存储的引用表后 `show tables` 显示异常的问题。[#86433](https://github.com/ClickHouse/ClickHouse/pull/86433) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 修复在启用 send\_chunk\_header 且通过 HTTP 协议调用 UDF 时缺少 chunk 请求头的问题。[#86469](https://github.com/ClickHouse/ClickHouse/pull/86469) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在启用 jemalloc profile flush 的情况下可能发生的死锁。[#86473](https://github.com/ClickHouse/ClickHouse/pull/86473) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 DeltaLake 表引擎读取子列的问题。关闭 [#86204](https://github.com/ClickHouse/ClickHouse/issues/86204)。[#86477](https://github.com/ClickHouse/ClickHouse/pull/86477) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 妥善处理回环主机 ID，避免在处理 DDL 任务时发生冲突:. [#86479](https://github.com/ClickHouse/ClickHouse/pull/86479) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了 postgres 数据库引擎表在包含 numeric/decimal 列时的 detach/attach 问题。[#86480](https://github.com/ClickHouse/ClickHouse/pull/86480) ([Julian Maicher](https://github.com/jmaicher)) 。
* 修复了 getSubcolumnType 中使用未初始化内存的问题。[#86498](https://github.com/ClickHouse/ClickHouse/pull/86498) ([Raúl Marín](https://github.com/Algunenano)) 。
* 函数 `searchAny` 和 `searchAll` 在传入空 needles 调用时，现在会返回 `true` (即 "匹配任意内容") 。此前，它们返回的是 `false`。 (问题 [#86300](https://github.com/ClickHouse/ClickHouse/issues/86300)) 。[#86500](https://github.com/ClickHouse/ClickHouse/pull/86500) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 修复了函数 `timeSeriesResampleToGridWithStaleness()` 在第一个桶没有值时的问题。[#86507](https://github.com/ClickHouse/ClickHouse/pull/86507) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了将 `merge_tree_min_read_task_size` 设为 0 时导致的崩溃。[#86527](https://github.com/ClickHouse/ClickHouse/pull/86527) ([yanglongwei](https://github.com/ylw510)) 。
* 读取时，每个数据文件的 format 会从 Iceberg 元数据中获取 (此前取自表参数) 。[#86529](https://github.com/ClickHouse/ClickHouse/pull/86529) ([Daniil Ivanik](https://github.com/divanik)).
* 在关闭时，忽略刷新日志时发生的异常，并使关闭过程更安全 (以避免 SIGSEGV) 。[#86546](https://github.com/ClickHouse/ClickHouse/pull/86546) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 Backup 数据库引擎在查询大小为零的分片文件时抛出异常的问题。[#86563](https://github.com/ClickHouse/ClickHouse/pull/86563) ([Max Justus Spransy](https://github.com/maxjustus)) 。
* 修复了在启用 send\_chunk\_header 且通过 HTTP 协议调用 UDF 时，缺少 chunk 请求头的问题。[#86606](https://github.com/ClickHouse/ClickHouse/pull/86606) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了因 Keeper 会话过期而导致的 S3Queue 逻辑错误 "Expected current processor {} to be equal to {}"。[#86615](https://github.com/ClickHouse/ClickHouse/pull/86615) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 插入和剪枝中的可空性缺陷。此项修复关闭了 [#86407](https://github.com/ClickHouse/ClickHouse/issues/86407)。[#86630](https://github.com/ClickHouse/ClickHouse/pull/86630) ([scanhex12](https://github.com/scanhex12)).
* 禁用 Iceberg 元数据缓存时，不要禁用文件系统缓存。[#86635](https://github.com/ClickHouse/ClickHouse/pull/86635) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了 parquet reader v3 中的“Parquet::ReadManager (单线程) 死锁”错误。[#86644](https://github.com/ClickHouse/ClickHouse/pull/86644) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 ArrowFlight 中 `listen_host` 对 IPv6 的支持。[#86664](https://github.com/ClickHouse/ClickHouse/pull/86664) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复 `ArrowFlight` 处理程序关闭时的问题。此 PR 修复了 [#86596](https://github.com/ClickHouse/ClickHouse/issues/86596)。[#86665](https://github.com/ClickHouse/ClickHouse/pull/86665) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复启用 `describe_compact_output=1` 时分布式查询的问题。[#86676](https://github.com/ClickHouse/ClickHouse/pull/86676) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了窗口定义的解析以及查询参数的应用问题。[#86720](https://github.com/ClickHouse/ClickHouse/pull/86720) ([Azat Khuzhin](https://github.com/azat)).
* 修复了以下异常：在使用 `PARTITION BY` 创建表但未使用分区通配符时，会出现 `Partition strategy wildcard can not be used without a '_partition_id' wildcard.`；而这种用法在 25.8 之前的版本中原本是可行的。关闭 [https://github.com/ClickHouse/clickhouse-private/issues/37567。](https://github.com/ClickHouse/clickhouse-private/issues/37567。) [#86748](https://github.com/ClickHouse/ClickHouse/pull/86748) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复并行查询尝试获取同一把锁时出现的 LogicalError。[#86751](https://github.com/ClickHouse/ClickHouse/pull/86751) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复了在 RowBinary 输入格式中向 JSON 共享数据写入 NULL 的问题，并在 ColumnObject 中增加了一些额外校验。[#86812](https://github.com/ClickHouse/ClickHouse/pull/86812) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在使用 limit 时空 Tuple 排列的问题。[#86828](https://github.com/ClickHouse/ClickHouse/pull/86828) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 不要为持久化处理节点使用单独的 Keeper 节点。修复见 [https://github.com/ClickHouse/ClickHouse/pull/85995。关闭](https://github.com/ClickHouse/ClickHouse/pull/85995。关闭) [#86406](https://github.com/ClickHouse/ClickHouse/issues/86406)。[#86841](https://github.com/ClickHouse/ClickHouse/pull/86841) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 TimeSeries 引擎表导致在 Replicated Database 中无法创建新副本的问题。 [#86845](https://github.com/ClickHouse/ClickHouse/pull/86845) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复了在任务缺失某些 Keeper 节点时，查询 `system.distributed_ddl_queue` 的问题。[#86848](https://github.com/ClickHouse/ClickHouse/pull/86848) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了解压后块末尾寻道的问题。[#86906](https://github.com/ClickHouse/ClickHouse/pull/86906) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 处理了在 Iceberg Iterator 异步执行期间抛出的异常。[#86932](https://github.com/ClickHouse/ClickHouse/pull/86932) ([Daniil Ivanik](https://github.com/divanik)).
* 修复大型预处理 XML 配置无法保存的问题。[#86934](https://github.com/ClickHouse/ClickHouse/pull/86934) ([c-end](https://github.com/c-end)).
* 修复 system.iceberg\_metadata\_log 表中 date 字段的填充问题。[#86961](https://github.com/ClickHouse/ClickHouse/pull/86961) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了带有 `WHERE` 条件的 `TTL` 无限重新计算问题。[#86965](https://github.com/ClickHouse/ClickHouse/pull/86965) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了 `uniqExact` 函数在使用 `ROLLUP` 和 `CUBE` 修饰符时可能导致结果不正确的问题。[#87014](https://github.com/ClickHouse/ClickHouse/pull/87014) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了当 `parallel_replicas_for_cluster_functions` 设置为 1 时，使用 `url()` 表函数解析表 schema 时的问题。[#87029](https://github.com/ClickHouse/ClickHouse/pull/87029) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 PREWHERE 的输出拆分为多个步骤后，正确进行类型转换。[#87040](https://github.com/ClickHouse/ClickHouse/pull/87040) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了轻量级更新中 `ON CLUSTER` 子句的相关问题。[#87043](https://github.com/ClickHouse/ClickHouse/pull/87043) ([Anton Popov](https://github.com/CurtizJ)).
* 修复某些聚合函数状态在使用 String 参数时的兼容性问题。[#87049](https://github.com/ClickHouse/ClickHouse/pull/87049) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 OpenAI 模型名称未被传递的问题。[#87100](https://github.com/ClickHouse/ClickHouse/pull/87100) ([Kaushik Iska](https://github.com/iskakaushik)) 。
* EmbeddedRocksDB：路径必须位于 user\_files 目录内。[#87109](https://github.com/ClickHouse/ClickHouse/pull/87109) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 25.1 之前创建的 KeeperMap 表在执行 DROP 查询后数据仍残留在 ZooKeeper 中的问题。[#87112](https://github.com/ClickHouse/ClickHouse/pull/87112) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复读取 Parquet 时 Map 和 Array 字段 ID 的问题。[#87136](https://github.com/ClickHouse/ClickHouse/pull/87136) ([scanhex12](https://github.com/scanhex12)) 。
* 修复了惰性物化中读取带有数组大小子列的数组时的问题。[#87139](https://github.com/ClickHouse/ClickHouse/pull/87139) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 CASE 函数处理 Dynamic 参数时的问题。[#87177](https://github.com/ClickHouse/ClickHouse/pull/87177) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 CSV 中从空字符串读取空数组的问题。 [#87182](https://github.com/ClickHouse/ClickHouse/pull/87182) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了非关联 `EXISTS` 可能产生错误结果的问题。在 `execute_exists_as_scalar_subquery=1` 时会触发该问题；此设置是在 [https://github.com/ClickHouse/ClickHouse/pull/85481](https://github.com/ClickHouse/ClickHouse/pull/85481) 中引入的，并影响 `25.8`。修复 [#86415](https://github.com/ClickHouse/ClickHouse/issues/86415)。[#87207](https://github.com/ClickHouse/ClickHouse/pull/87207) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 如果未配置 iceberg\_metadata\_log，但用户尝试获取用于调试的 iceberg 元数据信息，则会报错。修复了 nullptr 访问问题。[#87250](https://github.com/ClickHouse/ClickHouse/pull/87250) ([Daniil Ivanik](https://github.com/divanik)) 。

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

* 修复与 abseil-cpp 20250814.0 的兼容性问题，[https://github.com/abseil/abseil-cpp/issues/1923。](https://github.com/abseil/abseil-cpp/issues/1923。) [#85970](https://github.com/ClickHouse/ClickHouse/pull/85970) ([Yuriy Chernyshov](https://github.com/georgthegreat)).
* 将独立 WASM 词法分析器的构建放到一个开关后面。 [#86505](https://github.com/ClickHouse/ClickHouse/pull/86505) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复在不支持 `vmull_p64` 指令的旧 ARM CPU 上构建 crc32c 的问题。 [#86521](https://github.com/ClickHouse/ClickHouse/pull/86521) ([Pablo Marcos](https://github.com/pamarcos)).
* 使用 `openldap` 2.6.10。 [#86623](https://github.com/ClickHouse/ClickHouse/pull/86623) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 不再尝试在 Darwin 上拦截 `memalign`。 [#86769](https://github.com/ClickHouse/ClickHouse/pull/86769) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 使用 `krb5` 1.22.1-final。 [#86836](https://github.com/ClickHouse/ClickHouse/pull/86836) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复 `list-licenses.sh` 中解包 Rust crate 名称时的问题。 [#87305](https://github.com/ClickHouse/ClickHouse/pull/87305) ([Konstantin Bogdanov](https://github.com/thevar1able)).

<div id="258">
  ### ClickHouse 发行版 25.8 LTS，2025-08-28
</div>

#### 向后不兼容变更

* 对于 JSON 中包含不同类型值的数组，现在会推断为 `Array(Dynamic)`，而不是未命名的 `Tuple`。如需使用此前的行为，请禁用设置 `input_format_json_infer_array_of_dynamic_from_array_of_different_types`。[#80859](https://github.com/ClickHouse/ClickHouse/pull/80859) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 为保持一致性并简化处理，S3 延迟指标现已改为使用直方图。[#82305](https://github.com/ClickHouse/ClickHouse/pull/82305) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 在默认表达式中，带点号的标识符现在必须用反引号括起来，以防被解析为复合标识符。[#83162](https://github.com/ClickHouse/ClickHouse/pull/83162) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* Lazy materialization 仅在启用 analyzer 时才会启用 (默认即为如此) ，以避免继续维护不使用 analyzer 的场景——根据我们的经验，这种场景存在一些问题 (例如在条件中使用 `indexHint()` 时) 。[#83791](https://github.com/ClickHouse/ClickHouse/pull/83791) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 默认情况下，在 Parquet 输出格式中，`Enum` 类型的值会写为带有 `ENUM` 逻辑类型的 `BYTE_ARRAY`。[#84169](https://github.com/ClickHouse/ClickHouse/pull/84169) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 默认启用 MergeTree setting `write_marks_for_substreams_in_compact_parts`。这会显著提升从新创建的 Compact parts 读取 subcolumns 的性能。低于 25.5 版本的 server 将无法读取新的 Compact parts。[#84171](https://github.com/ClickHouse/ClickHouse/pull/84171) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 之前，`concurrent_threads_scheduler` 的默认值为 `round_robin`，但在存在大量单线程 queries (例如 INSERT) 时，这种调度方式被证明并不公平。此次变更将更稳妥的替代调度器 `fair_round_robin` 设为默认值。[#84747](https://github.com/ClickHouse/ClickHouse/pull/84747) ([Sergei Trifonov](https://github.com/serxa)) 。
* ClickHouse 支持 PostgreSQL 风格的 heredoc 语法：`$tag$ string contents... $tag$`，也称为 dollar-quoted 字符串字面量。在之前的版本中，对标签的限制较少：它们可以包含任意字符，包括标点符号和空白字符。这会与同样可以以美元符号开头的标识符产生解析歧义。同时，PostgreSQL 只允许标签包含单词字符。为解决该问题，我们现在将 heredoc 标签限制为只能包含单词字符。修复 [#84731](https://github.com/ClickHouse/ClickHouse/issues/84731)。[#84846](https://github.com/ClickHouse/ClickHouse/pull/84846) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 函数 `azureBlobStorage`、`deltaLakeAzure` 和 `icebergAzure` 已更新，现在会正确校验 `AZURE` 权限。所有 cluster 变体函数 (`-Cluster` 函数) 现在都会针对其对应的非 cluster 版本校验权限。此外，`icebergLocal` 和 `deltaLakeLocal` 函数现在也会强制执行 `FILE` 权限检查。[#84938](https://github.com/ClickHouse/ClickHouse/pull/84938) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 默认启用设置 `allow_dynamic_metadata_for_data_lakes` (table engine 级设置) 。[#85044](https://github.com/ClickHouse/ClickHouse/pull/85044) ([Daniil Ivanik](https://github.com/divanik)) 。
* 默认情况下，在 JSON formats 中不再为 64 位整数加引号。[#74079](https://github.com/ClickHouse/ClickHouse/pull/74079) ([Pavel Kruglov](https://github.com/Avogar))

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

* 已增加对 PromQL 方言的基础支持。要使用该功能，请在 clickhouse-client 中设置 `dialect='promql'`，通过设置 `promql_table_name='X'` 将其指向 TimeSeries 表，然后执行类似 `rate(ClickHouseProfileEvents_ReadCompressedBytes[1m])[5m:1m]` 的查询。此外，还可以用 SQL 封装 PromQL 查询：`SELECT * FROM prometheusQuery('up', ...);`。目前仅支持 `rate`、`delta` 和 `increase` 函数。不支持一元/二元运算符。不支持 HTTP API。 [#75036](https://github.com/ClickHouse/ClickHouse/pull/75036) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 现在，AI 驱动的 SQL 生成功能在可用时可自动从环境变量 ANTHROPIC\_API\_KEY 和 OPENAI\_API\_KEY 中读取，这样我们就能提供开箱即用的零配置选项来使用此功能。[#83787](https://github.com/ClickHouse/ClickHouse/pull/83787) ([Kaushik Iska](https://github.com/iskakaushik)) 。
* 通过添加以下内容，实现对 [ArrowFlight RPC](https://arrow.apache.org/docs/format/Flight.html) 协议的支持：- 新增表函数 `arrowflight`。[#74184](https://github.com/ClickHouse/ClickHouse/pull/74184) ([zakr600](https://github.com/zakr600)) 。
* 现在所有表都支持 `_table` 虚拟列了 (不再仅限于使用 `Merge` 引擎的表) ，这对包含 UNION ALL 的查询尤其有用。[#63665](https://github.com/ClickHouse/ClickHouse/pull/63665) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 允许对外部聚合/排序使用任何存储策略 (即对象存储，如 S3) 。[#84734](https://github.com/ClickHouse/ClickHouse/pull/84734) ([Azat Khuzhin](https://github.com/azat)) 。
* 支持通过显式提供的 IAM 角色进行 AWS S3 身份验证。为 GCS 支持了 OAuth。这些功能此前仅在 ClickHouse Cloud 中可用，现已开源。统一了部分接口，例如对象存储连接参数的序列化。[#84011](https://github.com/ClickHouse/ClickHouse/pull/84011) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Iceberg TableEngine 现已支持位置删除。[#83094](https://github.com/ClickHouse/ClickHouse/pull/83094) ([Daniil Ivanik](https://github.com/divanik)) 。
* 支持 Iceberg 等值删除。[#85843](https://github.com/ClickHouse/ClickHouse/pull/85843) ([Han Fei](https://github.com/hanfei1991)) 。
* 支持 CREATE 的 Iceberg 写入。关闭 [#83927](https://github.com/ClickHouse/ClickHouse/issues/83927)。[#83983](https://github.com/ClickHouse/ClickHouse/pull/83983) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持向 Glue 目录写入。[#84136](https://github.com/ClickHouse/ClickHouse/pull/84136) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持通过 Iceberg REST 目录写入。[#84684](https://github.com/ClickHouse/ClickHouse/pull/84684) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 将所有 Iceberg 位置删除文件合并到数据文件中。这将减少 Iceberg 存储中 Parquet 文件的数量并缩小其大小。语法：`OPTIMIZE TABLE table_name`。 [#85250](https://github.com/ClickHouse/ClickHouse/pull/85250) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持 Iceberg 的 `drop table` (从 REST/Glue 目录中删除表，并移除该表的元数据) 。[#85395](https://github.com/ClickHouse/ClickHouse/pull/85395) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持对 merge-on-read 格式的 Iceberg 执行 ALTER DELETE 删除变更。[#85549](https://github.com/ClickHouse/ClickHouse/pull/85549) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持向 DeltaLake 写入。关闭 [#79603](https://github.com/ClickHouse/ClickHouse/issues/79603)。[#85564](https://github.com/ClickHouse/ClickHouse/pull/85564) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 新增设置 `delta_lake_snapshot_version`，支持在表引擎 `DeltaLake` 中读取特定的快照版本。[#85295](https://github.com/ClickHouse/ClickHouse/pull/85295) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 为支持 min-max 剪枝，在元数据 (清单条目) 中写入更多 Iceberg 统计信息 (列大小、下界和上界) 。[#85746](https://github.com/ClickHouse/ClickHouse/pull/85746) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持在 Iceberg 中对简单类型列进行添加/删除/修改。[#85769](https://github.com/ClickHouse/ClickHouse/pull/85769) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* Iceberg：支持写入 version-hint 文件。此更改解决了 [#85097](https://github.com/ClickHouse/ClickHouse/issues/85097)。[#85130](https://github.com/ClickHouse/ClickHouse/pull/85130) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 由临时用户创建的视图现在会保存实际用户的一个副本，因此在临时用户被删除后也不会失效。[#84763](https://github.com/ClickHouse/ClickHouse/pull/84763) ([pufit](https://github.com/pufit)) 。
* 向量相似度索引现已支持二进制量化。二进制量化可显著降低内存占用，并加快向量索引的构建过程 (因为距离计算速度更快) 。此外，现有设置 `vector_search_postfilter_multiplier `现已废弃，并由更通用的设置 `vector_search_index_fetch_multiplier` 取代。[#85024](https://github.com/ClickHouse/ClickHouse/pull/85024) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 支持在 `s3` 或 `s3Cluster` 表引擎/函数中使用键值参数，例如 `s3('url', CSV, structure = 'a Int32', compression_method = 'gzip')`。[#85134](https://github.com/ClickHouse/ClickHouse/pull/85134) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 一个新的系统表，用于保存来自 Kafka 等引擎的异常传入消息 ("死信队列") 。 [#68873](https://github.com/ClickHouse/ClickHouse/pull/68873) ([Ilya Golshtein](https://github.com/ilejn)).
* 面向 Replicated 数据库的全新 SYSTEM RESTORE DATABASE REPLICA，类似于 ReplicatedMergeTree 中现有的恢复功能。[#73100](https://github.com/ClickHouse/ClickHouse/pull/73100) ([Konstantin Morozov](https://github.com/k-morozov)).
* PostgreSQL 协议现已支持 `COPY` 命令。[#74344](https://github.com/ClickHouse/ClickHouse/pull/74344) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 支持 mysql 协议的 C# 客户端。此更改关闭了 [#83992](https://github.com/ClickHouse/ClickHouse/issues/83992)。[#84397](https://github.com/ClickHouse/ClickHouse/pull/84397) ([Konstantin Vedernikov](https://github.com/scanhex12))。
* 新增对 Hive 分区风格读写的支持。[#76802](https://github.com/ClickHouse/ClickHouse/pull/76802) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 新增 `zookeeper_connection_log` 系统表，用于存储 ZooKeeper 连接的历史信息。[#79494](https://github.com/ClickHouse/ClickHouse/pull/79494) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 服务器级设置 `cpu_slot_preemption` 为工作负载启用抢占式 CPU 调度，并确保各工作负载之间的 CPU 时间按 max-min 公平原则分配。新增了用于 CPU 限流的工作负载设置：`max_cpus`、`max_cpu_share` 和 `max_burst_cpu_seconds`。更多详情：[https://clickhouse.com/docs/operations/workload-scheduling#cpu\&#95;scheduling。\[#80879](https://clickhouse.com/docs/operations/workload-scheduling#cpu\&#95;scheduling。\[#80879)]\([https://github.com/ClickHouse/ClickHouse/pull/80879](https://github.com/ClickHouse/ClickHouse/pull/80879)) ([Sergei Trifonov](https://github.com/serxa)) 。
* 在达到配置的查询次数或时间阈值后，断开 TCP 连接。这样有助于让负载均衡器后方各集群节点之间的连接分布更均匀。解决了 [#68000](https://github.com/ClickHouse/ClickHouse/issues/68000)。[#81472](https://github.com/ClickHouse/ClickHouse/pull/81472) ([Kenny Sun](https://github.com/hwabis)) 。
* 并行副本现已支持查询使用投影。[#82659](https://github.com/ClickHouse/ClickHouse/issues/82659)。[#82807](https://github.com/ClickHouse/ClickHouse/pull/82807) ([zoomxi](https://github.com/zoomxi)) 。
* 除 DESCRIBE (SELECT ...) 外，现已支持 DESCRIBE SELECT。[#82947](https://github.com/ClickHouse/ClickHouse/pull/82947) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 强制为 mysql\_port 和 postgresql\_port 启用安全连接。[#82962](https://github.com/ClickHouse/ClickHouse/pull/82962) ([tiandiwonder](https://github.com/tiandiwonder)) 。
* 现在，你可以使用 `JSONExtractCaseInsensitive` (以及 `JSONExtract` 的其他 Variant) 进行不区分大小写的 JSON 键查找。[#83770](https://github.com/ClickHouse/ClickHouse/pull/83770) ([Alistair Evans](https://github.com/alistairjevans)) 。
* 新增 `system.completions` 表。关闭 [#81889](https://github.com/ClickHouse/ClickHouse/issues/81889)。[#83833](https://github.com/ClickHouse/ClickHouse/pull/83833) ([|2ustam](https://github.com/RuS2m)).
* 新增函数 `nowInBlock64`。示例用法：`SELECT nowInBlock64(6)` 将返回 `2025-07-29 17:09:37.775725`。[#84178](https://github.com/ClickHouse/ClickHouse/pull/84178) ([Halersson Paris](https://github.com/halersson)) 。
* 为 AzureBlobStorage 添加 extra\_credentials，以支持使用 client\_id 和 tenant\_id 进行身份验证。[#84235](https://github.com/ClickHouse/ClickHouse/pull/84235) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 新增函数 `dateTimeToUUIDv7`，用于将 DateTime 值转换为 UUIDv7。示例用法：`SELECT dateTimeToUUIDv7(toDateTime('2025-08-15 18:57:56'))` 返回 `0198af18-8320-7a7d-abd3-358db23b9d5c`。[#84319](https://github.com/ClickHouse/ClickHouse/pull/84319) ([samradovich](https://github.com/samradovich)).
* `timeSeriesDerivToGrid` 和 `timeSeriesPredictLinearToGrid` 聚合函数可将数据重新采样为由指定起始时间戳、结束时间戳和步长定义的时间网格；并分别计算类似 PromQL 的 `deriv` 和 `predict_linear`。[#84328](https://github.com/ClickHouse/ClickHouse/pull/84328) ([Stephen Chi](https://github.com/stephchi0)) 。
* 新增了两个 TimeSeries 函数：- `timeSeriesRange(start_timestamp, end_timestamp, step)`，- `timeSeriesFromGrid(start_timestamp, end_timestamp, step, values)`。 [#85435](https://github.com/ClickHouse/ClickHouse/pull/85435) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 新增语法支持 `GRANT READ ON S3('s3://foo/.*') TO user`。[#84503](https://github.com/ClickHouse/ClickHouse/pull/84503) ([pufit](https://github.com/pufit)) 。
* 新增 `Hash` 作为一种新的输出格式。它会对结果中的所有列和行计算一个哈希值。这对于计算结果的“指纹”很有用，例如在数据传输成为瓶颈的场景中。示例：`SELECT arrayJoin(['abc', 'def']), 42 FORMAT Hash` 返回 `e5f9e676db098fdb9530d2059d8c23ef`。[#84607](https://github.com/ClickHouse/ClickHouse/pull/84607) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增了在 Keeper Multi 查询中设置任意 watch 的功能。[#84964](https://github.com/ClickHouse/ClickHouse/pull/84964) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 为 `clickhouse-benchmark` 工具新增了 `--max-concurrency` 选项，支持一种并行查询数逐步增加的模式。[#85623](https://github.com/ClickHouse/ClickHouse/pull/85623) ([Sergei Trifonov](https://github.com/serxa)) 。
* 支持部分聚合指标。[#85328](https://github.com/ClickHouse/ClickHouse/pull/85328) ([Mikhail Artemenko](https://github.com/Michicosun)) 。

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

* 默认启用关联子查询支持，该功能已不再属于 Experimental。 [#85107](https://github.com/ClickHouse/ClickHouse/pull/85107) ([Dmitry Novik](https://github.com/novikd)).
* Unity、Glue、Rest 和 Hive Metastore 数据湖目录已从 Experimental 提升为 Beta。 [#85848](https://github.com/ClickHouse/ClickHouse/pull/85848) ([Melvyn Peignon](https://github.com/melvynator)).
* 轻量级更新和删除已从 Experimental 提升为 Beta。
* 近似向量搜索及向量相似度索引现已 GA。 [#85888](https://github.com/ClickHouse/ClickHouse/pull/85888) ([Robert Schulze](https://github.com/rschu1ze)).
* Ytsaurus 表引擎和表函数。 [#77606](https://github.com/ClickHouse/ClickHouse/pull/77606) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* 此前，文本索引数据会被拆分为多个分段 (每个分段默认大小为 256 MiB) 。这可能会降低构建文本索引时的内存消耗，但会增加磁盘空间需求，并延长查询响应时间。 [#84590](https://github.com/ClickHouse/ClickHouse/pull/84590) ([Elmi Ahmadov](https://github.com/ahmadov)).

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

* 新的 Parquet 读取器实现。它通常更快，并支持页级过滤器下推和 PREWHERE。目前处于 Experimental 阶段。可使用设置 `input_format_parquet_use_native_reader_v3` 启用。[#82789](https://github.com/ClickHouse/ClickHouse/pull/82789) ([Michael Kolupaev](https://github.com/al13n321)).
* 将 Azure 库中的官方 HTTP 传输层替换为我们为 Azure Blob 存储自行实现的 HTTP 客户端。为该客户端新增了多项设置，与 S3 的设置保持对应。还为 Azure 和 S3 引入了更激进的连接超时设置。增强了对 Azure profile events 和指标的内部信息。新客户端默认启用，可显著降低 Azure Blob 存储上冷查询的延迟。如需切回旧的 `Curl` 客户端，可设置 `azure_sdk_use_native_client=false`。[#83294](https://github.com/ClickHouse/ClickHouse/pull/83294) ([alesapin](https://github.com/alesapin))。此前 Azure 客户端的官方实现由于延迟尖峰严重 (从 5 秒到数分钟不等) ，并不适合用于生产环境。我们已经彻底弃用了那套糟糕的实现，并对此深感自豪。
* 按文件大小从小到大处理索引。总体索引排序会优先考虑 minmax 和向量索引 (分别因为其实现简单和选择性高) ，之后再处理较小的索引。在 minmax/向量索引内部，也同样优先选择较小的索引。[#84094](https://github.com/ClickHouse/ClickHouse/pull/84094) ([Maruth Goyal](https://github.com/maruthgoyal)) 。
* 默认启用 MergeTree 设置 `write_marks_for_substreams_in_compact_parts`。这将显著提升从新创建的 Compact parts 中读取子列的性能。低于 25.5 版本的服务器将无法读取新的 Compact parts。[#84171](https://github.com/ClickHouse/ClickHouse/pull/84171) ([Pavel Kruglov](https://github.com/Avogar)) 。
* `azureBlobStorage` 表引擎：尽可能缓存并复用托管身份的身份验证令牌，以避免限流。[#79860](https://github.com/ClickHouse/ClickHouse/pull/79860) ([Nick Blakely](https://github.com/niblak)) 。
* `ALL` `LEFT/INNER` JOIN 会在右侧可由连接键列唯一确定时自动转换为 `RightAny` (即所有行的连接键值都唯一) 。[#84010](https://github.com/ClickHouse/ClickHouse/pull/84010) ([Nikita Taranov](https://github.com/nickitat)) 。
* 新增 `max_joined_block_size_bytes`，作为 `max_joined_block_size_rows` 的补充，用于限制包含高内存占用列的 JOIN 的内存使用量。[#83869](https://github.com/ClickHouse/ClickHouse/pull/83869) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 新增了一项新逻辑 (由设置 `enable_producing_buckets_out_of_order_in_aggregation` 控制，默认启用) ，允许在内存高效聚合期间乱序发送部分桶。当某些聚合桶的合并耗时明显长于其他桶时，这项改动可提升性能，因为它允许 initiator 在此期间合并 bucket id 更高的桶。缺点是内存占用可能会略有增加 (但应该不明显) 。[#80179](https://github.com/ClickHouse/ClickHouse/pull/80179) ([Nikita Taranov](https://github.com/nickitat)) 。
* 引入了 `optimize_rewrite_regexp_functions` 设置 (默认启用) 。当检测到特定的正则表达式模式时，该设置允许优化器将某些 `replaceRegexpAll`、`replaceRegexpOne` 和 `extract` 调用改写为更简单、更高效的形式。 (问题 [#81981](https://github.com/ClickHouse/ClickHouse/issues/81981)) 。[#81992](https://github.com/ClickHouse/ClickHouse/pull/81992) ([Amos Bird](https://github.com/amosbird)) 。
* 将 `max_joined_block_rows` 的处理移到 hash JOIN 主循环之外。ALL JOIN 性能略有提升。[#83216](https://github.com/ClickHouse/ClickHouse/pull/83216) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 优先处理粒度更细的最小-最大索引。解决了 [#75381](https://github.com/ClickHouse/ClickHouse/issues/75381)。[#83798](https://github.com/ClickHouse/ClickHouse/pull/83798) ([Maruth Goyal](https://github.com/maruthgoyal)) 。
* 使 `DISTINCT` 窗口聚合可在线性时间内运行，并修复了 `sumDistinct` 中的一个缺陷。关闭 [#79792](https://github.com/ClickHouse/ClickHouse/issues/79792)。关闭 [#52253](https://github.com/ClickHouse/ClickHouse/issues/52253)。[#79859](https://github.com/ClickHouse/ClickHouse/pull/79859) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 使用向量相似度索引的向量搜索查询可因减少磁盘读取和 CPU 占用而以更低延迟完成。[#83803](https://github.com/ClickHouse/ClickHouse/pull/83803) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 使用 Rendezvous 哈希提升并行副本间工作负载分布的缓存局部性。 [#82511](https://github.com/ClickHouse/ClickHouse/pull/82511) ([Anton Ivashkin](https://github.com/ianton-ru)).
* 为 If 组合器实现了 `addManyDefaults`，因此带有 If 组合器的聚合函数现在执行速度更快。[#83870](https://github.com/ClickHouse/ClickHouse/pull/83870) ([Raúl Marín](https://github.com/Algunenano)).
* 对多个字符串列或数值列进行 group by 时，按列式方式计算序列化键。 [#83884](https://github.com/ClickHouse/ClickHouse/pull/83884) ([李扬](https://github.com/taiyang-li)).
* 避免了在索引分析为并行副本读取得出空范围时出现全扫描。[#84971](https://github.com/ClickHouse/ClickHouse/pull/84971) ([Eduard Karacharov](https://github.com/korowa)) 。
* 尝试使用 `-falign-functions=64`，以便让性能测试结果更稳定。[#83920](https://github.com/ClickHouse/ClickHouse/pull/83920) ([Azat Khuzhin](https://github.com/azat)) 。
* 布隆过滤器索引现已可用于 `has([c1, c2, ...], column)` 这类条件，其中 `column` 不是 `Array` 类型。这提升了此类查询的性能，使其效率可与 `IN` 运算符媲美。[#83945](https://github.com/ClickHouse/ClickHouse/pull/83945) ([Doron David](https://github.com/dorki)).
* 减少 CompressedReadBufferBase::readCompressedData 中不必要的 memcpy 调用。[#83986](https://github.com/ClickHouse/ClickHouse/pull/83986) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过移除临时数据优化 `largestTriangleThreeBuckets`。[#84479](https://github.com/ClickHouse/ClickHouse/pull/84479) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过简化代码优化字符串反序列化。关闭 [#38564](https://github.com/ClickHouse/ClickHouse/issues/38564)。[#84561](https://github.com/ClickHouse/ClickHouse/pull/84561) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修正了并行副本最小任务大小的计算。[#84752](https://github.com/ClickHouse/ClickHouse/pull/84752) ([Nikita Taranov](https://github.com/nickitat)) 。
* 优化了在 `Join` 模式下应用补丁分区片段的性能。[#85040](https://github.com/ClickHouse/ClickHouse/pull/85040) ([Anton Popov](https://github.com/CurtizJ)) 。
* 移除了零字节。关闭了 [#85062](https://github.com/ClickHouse/ClickHouse/issues/85062)。还修复了一些小问题。函数 `structureToProtobufSchema` 和 `structureToCapnProtoSchema` 未能正确写入以零结尾的字节，而是错误地写入了换行符。这会导致输出中缺少换行，并且在使用其他依赖零字节的函数时 (例如 `logTrace`、`demangle`、`extractURLParameter`、`toStringCutToZero` 以及 `encrypt`/`decrypt`) ，可能引发缓冲区溢出。`regexp_tree` 字典布局不支持处理包含零字节的字符串。使用 `Values` format 调用，或使用任何其他行尾不带换行符的 format 调用时，`formatRowNoNewline` 函数会错误地截掉输出的最后一个字符。函数 `stem` 中存在一个异常安全错误，在极少数情况下可能导致内存泄漏。`initcap` 函数对 `FixedString` 参数的处理方式不正确：如果一个块中的前一个字符串以单词字符结尾，它就无法识别当前字符串开头的单词起始位置。修复了 Apache `ORC` format 中的一个安全漏洞，该漏洞可能导致未初始化内存被暴露。更改了函数 `replaceRegexpAll` 及其对应别名 `REGEXP_REPLACE` 的行为：现在即使前一个匹配已经处理了整个字符串，它也可以在字符串末尾进行空匹配，例如 `^a*|a*$` 或 `^|.*` 这类情况——这与 JavaScript、Perl、Python、PHP、Ruby 的语义一致，但与 PostgreSQL 的语义不同。许多函数的实现已经简化并优化。若干函数的文档原先有误，现已修正。请注意，`byteSize` 对 `String` 列以及由 `String` 列组成的复杂 types 的输出已经发生变化 (从每个空字符串 9 字节变为每个空字符串 8 字节) ，这是正常的。[#85063](https://github.com/ClickHouse/ClickHouse/pull/85063) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 优化仅为返回单行而进行常量物化时的处理。[#85071](https://github.com/ClickHouse/ClickHouse/pull/85071) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过 delta-kernel-rs 后端改进并行文件处理。[#85642](https://github.com/ClickHouse/ClickHouse/pull/85642) ([Azat Khuzhin](https://github.com/azat)) 。
* 已引入一项新设置 enable\_add\_distinct\_to\_in\_subqueries。启用后，ClickHouse 会自动为分布式查询的 IN 子句中的子查询添加 DISTINCT。这可以显著减小分片间传输的临时表大小，并提高网络效率。注意：这是一种权衡——虽然网络传输减少了，但每个节点都需要执行额外的合并 (去重) 工作。当网络传输成为瓶颈且合并成本可以接受时，建议启用此设置。[#81908](https://github.com/ClickHouse/ClickHouse/pull/81908) ([fhw12345](https://github.com/fhw12345)).
* 减少可执行用户自定义函数的查询内存跟踪开销。 [#83929](https://github.com/ClickHouse/ClickHouse/pull/83929) ([Eduard Karacharov](https://github.com/korowa)).
* 在 `DeltaLake` 存储中实现内部 `delta-kernel-rs` 过滤 (统计信息和分区剪枝) 。[#84006](https://github.com/ClickHouse/ClickHouse/pull/84006) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 更细粒度地禁用依赖于被即时变更或补丁分区片段更新的列的跳过索引。现在，跳过索引只会在受即时变更或补丁分区片段影响的 parts 中不使用；此前，这些索引会在所有 parts 中被禁用。[#84241](https://github.com/ClickHouse/ClickHouse/pull/84241) ([Anton Popov](https://github.com/CurtizJ)) 。
* 仅为加密命名集合中的 encrypted\_buffer 分配所需的最小内存。[#84432](https://github.com/ClickHouse/ClickHouse/pull/84432) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 改进了对 bloom filter 索引 (常规、ngram 和标记) 的支持：当第一个参数为常量数组 (集合) ，第二个参数为已建立索引的列 (子集) 时，也可以利用这些索引，从而提升查询执行效率。[#84700](https://github.com/ClickHouse/ClickHouse/pull/84700) ([Doron David](https://github.com/dorki)).
* 减少 Keeper 中存储锁争用。[#84732](https://github.com/ClickHouse/ClickHouse/pull/84732) ([Antonio Andelic](https://github.com/antonio2368)).
* 为 `WHERE` 补上缺失的 `read_in_order_use_virtual_row` 支持。这样一来，对于过滤器未能完全下推到 `PREWHERE` 的查询，可以跳过继续读取更多 parts。[#84835](https://github.com/ClickHouse/ClickHouse/pull/84835) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 支持从 Iceberg 表中异步迭代对象，无需为每个数据文件显式存储对象。[#85369](https://github.com/ClickHouse/ClickHouse/pull/85369) ([Daniil Ivanik](https://github.com/divanik)) 。
* 将非相关的 `EXISTS` 作为标量子查询执行。这样可以使用标量子查询缓存，并对结果进行常量折叠，有助于索引优化。为兼容起见，新增了设置 `execute_exists_as_scalar_subquery=1`。[#85481](https://github.com/ClickHouse/ClickHouse/pull/85481) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。

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

* 新增了 `database_replicated` 设置，用于定义 DatabaseReplicatedSettings 的默认值。如果在 Replicated DB 的 CREATE 查询中未指定该设置，则会使用此设置中的值。[#85127](https://github.com/ClickHouse/ClickHouse/pull/85127) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 现在可调整 Web UI (play) 中表列的宽度。[#84012](https://github.com/ClickHouse/ClickHouse/pull/84012) ([Doron David](https://github.com/dorki)) 。
* 支持通过 `iceberg_metadata_compression_method` 设置处理压缩的 `.metadata.json` 文件。它支持所有 ClickHouse 压缩方法。此改动关闭了 [#84895](https://github.com/ClickHouse/ClickHouse/issues/84895)。[#85196](https://github.com/ClickHouse/ClickHouse/pull/85196) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 在 `EXPLAIN indexes = 1` 的输出中显示待读取的范围数量。[#79938](https://github.com/ClickHouse/ClickHouse/pull/79938) ([Christoph Wurm](https://github.com/cwurm)) 。
* 新增了用于设置 ORC 压缩块大小的设置项，并将其默认值从 64KB 调整为 256KB，以与 Spark 和 Hive 保持一致。 [#80602](https://github.com/ClickHouse/ClickHouse/pull/80602) ([李扬](https://github.com/taiyang-li)).
* 在 Wide part 中新增 `columns_substreams.txt` 文件，用于跟踪存储在该 part 中的所有子流。这样可以跟踪 JSON 和 Dynamic 类型中的动态流，从而无需为了获取动态流列表而读取这些列的样本 (例如在计算列大小时) 。此外，现在所有动态流都会显示在 `system.parts_columns` 中。[#81091](https://github.com/ClickHouse/ClickHouse/pull/81091) ([Pavel Kruglov](https://github.com/Avogar)).
* 为 `clickhouse format` 新增 CLI 标志 --show\_secrets，以默认隐藏敏感数据。[#81524](https://github.com/ClickHouse/ClickHouse/pull/81524) ([Nikolai Ryzhov](https://github.com/Dolaxom)) 。
* 为避免 `max_remote_read_network_bandwidth_for_server` 和 `max_remote_write_network_bandwidth_for_server` 限流带来的问题，S3 读写请求现在会在 HTTP 套接字层级进行限流 (而不是针对整个 S3 请求) 。[#81837](https://github.com/ClickHouse/ClickHouse/pull/81837) ([Sergei Trifonov](https://github.com/serxa)).
* 允许在不同窗口 (用于窗口函数) 中对同一列混用不同的排序规则。[#82877](https://github.com/ClickHouse/ClickHouse/pull/82877) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 新增了一个用于模拟、可视化和比较合并选择器的工具。[#71496](https://github.com/ClickHouse/ClickHouse/pull/71496) ([Sergei Trifonov](https://github.com/serxa)) 。
* 增加了对 `remote*` 表函数与并行副本配合使用的支持，前提是 `address_expression` 参数中提供了集群。同时还修复了 [#73295](https://github.com/ClickHouse/ClickHouse/issues/73295)。[#82904](https://github.com/ClickHouse/ClickHouse/pull/82904) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 将所有与写入备份文件相关的日志消息级别都设为 TRACE。[#82907](https://github.com/ClickHouse/ClickHouse/pull/82907) ([Hans Krutzer](https://github.com/hkrutzer)) 。
* 名称不常见的用户自定义函数和编解码器，可能会被 SQL 格式化器格式化得不一致。此更改关闭了 [#83092](https://github.com/ClickHouse/ClickHouse/issues/83092)。[#83644](https://github.com/ClickHouse/ClickHouse/pull/83644) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，您可以在 JSON 类型中使用 Time 和 Time64 类型了。[#83784](https://github.com/ClickHouse/ClickHouse/pull/83784) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 使用并行副本的 JOIN 现已采用 join 逻辑步骤。如果使用并行副本的 join 查询出现任何问题，请尝试 `SET query_plan_use_new_logical_join_step=0`，并提交问题报告。[#83801](https://github.com/ClickHouse/ClickHouse/pull/83801) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了 cluster\_function\_process\_archive\_on\_multiple\_nodes 的兼容性问题。[#83968](https://github.com/ClickHouse/ClickHouse/pull/83968) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持在 `S3Queue` 表级别更改 mv 的 insert 设置。新增 `S3Queue` 级别设置：`min_insert_block_size_rows_for_materialized_views` 和 `min_insert_block_size_bytes_for_materialized_views`。默认情况下将使用 profile 级别设置，`S3Queue` 级别设置会覆盖这些设置。[#83971](https://github.com/ClickHouse/ClickHouse/pull/83971) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 新增了 profile 事件 `MutationAffectedRowsUpperBound`，用于显示变更中受影响的行数 (例如，在 `ALTER UPDATE` 或 `ALTER DELETE` 查询中满足条件的总行数) 。[#83978](https://github.com/ClickHouse/ClickHouse/pull/83978) ([Anton Popov](https://github.com/CurtizJ)) 。
* 使用 cgroup 提供的信息 (如适用，即启用了 `memory_worker_use_cgroup` 且 cgroups 可用时) 来校正内存跟踪器 (`memory_worker_correct_memory_tracker`) 。[#83981](https://github.com/ClickHouse/ClickHouse/pull/83981) ([Azat Khuzhin](https://github.com/azat)).
* MongoDB：字符串到数值类型的隐式解析。此前，如果从 MongoDB source 接收到的某个字符串值对应 ClickHouse 表中的数值列，则会抛出异常。现在，引擎会自动尝试从该字符串中解析出数值。关闭 [#81167](https://github.com/ClickHouse/ClickHouse/issues/81167)。[#84069](https://github.com/ClickHouse/ClickHouse/pull/84069) ([Kirill Nikiforov](https://github.com/allmazz)) 。
* 在 `Pretty` 格式中高亮显示 `Nullable` 数值的数字分组。[#84070](https://github.com/ClickHouse/ClickHouse/pull/84070) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 仪表板：悬浮提示框在顶部显示时不会超出容器范围。[#84072](https://github.com/ClickHouse/ClickHouse/pull/84072) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 仪表板上的圆点看起来稍微更美观了一些。[#84074](https://github.com/ClickHouse/ClickHouse/pull/84074) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Dashboard 的 favicon 现在稍微好看了一些。[#84076](https://github.com/ClickHouse/ClickHouse/pull/84076) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Web UI：让浏览器能够保存密码。此外，还会记住 URL 值。[#84087](https://github.com/ClickHouse/ClickHouse/pull/84087) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增支持通过 `apply_to_children` 配置，在特定 Keeper 节点上应用额外的 ACL。[#84137](https://github.com/ClickHouse/ClickHouse/pull/84137) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了 MergeTree 中 "compact" Variant 判别符序列化的使用问题。此前在某些本可使用该序列化的情况下并未使用它。[#84141](https://github.com/ClickHouse/ClickHouse/pull/84141) ([Pavel Kruglov](https://github.com/Avogar)).
* 在数据库的 replicated 设置中新增了一个服务器设置 `logs_to_keep`，可用于更改 Replicated 数据库默认的 `logs_to_keep` 参数。较小的值会减少 ZNode 的数量 (尤其是在数据库较多时) ，而较大的值则允许缺失的副本在更长时间后补齐进度。[#84183](https://github.com/ClickHouse/ClickHouse/pull/84183) ([Alexey Khatskevich](https://github.com/Khatskevich)).
* 添加设置 `json_type_escape_dots_in_keys`，用于在解析 JSON 类型时转义 JSON 键中的点号。该设置默认处于禁用状态。[#84207](https://github.com/ClickHouse/ClickHouse/pull/84207) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在检查 EOF 之前，先检查连接是否已取消，以避免从已关闭的连接中读取数据。修复了 [#83893](https://github.com/ClickHouse/ClickHouse/issues/83893)。[#84227](https://github.com/ClickHouse/ClickHouse/pull/84227) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* Web UI 中的文本选中颜色略有改进。只有在深色模式下，被选中的表格单元格里，这一差异才比较明显。在之前的版本中，文本与选中背景之间的对比度不足。[#84258](https://github.com/ClickHouse/ClickHouse/pull/84258) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过简化内部检查，改进了服务器关闭时对客户端连接的处理方式。[#84312](https://github.com/ClickHouse/ClickHouse/pull/84312) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 新增了一个设置 `delta_lake_enable_expression_visitor_logging`，可用于关闭 expression visitor 日志，因为在调试时，这些日志即使在测试日志级别下也可能过于冗长。[#84315](https://github.com/ClickHouse/ClickHouse/pull/84315) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 现在，cgroup 级指标和系统级指标统一上报。cgroup 级指标命名为 `CGroup<Metric>`，操作系统级指标 (从 procfs 采集) 命名为 `OS<Metric>`。[#84317](https://github.com/ClickHouse/ClickHouse/pull/84317) ([Nikita Taranov](https://github.com/nickitat)) 。
* Web UI 中的图表略有改进。虽然改动不大，但确实更好了。[#84326](https://github.com/ClickHouse/ClickHouse/pull/84326) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 Replicated database 设置 `max_retries_before_automatic_recovery` 的默认值改为 10，以便在某些情况下能更快恢复。[#84369](https://github.com/ClickHouse/ClickHouse/pull/84369) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 修复了 `CREATE USER` 搭配查询参数时的格式化问题 (即 `CREATE USER {username:Identifier} IDENTIFIED WITH no_password`) 。[#84376](https://github.com/ClickHouse/ClickHouse/pull/84376) ([Azat Khuzhin](https://github.com/azat)) 。
* 引入 `backup_restore_s3_retry_initial_backoff_ms`、`backup_restore_s3_retry_max_backoff_ms` 和 `backup_restore_s3_retry_jitter_factor`，用于配置备份和恢复操作期间使用的 S3 重试退避策略。[#84421](https://github.com/ClickHouse/ClickHouse/pull/84421) ([Julia Kartseva](https://github.com/jkartseva)) 。
* S3Queue 有序模式修复：如果已调用 shutdown，则提前退出。[#84463](https://github.com/ClickHouse/ClickHouse/pull/84463) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持 Iceberg 写入时从 pyiceberg 读取。[#84466](https://github.com/ClickHouse/ClickHouse/pull/84466) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 允许在将 `IN` / `GLOBAL IN` 过滤器下推到 KeyValue 存储的主键 (如 EmbeddedRocksDB、KeeperMap) 时，对 Set 值进行类型转换。[#84515](https://github.com/ClickHouse/ClickHouse/pull/84515) ([Eduard Karacharov](https://github.com/korowa)) 。
* 将 chdig 更新至 [25.7.1](https://github.com/azat/chdig/releases/tag/v25.7.1)。[#84521](https://github.com/ClickHouse/ClickHouse/pull/84521) ([Azat Khuzhin](https://github.com/azat)) 。
* UDF 执行期间发生的底层错误现在会统一返回错误代码 `UDF_EXECUTION_FAILED`，而此前可能返回不同的错误代码。[#84547](https://github.com/ClickHouse/ClickHouse/pull/84547) ([Xu Jia](https://github.com/XuJia0210)) 。
* 为 KeeperClient 添加 `get_acl` 命令。[#84641](https://github.com/ClickHouse/ClickHouse/pull/84641) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 为数据湖表引擎新增快照版本。[#84659](https://github.com/ClickHouse/ClickHouse/pull/84659) ([Pete Hampton](https://github.com/pjhampton)) 。
* 新增了一个用于度量 `ConcurrentBoundedQueue` 大小的指标，并按队列类型 (即该队列的用途) 和队列 id (即该队列当前实例随机生成的 id) 加以标记。[#84675](https://github.com/ClickHouse/ClickHouse/pull/84675) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* `system.columns` 表现已提供 `column` 作为现有 `name` 列的别名。[#84695](https://github.com/ClickHouse/ClickHouse/pull/84695) ([Yunchi Pang](https://github.com/yunchipang)) 。
* 新的 MergeTree 设置 `search_orphaned_parts_drives`，用于限制查找 parts 的范围，例如可按带有本地元数据的磁盘来查找。[#84710](https://github.com/ClickHouse/ClickHouse/pull/84710) ([Ilya Golshtein](https://github.com/ilejn)).
* 在 Keeper 中新增了 4LW `lgrq`，用于切换对已接收请求的日志记录。[#84719](https://github.com/ClickHouse/ClickHouse/pull/84719) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 以不区分大小写的方式匹配外部身份验证的 forward\_headers。[#84737](https://github.com/ClickHouse/ClickHouse/pull/84737) ([ingodwerust](https://github.com/ingodwerust)) 。
* `encrypt_decrypt` 工具现已支持加密 ZooKeeper 连接。[#84764](https://github.com/ClickHouse/ClickHouse/pull/84764) ([Roman Vasin](https://github.com/rvasin)).
* 向 `system.errors` 新增格式字符串列。该列用于在告警规则中按相同错误类型分组。[#84776](https://github.com/ClickHouse/ClickHouse/pull/84776) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 已更新 `clickhouse-format`，现支持将 `--highlight` 用作 `--hilite` 的别名。- 已更新 `clickhouse-client`，现支持将 `--hilite` 用作 `--highlight` 的别名。- 已更新 `clickhouse-format` 文档，以反映此更改。 [#84806](https://github.com/ClickHouse/ClickHouse/pull/84806) ([Rishabh Bhardwaj](https://github.com/rishabh1815769)).
* 修复 Iceberg 在复杂类型中按字段 ID 读取时的问题。[#84821](https://github.com/ClickHouse/ClickHouse/pull/84821) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 引入新的 `backup_slow_all_threads_after_retryable_s3_error` 设置，在由 `SlowDown` 等错误引发的重试风暴期间，一旦检测到单个可重试错误，就会减慢所有线程，从而降低 S3 的压力。[#84854](https://github.com/ClickHouse/ClickHouse/pull/84854) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 在 Replicated DB 中，跳过为非追加式 RMV DDL 创建和重命名旧临时表。[#84858](https://github.com/ClickHouse/ClickHouse/pull/84858) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 使用 `keeper_server.coordination_settings.latest_logs_cache_entry_count_threshold` 和 `keeper_server.coordination_settings.commit_logs_cache_entry_count_threshold`，按条目数限制 Keeper 日志条目缓存的大小。[#84877](https://github.com/ClickHouse/ClickHouse/pull/84877) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 允许在不受支持的架构上使用 `simdjson` (此前会导致 `CANNOT_ALLOCATE_MEMORY` 错误) 。[#84966](https://github.com/ClickHouse/ClickHouse/pull/84966) ([Azat Khuzhin](https://github.com/azat)) 。
* 异步日志：让各项限制可调，并添加内部信息。[#85105](https://github.com/ClickHouse/ClickHouse/pull/85105) ([Raúl Marín](https://github.com/Algunenano)).
* 汇总所有已删除对象，以执行一次对象存储删除操作。[#85316](https://github.com/ClickHouse/ClickHouse/pull/85316) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* Iceberg 当前对位置删除文件的实现会将所有数据保存在 RAM 中。如果位置删除文件很大 (通常确实如此) ，开销会非常高。我的实现只将 Parquet 删除文件的最后一个行组保存在 RAM 中，成本显著更低。[#85329](https://github.com/ClickHouse/ClickHouse/pull/85329) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* chdig：修复屏幕残留显示问题，修复在编辑器中编辑查询后发生崩溃的问题，在 `path` 中搜索 `editor`，更新至 [25.8.1](https://github.com/azat/chdig/releases/tag/v25.8.1)。[#85341](https://github.com/ClickHouse/ClickHouse/pull/85341) ([Azat Khuzhin](https://github.com/azat)) 。
* 在 Azure 配置中补充缺失的 `partition_columns_in_data_file`。[#85373](https://github.com/ClickHouse/ClickHouse/pull/85373) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 允许在函数 `timeSeries*ToGrid` 中将 step 设为 0。这是 [#75036](https://github.com/ClickHouse/ClickHouse/pull/75036) 的一部分。[#85390](https://github.com/ClickHouse/ClickHouse/pull/85390) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 新增了 show\_data\_lake\_catalogs\_in\_system\_tables 标志，用于控制是否在 system.tables 中添加数据湖表。解决了 [#85384](https://github.com/ClickHouse/ClickHouse/issues/85384)。[#85411](https://github.com/ClickHouse/ClickHouse/pull/85411) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 新增了对 `remote_fs_zero_copy_zookeeper_path` 中宏展开的支持。[#85437](https://github.com/ClickHouse/ClickHouse/pull/85437) ([Mikhail Koviazin](https://github.com/mkmkme)) 。
* clickhouse-client 中的 AI 显示效果会略有改善。[#85447](https://github.com/ClickHouse/ClickHouse/pull/85447) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认对旧版部署启用 trace\_log.symbolize。 [#85456](https://github.com/ClickHouse/ClickHouse/pull/85456) ([Azat Khuzhin](https://github.com/azat)).
* 支持解析更多复合标识符的情况。尤其改进了 `ARRAY JOIN` 与旧版 analyzer 的兼容性。引入了一个新设置 `analyzer_compatibility_allow_compound_identifiers_in_unflatten_nested`，以保留旧有行为。[#85492](https://github.com/ClickHouse/ClickHouse/pull/85492) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 获取 system.columns 中表列大小时会忽略 UNKNOWN\_DATABASE。[#85632](https://github.com/ClickHouse/ClickHouse/pull/85632) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增了一个限制 (表设置 `max_uncompressed_bytes_in_patches`) ，用于限制补丁分区片段中未压缩字节的总量。这可以防止轻量级更新后 SELECT 查询明显变慢，也能防止轻量级更新可能被滥用。[#85641](https://github.com/ClickHouse/ClickHouse/pull/85641) ([Anton Popov](https://github.com/CurtizJ)).
* 向 `system.grants` 添加 `parameter` 列，用于确定 `GRANT READ/WRITE` 的源类型，以及 `GRANT TABLE ENGINE` 的表引擎。[#85643](https://github.com/ClickHouse/ClickHouse/pull/85643) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 修复了 CREATE DICTIONARY 查询中带参数的列 (例如 Decimal(8)) 之后尾随逗号的解析问题。关闭 [#85586](https://github.com/ClickHouse/ClickHouse/issues/85586)。[#85653](https://github.com/ClickHouse/ClickHouse/pull/85653) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 函数 `nested` 现已支持内层数组。[#85719](https://github.com/ClickHouse/ClickHouse/pull/85719) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 现在，外部库进行的所有内存分配都已对 ClickHouse 的内存跟踪器可见，并会被正确计入。这可能会导致某些查询报告的内存使用量“增加”，或出现 `MEMORY_LIMIT_EXCEEDED` 错误。[#84082](https://github.com/ClickHouse/ClickHouse/pull/84082) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 此 PR 修复了通过 REST catalog 查询 Iceberg 表时的元数据解析问题。 ... [#80562](https://github.com/ClickHouse/ClickHouse/pull/80562) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)).
* 修复了 DDLWorker 和 DatabaseReplicatedDDLWorker 中的 markReplicasActive 问题。 [#81395](https://github.com/ClickHouse/ClickHouse/pull/81395) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了解析失败时 Dynamic 列回滚的问题。[#82169](https://github.com/ClickHouse/ClickHouse/pull/82169) ([Pavel Kruglov](https://github.com/Avogar)).
* 如果函数 `trim` 以全常量输入调用，现在会产生常量输出字符串。 (问题 [#78796](https://github.com/ClickHouse/ClickHouse/issues/78796)) 。[#82900](https://github.com/ClickHouse/ClickHouse/pull/82900) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复了在启用 `optimize_syntax_fuse_functions` 时重复子查询导致的逻辑错误，关闭 [#75511](https://github.com/ClickHouse/ClickHouse/issues/75511)。[#83300](https://github.com/ClickHouse/ClickHouse/pull/83300) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在启用查询条件缓存 (设置 `use_query_condition_cache`) 时，带有 `WHERE ... IN (<subquery>)` 子句的查询返回错误结果的问题。[#83445](https://github.com/ClickHouse/ClickHouse/pull/83445) ([LB7666](https://github.com/acking-you)).
* 此前，`gcs` 函数无需任何访问权限即可使用。现在，使用时会检查是否具有 `GRANT READ ON S3` 权限。关闭 [#70567](https://github.com/ClickHouse/ClickHouse/issues/70567)。[#83503](https://github.com/ClickHouse/ClickHouse/pull/83503) ([pufit](https://github.com/pufit)) 。
* 在从 s3Cluster() 执行 INSERT SELECT 并写入 replicated MergeTree 时，跳过不可用节点。[#83676](https://github.com/ClickHouse/ClickHouse/pull/83676) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了在使用 `plain_rewritable`/`plain` 元数据类型时，以 append 方式写入的问题 (在用于实验性事务的 MergeTree 中) ；此前这些类型会被直接忽略。[#83695](https://github.com/ClickHouse/ClickHouse/pull/83695) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 对 Avro Schema Registry 的身份验证详细信息进行掩码处理，使用户或日志中都无法看到。[#83713](https://github.com/ClickHouse/ClickHouse/pull/83713) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了以下问题：如果在创建 MergeTree 表时使用了 `add_minmax_index_for_numeric_columns=1` 或 `add_minmax_index_for_string_columns=1`，随后又在 ALTER 操作期间将该索引物化，就会导致 Replicated 数据库无法在新副本上正确完成初始化。[#83751](https://github.com/ClickHouse/ClickHouse/pull/83751) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了 Parquet 写入器针对 Decimal 类型输出错误统计信息 (最小值/最大值) 的问题。[#83754](https://github.com/ClickHouse/ClickHouse/pull/83754) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 `LowCardinality(Float32|Float64|BFloat16)` 类型中 NaN 值的排序异常。[#83786](https://github.com/ClickHouse/ClickHouse/pull/83786) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 从备份恢复时，定义者用户可能未被备份，进而导致整个备份无法使用。为解决此问题，我们将 restore 期间创建目标表时的权限检查推迟到运行时才执行。[#83818](https://github.com/ClickHouse/ClickHouse/pull/83818) ([pufit](https://github.com/pufit)) 。
* 修复了客户端在错误的 INSERT 后因连接仍处于断开状态而崩溃的问题。[#83842](https://github.com/ClickHouse/ClickHouse/pull/83842) ([Azat Khuzhin](https://github.com/azat)).
* 在启用 analyzer 的情况下，允许在 `remote` 表函数的 `view(...)` 参数中引用任意表。修复了 [#78717](https://github.com/ClickHouse/ClickHouse/issues/78717)。修复了 [#79377](https://github.com/ClickHouse/ClickHouse/issues/79377)。[#83844](https://github.com/ClickHouse/ClickHouse/pull/83844) ([Dmitry Novik](https://github.com/novikd)) 。
* jsoneachrowwithprogress 中的 Onprogress 调用现已改为与最终化过程同步。[#83879](https://github.com/ClickHouse/ClickHouse/pull/83879) ([Sema Checherinda](https://github.com/CheSema)) 。
* 这已修复 [#81303](https://github.com/ClickHouse/ClickHouse/issues/81303)。[#83892](https://github.com/ClickHouse/ClickHouse/pull/83892) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复 `colorSRGBToOKLCH`/`colorOKLCHToSRGB` 在 const 与非 const 参数混用时的问题。[#83906](https://github.com/ClickHouse/ClickHouse/pull/83906) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在 RowBinary 格式中写入包含 NULL 值的 JSON 路径时出现的问题。[#83923](https://github.com/ClickHouse/ClickHouse/pull/83923) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 已修复从 Date 转换为 DateTime64 时大值 (>2106-02-07) 发生溢出的问题。[#83982](https://github.com/ClickHouse/ClickHouse/pull/83982) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 始终应用 `filesystem_prefetches_limit` (而不仅限于 `MergeTreePrefetchedReadPool`) 。[#83999](https://github.com/ClickHouse/ClickHouse/pull/83999) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一个罕见问题：`MATERIALIZE COLUMN` 查询可能会导致 `checksums.txt` 中出现意外的文件，并最终使数据分区片段进入 detached 状态。[#84007](https://github.com/ClickHouse/ClickHouse/pull/84007) ([alesapin](https://github.com/alesapin)).
* 修复了在不等式条件上执行 JOIN 时的逻辑错误 `Expected single dictionary argument for function`：当其中一列为 `LowCardinality`、另一列为常量时，会出现该错误。关闭 [#81779](https://github.com/ClickHouse/ClickHouse/issues/81779)。[#84019](https://github.com/ClickHouse/ClickHouse/pull/84019) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `clickhouse client` 在交互模式下启用语法高亮时发生崩溃的问题。[#84025](https://github.com/ClickHouse/ClickHouse/pull/84025) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了在查询条件缓存与递归 CTE 一起使用时返回错误结果的问题 (问题 [#81506](https://github.com/ClickHouse/ClickHouse/issues/81506)) 。[#84026](https://github.com/ClickHouse/ClickHouse/pull/84026) ([zhongyuankai](https://github.com/zhongyuankai)) 。
* 在定期进行 parts 刷新时妥善处理异常。[#84083](https://github.com/ClickHouse/ClickHouse/pull/84083) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在相等操作数类型不同或引用常量时，将过滤器合并到 JOIN 条件中的问题。修复了 [#83432](https://github.com/ClickHouse/ClickHouse/issues/83432)。[#84145](https://github.com/ClickHouse/ClickHouse/pull/84145) ([Dmitry Novik](https://github.com/novikd)).
* 修复一种罕见的 ClickHouse 崩溃问题：当表包含 projection、`lightweight_mutation_projection_mode = 'rebuild'`，且用户执行会删除表中任意块全部行的 lighweight delete 时，可能会触发该问题。[#84158](https://github.com/ClickHouse/ClickHouse/pull/84158) ([alesapin](https://github.com/alesapin)) 。
* 修复由后台取消检查线程导致的死锁。[#84203](https://github.com/ClickHouse/ClickHouse/pull/84203) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了对无效 `WINDOW` 定义进行分析时出现无限递归的问题。修复了 [#83131](https://github.com/ClickHouse/ClickHouse/issues/83131)。[#84242](https://github.com/ClickHouse/ClickHouse/pull/84242) ([Dmitry Novik](https://github.com/novikd)).
* 修复了一个导致 Bech32 编码和解码不正确的缺陷。该问题最初未被发现，是因为用于测试的算法在线实现也存在同样的问题。[#84257](https://github.com/ClickHouse/ClickHouse/pull/84257) ([George Larionov](https://github.com/george-larionov)).
* 修复了 `array()` 函数中空元组构造错误的问题。此修复解决了 [#84202](https://github.com/ClickHouse/ClickHouse/issues/84202)。[#84297](https://github.com/ClickHouse/ClickHouse/pull/84297) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在启用并行副本且查询包含多个 INNER join、后接 RIGHT join 时出现的 `LOGICAL_ERROR`。对于此类查询，请勿使用并行副本。[#84299](https://github.com/ClickHouse/ClickHouse/pull/84299) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 此前，`set` 索引在检查粒度是否满足过滤器条件时，不会考虑 `Nullable` 列 (问题 [#75485](https://github.com/ClickHouse/ClickHouse/issues/75485)) 。[#84305](https://github.com/ClickHouse/ClickHouse/pull/84305) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 现在 ClickHouse 可以从 Glue Catalog 读取表类型以小写形式指定的表。[#84316](https://github.com/ClickHouse/ClickHouse/pull/84316) ([alesapin](https://github.com/alesapin)).
* 在存在 JOIN 或子查询时，不要尝试将表函数替换为其集群版本。[#84335](https://github.com/ClickHouse/ClickHouse/pull/84335) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复 `IAccessStorage` 中 `logger` 的使用问题。[#84365](https://github.com/ClickHouse/ClickHouse/pull/84365) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了轻量级更新中的一个逻辑错误：该错误会更新表中的所有列。[#84380](https://github.com/ClickHouse/ClickHouse/pull/84380) ([Anton Popov](https://github.com/CurtizJ)).
* `DoubleDelta` codec 现在只能用于数值类型的列。尤其是，`FixedString` 列已不能再使用 `DoubleDelta` 进行压缩。 (修复了 [#80220](https://github.com/ClickHouse/ClickHouse/issues/80220)) 。[#84383](https://github.com/ClickHouse/ClickHouse/pull/84383) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 在评估 `MinMax` 索引时，与 nan 值的比较未使用正确的范围。[#84386](https://github.com/ClickHouse/ClickHouse/pull/84386) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 修复了在惰性物化场景下读取 Variant 列的问题。[#84400](https://github.com/ClickHouse/ClickHouse/pull/84400) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 将 `zoutofmemory` 归类为硬件错误，否则会抛出逻辑错误。参见 [https://github.com/clickhouse/clickhouse-core-incidents/issues/877。\[#84420](https://github.com/clickhouse/clickhouse-core-incidents/issues/877。\[#84420)]\([https://github.com/ClickHouse/ClickHouse/pull/84420](https://github.com/ClickHouse/ClickHouse/pull/84420)) ([Han Fei](https://github.com/hanfei1991)) 。
* 修复了以下问题：当使用 `no_password` 创建的用户在服务器级设置 `allow_no_password` 被改为 0 后尝试登录时，会导致服务器崩溃。[#84426](https://github.com/ClickHouse/ClickHouse/pull/84426) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 修复 Keeper 更新日志中的乱序写入问题。此前，更新日志可能存在进行中的写入操作，但回滚可能会并发修改目标文件。这会导致日志不一致，并可能造成数据丢失。[#84434](https://github.com/ClickHouse/ClickHouse/pull/84434) ([Antonio Andelic](https://github.com/antonio2368)).
* 现在，如果从表中移除了所有生存时间 (TTL)，MergeTree 将不再执行任何与 TTL 相关的操作。[#84441](https://github.com/ClickHouse/ClickHouse/pull/84441) ([alesapin](https://github.com/alesapin)).
* 此前允许并行分布式 INSERT SELECT 搭配 LIMIT 使用，但这是不正确的，会导致目标表中的数据重复。[#84477](https://github.com/ClickHouse/ClickHouse/pull/84477) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 修复了数据湖中基于虚拟列进行文件剪枝的问题。[#84520](https://github.com/ClickHouse/ClickHouse/pull/84520) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复 Keeper 使用 rocksdb 存储时的泄漏问题 (迭代器未销毁) 。[#84523](https://github.com/ClickHouse/ClickHouse/pull/84523) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 ALTER MODIFY ORDER BY 未校验排序键中生存时间 (TTL)列的问题。现在，在 ALTER 操作期间，如果在 ORDER BY 子句中使用生存时间 (TTL)列，将会被正确拒绝，从而防止潜在的表损坏。[#84536](https://github.com/ClickHouse/ClickHouse/pull/84536) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 为确保兼容性，将 `allow_experimental_delta_kernel_rs` 的值调整为 25.5 之前的 `false`。[#84587](https://github.com/ClickHouse/ClickHouse/pull/84587) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 不再从 manifest 文件中获取 schema，而是为每个 snapshot 单独存储相关 schema。根据每个 data file 对应的 snapshot 推断其相关 schema。此前的行为违反了 Iceberg 对于具有 existing 状态的 manifest 文件条目的规范。[#84588](https://github.com/ClickHouse/ClickHouse/pull/84588) ([Daniil Ivanik](https://github.com/divanik)).
* 修复了一个问题：当 Keeper 设置 `rotate_log_storage_interval = 0` 时，会导致 ClickHouse 崩溃。 (问题 [#83975](https://github.com/ClickHouse/ClickHouse/issues/83975)) 。[#84637](https://github.com/ClickHouse/ClickHouse/pull/84637) ([George Larionov](https://github.com/george-larionov)) 。
* 修复 S3Queue 中 “Table is already registered” 的逻辑错误。关闭 [#84433](https://github.com/ClickHouse/ClickHouse/issues/84433)。在 [https://github.com/ClickHouse/ClickHouse/pull/83530](https://github.com/ClickHouse/ClickHouse/pull/83530) 合入后失效。[#84677](https://github.com/ClickHouse/ClickHouse/pull/84677) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在 RefreshTask 中从 'view' 获取 zookeeper 时对 'mutex' 加锁。[#84699](https://github.com/ClickHouse/ClickHouse/pull/84699) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复惰性列与外部排序配合使用时出现的 `CORRUPTED_DATA` 错误。[#84738](https://github.com/ClickHouse/ClickHouse/pull/84738) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复存储 `DeltaLake` 中 delta-kernel 的列裁剪问题。关闭 [#84543](https://github.com/ClickHouse/ClickHouse/issues/84543)。[#84745](https://github.com/ClickHouse/ClickHouse/pull/84745) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 DeltaLake 存储的 delta-kernel 中刷新凭证。[#84751](https://github.com/ClickHouse/ClickHouse/pull/84751) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了连接异常后会启动多余内部备份的问题。[#84755](https://github.com/ClickHouse/ClickHouse/pull/84755) ([Vitaly Baranov](https://github.com/vitlibar)).
* 修复了一个问题：查询响应延迟的远程源时，可能导致 vector 越界访问。[#84820](https://github.com/ClickHouse/ClickHouse/pull/84820) ([George Larionov](https://github.com/george-larionov)) 。
* 对于空输入标记，`ngram` 和 `no_op` 分词器不再会导致 (Experimental) 文本索引崩溃。[#84849](https://github.com/ClickHouse/ClickHouse/pull/84849) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复了 `ReplacingMergeTree` 和 `CollapsingMergeTree` 引擎表的轻量级更新问题。[#84851](https://github.com/ClickHouse/ClickHouse/pull/84851) ([Anton Popov](https://github.com/CurtizJ)) 。
* 将使用对象队列引擎的表的所有设置正确存储到表元数据中。[#84860](https://github.com/ClickHouse/ClickHouse/pull/84860) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复 Keeper 返回的 watches 总数统计。[#84890](https://github.com/ClickHouse/ClickHouse/pull/84890) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在版本低于 25.7 的服务器上创建的 `ReplicatedMergeTree` 引擎表的轻量级更新问题。[#84933](https://github.com/ClickHouse/ClickHouse/pull/84933) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在运行 `ALTER TABLE ... REPLACE PARTITION` 查询后，使用非复制 `MergeTree` 引擎的表中轻量级更新的问题。[#84941](https://github.com/ClickHouse/ClickHouse/pull/84941) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了布尔字面量的列名生成逻辑，改为使用 "true"/"false" 而非 "1"/"0"，从而避免查询中布尔字面量与整数字面量之间的列名冲突。[#84945](https://github.com/ClickHouse/ClickHouse/pull/84945) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复后台调度池和执行器中的内存跟踪偏移问题。[#84946](https://github.com/ClickHouse/ClickHouse/pull/84946) ([Azat Khuzhin](https://github.com/azat)).
* 修复 Merge 表引擎中潜在的排序不准确问题。[#85025](https://github.com/ClickHouse/ClickHouse/pull/85025) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 为 DiskEncrypted 补全缺失的 API。[#85028](https://github.com/ClickHouse/ClickHouse/pull/85028) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增一项检查，避免在分布式场景下使用相关子查询时发生崩溃。修复了 [#82205](https://github.com/ClickHouse/ClickHouse/issues/82205)。[#85030](https://github.com/ClickHouse/ClickHouse/pull/85030) ([Dmitry Novik](https://github.com/novikd)) 。
* 现在 Iceberg 不再尝试在 `select` 查询之间缓存相关的快照版本，而是始终如实解析快照。此前对 Iceberg 快照的缓存尝试，导致 Iceberg 表在配合时间旅行使用时出现问题。[#85038](https://github.com/ClickHouse/ClickHouse/pull/85038) ([Daniil Ivanik](https://github.com/divanik)).
* 修复了 `AzureIteratorAsync` 中的重复释放问题。[#85064](https://github.com/ClickHouse/ClickHouse/pull/85064) ([Nikita Taranov](https://github.com/nickitat)) 。
* 改进了尝试创建以 JWT 身份验证的用户时的错误消息。[#85072](https://github.com/ClickHouse/ClickHouse/pull/85072) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了 `ReplicatedMergeTree` 中补丁分区片段的清理问题。此前，轻量级更新的结果在副本上可能会暂时不可见，直到从另一个副本下载包含这些补丁分区片段物化结果的合并后或变异后的 part 为止。[#85121](https://github.com/ClickHouse/ClickHouse/pull/85121) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了在类型不同时 mv 中出现的 illegal\_type\_of\_argument 问题。[#85135](https://github.com/ClickHouse/ClickHouse/pull/85135) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复 delta-kernel 实现中的段错误问题。[#85160](https://github.com/ClickHouse/ClickHouse/pull/85160) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在移动元数据文件耗时过长时，恢复 Replicated 数据库的问题。[#85177](https://github.com/ClickHouse/ClickHouse/pull/85177) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复 `additional_table_filters expression` 设置中 `IN (subquery)` 里的 `Not-ready Set` 问题。[#85210](https://github.com/ClickHouse/ClickHouse/pull/85210) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 去掉 `SYSTEM DROP REPLICA` 查询期间不必要的 `getStatus()` 调用。修复了这样一种情况：当某个表在后台被 drop 时，会抛出 `Shutdown for storage is called` 异常。[#85220](https://github.com/ClickHouse/ClickHouse/pull/85220) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复 `DeltaLake` 引擎 delta-kernel 实现中的竞态问题。[#85221](https://github.com/ClickHouse/ClickHouse/pull/85221) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 `DeltaLake` engine 在禁用 delta-kernel 时无法读取分区数据的问题。该功能在 25.7 中出现故障 ([https://github.com/ClickHouse/ClickHouse/pull/81136](https://github.com/ClickHouse/ClickHouse/pull/81136)) 。[#85223](https://github.com/ClickHouse/ClickHouse/pull/85223) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 CREATE OR REPLACE 和 RENAME 查询中补上了此前缺失的表名长度检查。[#85326](https://github.com/ClickHouse/ClickHouse/pull/85326) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了这样一个问题：如果 DEFINER 被删除，将无法在 Replicated 数据库的新副本上创建 RMV。[#85327](https://github.com/ClickHouse/ClickHouse/pull/85327) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复 Iceberg 写入复杂类型时的问题。[#85330](https://github.com/ClickHouse/ClickHouse/pull/85330) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 不支持为复杂类型写入上下界。[#85332](https://github.com/ClickHouse/ClickHouse/pull/85332) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了通过 Distributed 表或 remote 表函数读取对象存储函数时出现的逻辑错误。修复了：[#84658](https://github.com/ClickHouse/ClickHouse/issues/84658)、[#85173](https://github.com/ClickHouse/ClickHouse/issues/85173)、[#52022](https://github.com/ClickHouse/ClickHouse/issues/52022)。[#85359](https://github.com/ClickHouse/ClickHouse/pull/85359) ([alesapin](https://github.com/alesapin)) 。
* 修复了包含损坏投影的 parts 的备份问题。[#85362](https://github.com/ClickHouse/ClickHouse/pull/85362) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在其稳定之前的各版本中，禁止在 projection 中使用 `_part_offset` 列。[#85372](https://github.com/ClickHouse/ClickHouse/pull/85372) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了 JSON 在执行 ALTER UPDATE 时发生的崩溃和数据损坏问题。[#85383](https://github.com/ClickHouse/ClickHouse/pull/85383) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 使用“按相反顺序读取”优化的并行副本查询可能会产生错误结果。[#85406](https://github.com/ClickHouse/ClickHouse/pull/85406) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了在 String 反序列化过程中发生 MEMORY\_LIMIT\_EXCEEDED 时可能导致的 UB (崩溃) 。 [#85440](https://github.com/ClickHouse/ClickHouse/pull/85440) ([Azat Khuzhin](https://github.com/azat)).
* 修复了不正确的指标 KafkaAssignedPartitions 和 KafkaConsumersWithAssignment。[#85494](https://github.com/ClickHouse/ClickHouse/pull/85494) ([Ilya Golshtein](https://github.com/ilejn)) 。
* 修复了在使用 PREWHERE (显式或自动) 时，已处理字节数统计值被低估的问题。[#85495](https://github.com/ClickHouse/ClickHouse/pull/85495) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 S3 请求速率放缓的提前返回条件：当所有线程因可重试错误而暂停时，启用放缓行为只需 s3\_slow\_all\_threads\_after\_network\_error 或 backup\_slow\_all\_threads\_after\_retryable\_s3\_error 其中之一为 true，而不再要求两者同时为 true。[#85505](https://github.com/ClickHouse/ClickHouse/pull/85505) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 此 PR 修复了通过 REST catalog 查询 Iceberg 表时的元数据解析问题。... [#85531](https://github.com/ClickHouse/ClickHouse/pull/85531) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)).
* 修复了异步插入在修改设置 `log_comment` 或 `insert_deduplication_token` 时偶发崩溃的问题。[#85540](https://github.com/ClickHouse/ClickHouse/pull/85540) ([Anton Popov](https://github.com/CurtizJ)) 。
* 使用 HTTP 和 multipart/form-data 时，date\_time\_input\_format 之类的参数会被忽略。[#85570](https://github.com/ClickHouse/ClickHouse/pull/85570) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复 `icebergS3Cluster` 和 `icebergAzureCluster` 表函数中的 secrets 脱敏问题。[#85658](https://github.com/ClickHouse/ClickHouse/pull/85658) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 修复了在将 JSON 数字转换为 Decimal 类型时，`JSONExtract` 的精度丢失问题。现在，JSON 中的数值可保留其精确的小数表示，从而避免浮点舍入误差。[#85665](https://github.com/ClickHouse/ClickHouse/pull/85665) ([ssive7b](https://github.com/ssive7b)).
* 修复了在同一条 `ALTER` 语句中于 `DROP COLUMN` 之后使用 `COMMENT COLUMN IF EXISTS` 时出现的 `LOGICAL_ERROR`。现在，当列已在同一条语句中被删除时，`IF EXISTS` 子句会正确跳过注释操作。[#85688](https://github.com/ClickHouse/ClickHouse/pull/85688) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复从 Delta Lake 缓存读取计数时的问题。[#85704](https://github.com/ClickHouse/ClickHouse/pull/85704) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复 coalescing merge tree 在处理大字符串时发生段错误的问题。此修复关闭了 [#84582](https://github.com/ClickHouse/ClickHouse/issues/84582)。[#85709](https://github.com/ClickHouse/ClickHouse/pull/85709) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 更新 Iceberg 写入中的元数据时间戳。[#85711](https://github.com/ClickHouse/ClickHouse/pull/85711) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 将 `distributed_depth` 作为 \*Cluster 函数的判断依据是错误的，可能会导致数据重复；请改用 `client_info.collaborate_with_initiator`。 [#85734](https://github.com/ClickHouse/ClickHouse/pull/85734) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Spark 无法读取位置删除文件。[#85762](https://github.com/ClickHouse/ClickHouse/pull/85762) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复 send\_logs\_source\_regexp (在 [#85105](https://github.com/ClickHouse/ClickHouse/issues/85105) 中完成异步日志重构后) 。[#85797](https://github.com/ClickHouse/ClickHouse/pull/85797) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在出现 MEMORY\_LIMIT\_EXCEEDED 错误时，带有 update\_field 的字典可能出现的不一致问题。[#85807](https://github.com/ClickHouse/ClickHouse/pull/85807) ([Azat Khuzhin](https://github.com/azat)) 。
* 支持在针对 `Distributed` 目标表的并行分布式 `INSERT SELECT` 中使用 `WITH` 语句中的全局常量。此前，查询可能会抛出 `Unknown expression identifier` 错误。[#85811](https://github.com/ClickHouse/ClickHouse/pull/85811) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 对 `deltaLakeAzure`、`deltaLakeCluster`、`icebergS3Cluster` 和 `icebergAzureCluster` 中的凭据进行脱敏。[#85889](https://github.com/ClickHouse/ClickHouse/pull/85889) ([Julian Maicher](https://github.com/jmaicher)) 。
* 修复在 `DatabaseReplicated` 中尝试执行 `CREATE ... AS (SELECT * FROM s3Cluster(...))` 时出现的逻辑错误。[#85904](https://github.com/ClickHouse/ClickHouse/pull/85904) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了由 `url()` 表函数发出的 HTTP 请求，使其在访问非标准端口时，能够在 Host 请求头中正确包含端口号。这解决了使用预签名 URL 访问运行在自定义端口上的 MinIO 等兼容 S3 服务时出现的身份验证失败问题，而这在开发环境中很常见。 (修复 [#85898](https://github.com/ClickHouse/ClickHouse/issues/85898)) 。[#85921](https://github.com/ClickHouse/ClickHouse/pull/85921) ([Tom Quist](https://github.com/tomquist)) 。
* 现在，对于非 Delta 表，Unity Catalog 会忽略包含异常数据类型的 schema。修复了 [#85699](https://github.com/ClickHouse/ClickHouse/issues/85699)。[#85950](https://github.com/ClickHouse/ClickHouse/pull/85950) ([alesapin](https://github.com/alesapin)) 。
* 修正 Iceberg 中字段的可空性。[#85977](https://github.com/ClickHouse/ClickHouse/pull/85977) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了 `Replicated` 数据库恢复中的一个问题：如果表名包含 `%` 符号，恢复过程中可能会以不同的名称重新创建该表。[#85987](https://github.com/ClickHouse/ClickHouse/pull/85987) ([Alexander Tokmakov](https://github.com/tavplubix)).
* 修复了恢复空 `Memory` 表时因 `BACKUP_ENTRY_NOT_FOUND` 错误而导致备份恢复失败的问题。[#86012](https://github.com/ClickHouse/ClickHouse/pull/86012) ([Julia Kartseva](https://github.com/jkartseva)).
* 在对 Distributed 表执行 ALTER 时，新增了对 sharding\_key 的检查。此前，不正确的 ALTER 会破坏表定义，并导致服务器无法重启。[#86015](https://github.com/ClickHouse/ClickHouse/pull/86015) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 不再创建空的 Iceberg 删除文件。[#86061](https://github.com/ClickHouse/ClickHouse/pull/86061) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复因设置值过大而导致 S3Queue 表和副本重启异常的问题。[#86074](https://github.com/ClickHouse/ClickHouse/pull/86074) ([Nikolay Degterinsky](https://github.com/evillique)).

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

* 默认对使用 S3 的测试启用加密磁盘。[#59898](https://github.com/ClickHouse/ClickHouse/pull/59898) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 在集成测试中使用 `clickhouse` 二进制文件，以获取未剥离的调试符号。[#83779](https://github.com/ClickHouse/ClickHouse/pull/83779) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 将内部 libxml2 从 2.14.4 升级到 2.14.5。[#84230](https://github.com/ClickHouse/ClickHouse/pull/84230) ([Robert Schulze](https://github.com/rschu1ze)).
* 将内部 curl 从 8.14.0 升级到 8.15.0。[#84231](https://github.com/ClickHouse/ClickHouse/pull/84231) ([Robert Schulze](https://github.com/rschu1ze)).
* 现在我们在 CI 中让缓存占用更少的内存，并改进了淘汰测试。[#84676](https://github.com/ClickHouse/ClickHouse/pull/84676) ([alesapin](https://github.com/alesapin)).

<div id="257">
  ### ClickHouse 发行版 25.7，2025-07-24
</div>

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

* `extractKeyValuePairs` 函数变更：新增参数 `unexpected_quoting_character_strategy`，用于控制在读取未加引号的键或值时，意外遇到 `quoting_character` 后的处理方式。该参数可取以下值之一：`invalid`、`accept` 或 `promote`。`invalid` 会丢弃该键并回到等待键的状态；`accept` 会将其视为键的一部分；`promote` 会丢弃前一个字符，并开始按带引号的键解析。此外，在解析完带引号的值后，只有在找到键值对分隔符时，才会继续解析下一个键。[#80657](https://github.com/ClickHouse/ClickHouse/pull/80657) ([Arthur Passos](https://github.com/arthurpassos)).
* `countMatches` 函数现已支持零字节匹配。希望保留旧行为的用户可以启用设置 `count_matches_stop_at_empty_match`。[#81676](https://github.com/ClickHouse/ClickHouse/pull/81676) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 生成 BACKUP 时，除其专用的服务器设置 (`max_backup_bandwidth_for_server`、`max_mutations_bandwidth_for_server` 和 `max_merges_bandwidth_for_server`) 外，还会使用适用于本地 (`max_local_read_bandwidth_for_server` 和 `max_local_write_bandwidth_for_server`) 及远程 (`max_remote_read_network_bandwidth_for_server` 和 `max_remote_write_network_bandwidth_for_server`) 的全服务器限流器。[#81753](https://github.com/ClickHouse/ClickHouse/pull/81753) ([Sergei Trifonov](https://github.com/serxa)).
* 禁止创建没有可插入列的表。[#81835](https://github.com/ClickHouse/ClickHouse/pull/81835) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* cluster 函数现在可按归档内的文件并行处理。此前版本中，整个归档 (如 zip、tar 或 7z) 会作为一个工作单元处理。新增设置 `cluster_function_process_archive_on_multiple_nodes`，默认值为 `true`。设为 `true` 时，可提升 cluster 函数处理归档的性能。若需保持兼容性，或在从更早版本升级到 25.7+ 时避免使用带归档的 cluster 函数出现错误，则应将其设为 `false`。[#82355](https://github.com/ClickHouse/ClickHouse/pull/82355) ([Kseniia Sumarokova](https://github.com/kssenii)).
* `SYSTEM RESTART REPLICAS` 查询过去会唤醒 Lazy database 中的表，即使用户无权访问该数据库；并且这可能发生在这些表正被并发 drop 时。注意：现在 `SYSTEM RESTART REPLICAS` 只会重启你对其所在数据库拥有 `SHOW TABLES` 权限的副本，这样更符合预期。[#83321](https://github.com/ClickHouse/ClickHouse/pull/83321) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

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

* 为 `MergeTree` 家族的表新增了轻量级更新支持。轻量级更新可通过以下新语法使用：`UPDATE <table> SET col1 = val1, col2 = val2, ... WHERE <condition>`。还新增了通过轻量级更新实现轻量级删除的功能。可通过设置 `lightweight_delete_mode = 'lightweight_update'` 启用该功能。[#82004](https://github.com/ClickHouse/ClickHouse/pull/82004) ([Anton Popov](https://github.com/CurtizJ)).
* 支持在 Iceberg schema 演进中使用复杂类型。[#73714](https://github.com/ClickHouse/ClickHouse/pull/73714) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 新增对向 Iceberg 表执行 INSERT 的支持。[#82692](https://github.com/ClickHouse/ClickHouse/pull/82692) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 按字段 ID 读取 Iceberg 数据文件。这提高了与 Iceberg 的兼容性：字段可以在元数据中重命名，同时仍映射到底层 Parquet 文件中的不同名称。此项改动修复了 [#83065](https://github.com/ClickHouse/ClickHouse/issues/83065)。[#83653](https://github.com/ClickHouse/ClickHouse/pull/83653) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 现在，ClickHouse 已支持 Iceberg 的压缩 `metadata.json` 文件。修复了 [#70874](https://github.com/ClickHouse/ClickHouse/issues/70874)。[#81451](https://github.com/ClickHouse/ClickHouse/pull/81451) ([alesapin](https://github.com/alesapin)) 。
* 支持 Glue catalog 中的 `TimestampTZ`。此更改修复了 [#81654](https://github.com/ClickHouse/ClickHouse/issues/81654)。[#83132](https://github.com/ClickHouse/ClickHouse/pull/83132) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 为 ClickHouse 客户端新增 AI 驱动的 SQL 生成功能。现在，你可以在查询前加上 `??`，根据自然语言描述生成 SQL 查询。支持 OpenAI 和 Anthropic 提供商，并可自动发现 schema。[#83314](https://github.com/ClickHouse/ClickHouse/pull/83314) ([Kaushik Iska](https://github.com/iskakaushik)) 。
* 新增了一个可将 Geo 类型写入 WKB 格式的函数。[#82935](https://github.com/ClickHouse/ClickHouse/pull/82935) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 引入了两种新的源访问类型：`READ` 和 `WRITE`，并弃用了此前所有与源相关的访问类型。此前使用的是 `GRANT S3 ON *.* TO user`，现在改为：`GRANT READ, WRITE ON S3 TO user`。这也允许将源的 `READ` 和 `WRITE` 权限分开授予，例如：`GRANT READ ON * TO user`、`GRANT WRITE ON S3 TO user`。该功能由设置 `access_control_improvements.enable_read_write_grants` 控制，默认处于禁用状态。[#73659](https://github.com/ClickHouse/ClickHouse/pull/73659) ([pufit](https://github.com/pufit)) 。
* NumericIndexedVector：一种新的向量数据结构，底层采用位切片和 Roaring-bitmap 压缩，并提供 20 多个用于构建、分析和逐点算术运算的函数。可减少存储占用，并加速稀疏数据上的连接、过滤和聚合。实现了 [#70582](https://github.com/ClickHouse/ClickHouse/issues/70582) 以及 VLDB 2024 上 T. Xiong 和 Y. Wang 的论文 [“Large-Scale Metric Computation in Online Controlled Experiment Platform” paper](https://arxiv.org/abs/2405.08411) 中的方法。[#74193](https://github.com/ClickHouse/ClickHouse/pull/74193) ([FriendLey](https://github.com/FriendLey)) 。
* 现已支持 workload 设置 `max_waiting_queries`。可用于限制查询队列的大小。如果达到该限制，后续所有查询都将因 `SERVER_OVERLOADED` 错误而被终止。[#81250](https://github.com/ClickHouse/ClickHouse/pull/81250) ([Oleg Doronin](https://github.com/dorooleg)).
* 新增金融函数：`financialInternalRateOfReturnExtended` (`XIRR`) 、`financialInternalRateOfReturn` (`IRR`) 、`financialNetPresentValueExtended` (`XNPV`) 、`financialNetPresentValue` (`NPV`) 。[#81599](https://github.com/ClickHouse/ClickHouse/pull/81599) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 新增地理空间函数 `polygonsIntersectCartesian` 和 `polygonsIntersectSpherical`，用于判断两个 Polygon 是否相交。[#81882](https://github.com/ClickHouse/ClickHouse/pull/81882) ([Paul Lamb](https://github.com/plamb)).
* 在 MergeTree 家族表中支持 `_part_granule_offset` 虚拟列。该列表示每一行在其所属数据分区片段内对应粒度/标记的从零开始索引。此项改进解决了 [#79572](https://github.com/ClickHouse/ClickHouse/issues/79572)。[#82341](https://github.com/ClickHouse/ClickHouse/pull/82341) ([Amos Bird](https://github.com/amosbird)) 。[#82341](https://github.com/ClickHouse/ClickHouse/pull/82341) ([Amos Bird](https://github.com/amosbird))
* 新增 SQL 函数 `colorSRGBToOkLCH` 和 `colorOkLCHToSRGB`，用于在 sRGB 和 OkLCH 色彩空间之间转换颜色。[#83679](https://github.com/ClickHouse/ClickHouse/pull/83679) ([Fgrtue](https://github.com/Fgrtue)) 。
* 允许在 `CREATE USER` 查询中使用参数作为用户名。[#81387](https://github.com/ClickHouse/ClickHouse/pull/81387) ([Diskein](https://github.com/Diskein)) 。
* `system.formats` 表现在包含了更多与格式相关的扩展信息，例如 HTTP 内容类型、schema 推断能力等。[#81505](https://github.com/ClickHouse/ClickHouse/pull/81505) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* 新增函数 `searchAny` 和 `searchAll`，作为搜索文本索引的通用工具。[#80641](https://github.com/ClickHouse/ClickHouse/pull/80641) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 文本索引现已支持新的 `split` 分词器。[#81752](https://github.com/ClickHouse/ClickHouse/pull/81752) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 将 `text` 索引的默认索引粒度值调整为 64。这提升了内部基准测试中平均测试查询的预期性能。[#82162](https://github.com/ClickHouse/ClickHouse/pull/82162) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 256 位 bitmap 会按顺序存储某个状态的出边标记，但出边状态保存到磁盘时采用的是它们在哈希表中出现的顺序。因此，从磁盘读取时，标记会指向错误的下一个状态。[#82783](https://github.com/ClickHouse/ClickHouse/pull/82783) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 为文本索引中的 FST 树 blob 启用 zstd 压缩。[#83093](https://github.com/ClickHouse/ClickHouse/pull/83093) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 将向量相似度索引提升为 Beta。引入了别名设置 `enable_vector_similarity_index`，必须启用该设置才能使用向量相似度索引。[#83459](https://github.com/ClickHouse/ClickHouse/pull/83459) ([Robert Schulze](https://github.com/rschu1ze)).
* 移除了与 Experimental 零拷贝复制相关的实验性 `send_metadata` 逻辑。该逻辑从未被使用，也无人维护这段代码。由于甚至没有相关测试，它很可能早就失效了。[#82508](https://github.com/ClickHouse/ClickHouse/pull/82508) ([alesapin](https://github.com/alesapin)).
* 将 `StorageKafka2` 集成到 `system.kafka_consumers` 中。[#82652](https://github.com/ClickHouse/ClickHouse/pull/82652) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 可通过统计信息估算复杂的 CNF/DNF，例如 `(a < 1 and a > 0) or b = 3`。[#82663](https://github.com/ClickHouse/ClickHouse/pull/82663) ([Han Fei](https://github.com/hanfei1991)).

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

* 引入异步日志。在将日志输出到较慢的设备时，不再拖慢查询。[#82516](https://github.com/ClickHouse/ClickHouse/pull/82516) ([Raúl Marín](https://github.com/Algunenano))。限制队列中保留的最大条目数。[#83214](https://github.com/ClickHouse/ClickHouse/pull/83214) ([Raúl Marín](https://github.com/Algunenano))。
* 默认启用并行分布式 INSERT SELECT；在此模式下，INSERT SELECT 会在每个分片上独立执行，参见 `parallel_distributed_insert_select` 设置。[#83040](https://github.com/ClickHouse/ClickHouse/pull/83040) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 当聚合查询仅包含一个对非 `Nullable` 列执行的 `count()` 函数时，聚合逻辑会在哈希表探测过程中完全内联。这样就无需分配和维护任何聚合状态，从而显著降低内存使用和 CPU 开销。这部分解决了 [#81982](https://github.com/ClickHouse/ClickHouse/issues/81982)。[#82104](https://github.com/ClickHouse/ClickHouse/pull/82104) ([Amos Bird](https://github.com/amosbird)) 。
* 通过移除仅有一个键列这一典型情况下对哈希映射的额外循环，`HashJoin` 的性能得到了优化；同时，当 `null_map` 和 `join_mask` 始终为 `true`/`false` 时，也省去了对它们的检查。[#82308](https://github.com/ClickHouse/ClickHouse/pull/82308) ([Nikita Taranov](https://github.com/nickitat)) 。
* 对 `-If` 组合器进行了轻量优化。[#78454](https://github.com/ClickHouse/ClickHouse/pull/78454) ([李扬](https://github.com/taiyang-li)).
* 使用向量相似度索引的向量搜索查询，由于减少了存储读取和 CPU 使用，因此能以更低的延迟完成。[#79103](https://github.com/ClickHouse/ClickHouse/pull/79103) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 在 `filterPartsByQueryConditionCache` 中遵循 `merge_tree_min_{rows,bytes}_for_seek`，以与其他按索引过滤的方法保持一致。[#80312](https://github.com/ClickHouse/ClickHouse/pull/80312) ([李扬](https://github.com/taiyang-li)).
* 使 `TOTALS` 步骤后的管道支持多线程。[#80331](https://github.com/ClickHouse/ClickHouse/pull/80331) ([UnamedRus](https://github.com/UnamedRus)).
* 修复 `Redis` 和 `KeeperMap` 存储中按键过滤的问题。[#81833](https://github.com/ClickHouse/ClickHouse/pull/81833) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 新增设置 `min_joined_block_size_rows` (类似于 `min_joined_block_size_bytes`；默认值为 65409) ，用于控制 JOIN 输入块和输出块的最小大小 (按行数计算，前提是 JOIN 算法支持) 。较小的块会被合并。[#81886](https://github.com/ClickHouse/ClickHouse/pull/81886) ([Nikita Taranov](https://github.com/nickitat)) 。
* `ATTACH PARTITION` 不再导致所有缓存被清空。[#82377](https://github.com/ClickHouse/ClickHouse/pull/82377) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过使用等价类消除冗余的 JOIN 操作，优化为相关子查询生成的执行计划。如果所有相关列都有等价表达式，并且启用了 `query_plan_correlated_subqueries_use_substitution` 设置，就不会生成 `CROSS JOIN`。[#82435](https://github.com/ClickHouse/ClickHouse/pull/82435) ([Dmitry Novik](https://github.com/novikd)) 。
* 当关联子查询看起来是函数 `EXISTS` 的参数时，只读取所需的列。[#82443](https://github.com/ClickHouse/ClickHouse/pull/82443) ([Dmitry Novik](https://github.com/novikd)) 。
* 略微提升了查询分析期间查询树比较的速度。[#82617](https://github.com/ClickHouse/ClickHouse/pull/82617) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 在 ProfileEvents 的 Counter 中添加对齐，以减少伪共享。[#82697](https://github.com/ClickHouse/ClickHouse/pull/82697) ([Jiebin Sun](https://github.com/jiebinn)) 。
* [#82308](https://github.com/ClickHouse/ClickHouse/issues/82308) 中针对 `null_map` 和 `JoinMask` 的优化已应用于包含多个析取条件的 JOIN 场景。此外，`KnownRowsHolder` 数据结构也经过了优化。[#83041](https://github.com/ClickHouse/ClickHouse/pull/83041) ([Nikita Taranov](https://github.com/nickitat)) 。
* 为避免每次访问标志位时都计算哈希，join 标志位改用了普通的 `std::vector<std::atomic_bool>`。[#83043](https://github.com/ClickHouse/ClickHouse/pull/83043) ([Nikita Taranov](https://github.com/nickitat)) 。
* 当 `HashJoin` 使用 `lazy` 输出模式时，不要提前为结果列预分配内存。这样做并不理想，尤其是在匹配数量较少时。此外，连接完成后我们就能准确知道匹配数量，因此可以更精确地进行预分配。[#83304](https://github.com/ClickHouse/ClickHouse/pull/83304) ([Nikita Taranov](https://github.com/nickitat)).
* 在构建管道时，尽量减少端口头部中的内存拷贝。原始 [PR](https://github.com/ClickHouse/ClickHouse/pull/70105) 由 [heymind](https://github.com/heymind) 提交。[#83381](https://github.com/ClickHouse/ClickHouse/pull/83381) ([Raúl Marín](https://github.com/Algunenano)) 。
* 改进了 ClickHouse Keeper 在使用 rocksdb 存储时的启动过程。[#83390](https://github.com/ClickHouse/ClickHouse/pull/83390) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 创建存储快照数据时避免持有锁，以减少高并发负载下的锁争用。[#83510](https://github.com/ClickHouse/ClickHouse/pull/83510) ([Duc Canh Le](https://github.com/canhld94)) 。
* 在未出现解析错误的情况下，通过复用序列化器提升了 `ProtobufSingle` 输入格式的性能。[#83613](https://github.com/ClickHouse/ClickHouse/pull/83613) ([Eduard Karacharov](https://github.com/korowa)) 。
* 改进管道构建性能，加快短查询的执行速度。[#83631](https://github.com/ClickHouse/ClickHouse/pull/83631) ([Raúl Marín](https://github.com/Algunenano)) 。
* 优化 `MergeTreeReadersChain::getSampleBlock`，可加快短查询的执行速度。[#83875](https://github.com/ClickHouse/ClickHouse/pull/83875) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过异步请求加快列出数据目录中表的速度。[#81084](https://github.com/ClickHouse/ClickHouse/pull/81084) ([alesapin](https://github.com/alesapin)).
* 当启用 `s3_slow_all_threads_after_network_error` 配置时，为 S3 重试机制引入随机抖动。[#81849](https://github.com/ClickHouse/ClickHouse/pull/81849) ([zoomxi](https://github.com/zoomxi)).

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

* 用多种颜色区分括号，以提升可读性。[#82538](https://github.com/ClickHouse/ClickHouse/pull/82538) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 输入时高亮显示 LIKE/REGEXP 模式中的元字符。我们已经在 `clickhouse-format` 和 `clickhouse-client` 的回显中提供了这项功能，现在命令提示符中也支持了。[#82871](https://github.com/ClickHouse/ClickHouse/pull/82871) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `clickhouse-format` 和客户端回显中的高亮效果将与命令行提示符中的高亮效果一致。[#82874](https://github.com/ClickHouse/ClickHouse/pull/82874) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在允许将 `plain_rewritable` 磁盘用作数据库元数据存储磁盘。在 `plain_rewritable` 中实现了 `moveFile` 和 `replaceFile` 方法，以支持其作为数据库磁盘使用。[#79424](https://github.com/ClickHouse/ClickHouse/pull/79424) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 允许为 `PostgreSQL`、`MySQL` 和 `DataLake` 数据库进行备份。此类数据库的备份仅保存其定义，不会保存其中的数据。[#79982](https://github.com/ClickHouse/ClickHouse/pull/79982) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 设置 `allow_experimental_join_condition` 已标记为过时，因为现在始终允许使用它。[#80566](https://github.com/ClickHouse/ClickHouse/pull/80566) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 在 ClickHouse 异步指标中加入压力指标。[#80779](https://github.com/ClickHouse/ClickHouse/pull/80779) ([Xander Garbett](https://github.com/Garbett1)) 。
* 新增了指标 `MarkCacheEvictedBytes`、`MarkCacheEvictedMarks`、`MarkCacheEvictedFiles`，用于跟踪标记缓存中的淘汰情况。 (问题 [#60989](https://github.com/ClickHouse/ClickHouse/issues/60989)) 。[#80799](https://github.com/ClickHouse/ClickHouse/pull/80799) ([Shivji Kumar Jha](https://github.com/shiv4289)) 。
* 支持按[规范](https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#enum)要求，将 Parquet 枚举写入为字节数组。[#81090](https://github.com/ClickHouse/ClickHouse/pull/81090) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 对 `DeltaLake` 表引擎的一项改进：delta-kernel-rs 提供了 `ExpressionVisitor` API，本次 PR 已实现该 API，并将其应用于分区列表达式转换 (它将替换 delta-kernel-rs 中旧的已弃用实现方式，此前我们的代码一直使用这种方式) 。未来，这个 `ExpressionVisitor` 还将支持实现基于统计信息的剪枝，以及一些 Delta Lake 专有功能。此外，此变更的目的还在于为 `DeltaLakeCluster` 表引擎支持分区剪枝 (解析后的表达式结果——ActionsDAG——将与数据路径一起，由 initiator 序列化并发送出去，因为剪枝所需的这类信息仅以元信息形式存在于数据文件列表中，而该列表只由 initiator 获取，但这些信息必须应用到每个执行读取的 server 上) 。[#81136](https://github.com/ClickHouse/ClickHouse/pull/81136) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在为命名元组推导超类型时，保留元素名称。[#81345](https://github.com/ClickHouse/ClickHouse/pull/81345) ([lgbo](https://github.com/lgbo-ustc)).
* 手动统计已消费的消息数量，避免依赖 StorageKafka2 中先前已提交的偏移量。[#81662](https://github.com/ClickHouse/ClickHouse/pull/81662) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 新增了 `clickhouse-keeper-utils`，这是一款用于管理和分析 ClickHouse Keeper 数据的新命令行工具。该工具支持从快照和更新日志中转储状态、分析更新日志文件，以及提取特定的日志范围。[#81677](https://github.com/ClickHouse/ClickHouse/pull/81677) ([Antonio Andelic](https://github.com/antonio2368)).
* 总网络限流器和每用户网络限流器都不会重置，从而确保永远不会超出 `max_network_bandwidth_for_all_users` 和 `max_network_bandwidth_for_all_users` 的限制。[#81729](https://github.com/ClickHouse/ClickHouse/pull/81729) ([Sergei Trifonov](https://github.com/serxa)).
* 支持以 GeoParquet 作为输出格式写出。[#81784](https://github.com/ClickHouse/ClickHouse/pull/81784) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 如果某列当前正受尚未完成的数据变更影响，则禁止启动会重命名该列的 `RENAME COLUMN` alter 变更。[#81823](https://github.com/ClickHouse/ClickHouse/pull/81823) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 当已知需要保持该连接时，Connection 请求头会在所有请求头的末尾发送。 [#81951](https://github.com/ClickHouse/ClickHouse/pull/81951) ([Sema Checherinda](https://github.com/CheSema)).
* 根据 listen\_backlog (默认值为 4096) 调整 TCP 服务器队列大小 (默认值为 64) 。[#82045](https://github.com/ClickHouse/ClickHouse/pull/82045) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增了在不重启服务器的情况下动态重新加载 `max_local_read_bandwidth_for_server` 和 `max_local_write_bandwidth_for_server` 的能力。[#82083](https://github.com/ClickHouse/ClickHouse/pull/82083) ([Kai Zhu](https://github.com/nauu)) 。
* 新增了对使用 `TRUNCATE TABLE system.warnings` 清空 `system.warnings` 表中所有警告的支持。[#82087](https://github.com/ClickHouse/ClickHouse/pull/82087) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复数据湖集群函数中的分区剪枝问题。 [#82131](https://github.com/ClickHouse/ClickHouse/pull/82131) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了在 DeltaLakeCluster 表函数中读取分区数据的问题。在此 PR 中，cluster 函数的协议版本已提升，因此可以将额外信息从发起节点发送到副本。这些额外信息包含 delta-kernel 转换表达式，而解析分区列 (以及未来的其他内容，例如生成列等) 需要用到该表达式。[#82132](https://github.com/ClickHouse/ClickHouse/pull/82132) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 函数 `reinterpret` 现已支持转换为 `Array(T)`，其中 `T` 为定长数据类型 (问题 [#82621](https://github.com/ClickHouse/ClickHouse/issues/82621)) 。[#83399](https://github.com/ClickHouse/ClickHouse/pull/83399) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 现在，Datalake 数据库会抛出更易理解的异常。修复 [#81211](https://github.com/ClickHouse/ClickHouse/issues/81211)。[#82304](https://github.com/ClickHouse/ClickHouse/pull/82304) ([alesapin](https://github.com/alesapin)) 。
* 通过让 `HashJoin::needUsedFlagsForPerRightTableRow` 返回 false，改进了 CROSS JOIN。[#82379](https://github.com/ClickHouse/ClickHouse/pull/82379) ([lgbo](https://github.com/lgbo-ustc)) 。
* 支持以 Array of Tuples 形式读写 map 列。[#82408](https://github.com/ClickHouse/ClickHouse/pull/82408) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 在 `system.licenses` 中列出 [Rust](https://clickhouse.com/blog/rust) crate 的许可证信息。[#82440](https://github.com/ClickHouse/ClickHouse/pull/82440) ([Raúl Marín](https://github.com/Algunenano)) 。
* 现在可在 S3Queue 表引擎的 `keeper_path` 设置中使用 `{uuid}` 之类的宏。[#82463](https://github.com/ClickHouse/ClickHouse/pull/82463) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* Keeper 改进：在后台线程中跨磁盘移动更新日志文件。此前，将更新日志移动到其他磁盘时，会全局阻塞 Keeper，直到移动完成。如果移动操作耗时较长 (例如移动到 S3 磁盘) ，会导致性能下降。[#82485](https://github.com/ClickHouse/ClickHouse/pull/82485) ([Antonio Andelic](https://github.com/antonio2368)).
* Keeper 改进：新增配置 `keeper_server.cleanup_old_and_ignore_new_acl`。启用后，所有节点的 ACL 都将被清除，同时会忽略新请求的 ACL。若要将节点上的 ACL 彻底移除，必须保持该配置处于启用状态，直到创建新的快照为止。[#82496](https://github.com/ClickHouse/ClickHouse/pull/82496) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 新增了一个新的 server setting `s3queue_disable_streaming`，用于禁用使用 S3Queue 表引擎的表中的流式功能。该设置可在无需重启 server 的情况下更改。[#82515](https://github.com/ClickHouse/ClickHouse/pull/82515) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 重构了文件系统缓存的动态调整大小功能。增加了更多用于内部信息的日志。[#82556](https://github.com/ClickHouse/ClickHouse/pull/82556) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 未提供配置文件的 `clickhouse-server` 也会像默认配置一样监听 PostgreSQL 的 9005 端口。[#82633](https://github.com/ClickHouse/ClickHouse/pull/82633) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 `ReplicatedMergeTree::executeMetadataAlter` 中，我们会获取 StorageID，并在未持有 DDLGuard 的情况下尝试调用 `IDatabase::alterTable`。在这期间，相关表在技术上可能已经与另一张表发生交换，因此获取定义时，拿到的可能是错误的定义。为避免这种情况，我们在尝试调用 `IDatabase::alterTable` 时新增了一项单独的检查，用于确认 UUID 是否匹配。[#82666](https://github.com/ClickHouse/ClickHouse/pull/82666) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 在使用只读远程磁盘附加数据库时，需手动将表 UUID 添加到 DatabaseCatalog 中。[#82670](https://github.com/ClickHouse/ClickHouse/pull/82670) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 防止用户在 `NumericIndexedVector` 中使用 `nan` 和 `inf`。修复了 [#82239](https://github.com/ClickHouse/ClickHouse/issues/82239) 等问题，并顺带做了更多改进。[#82681](https://github.com/ClickHouse/ClickHouse/pull/82681) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 不要在 `X-ClickHouse-Progress` 和 `X-ClickHouse-Summary` 请求头格式中省略零值。[#82727](https://github.com/ClickHouse/ClickHouse/pull/82727) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* Keeper 改进：支持为 world:anyone ACL 单独指定权限。[#82755](https://github.com/ClickHouse/ClickHouse/pull/82755) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 不允许对 SummingMergeTree 中显式指定为求和列的列执行 `RENAME COLUMN` 或 `DROP COLUMN`。关闭 [#81836](https://github.com/ClickHouse/ClickHouse/issues/81836)。[#82821](https://github.com/ClickHouse/ClickHouse/pull/82821) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 提高从 `Decimal` 到 `Float32` 的转换精度。实现从 `Decimal` 到 `BFloat16` 的转换。关闭 [#82660](https://github.com/ClickHouse/ClickHouse/issues/82660)。[#82823](https://github.com/ClickHouse/ClickHouse/pull/82823) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Web UI 中的滚动条看起来会稍微更好一些。[#82869](https://github.com/ClickHouse/ClickHouse/pull/82869) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 带有内嵌配置的 `clickhouse-server` 将通过提供 HTTP OPTIONS 响应来支持使用 Web UI。[#82870](https://github.com/ClickHouse/ClickHouse/pull/82870) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增了在配置中为路径指定额外 Keeper ACL 的支持。如果要为特定路径添加额外 ACL，可在配置中的 `zookeeper.path_acls` 下定义。[#82898](https://github.com/ClickHouse/ClickHouse/pull/82898) ([Antonio Andelic](https://github.com/antonio2368)).
* 现在，变更快照将根据可见 parts 的快照构建。此外，快照中使用的变更计数器也会根据其中包含的变更重新计算。[#82945](https://github.com/ClickHouse/ClickHouse/pull/82945) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 当 Keeper 因软内存限制拒绝写入时，会新增一个 ProfileEvent。[#82963](https://github.com/ClickHouse/ClickHouse/pull/82963) ([Xander Garbett](https://github.com/Garbett1)) 。
* 向 `system.s3queue_log` 中添加列 `commit_time`、`commit_id`。[#83016](https://github.com/ClickHouse/ClickHouse/pull/83016) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在某些情况下，我们的指标需要具备多个维度。例如，按错误代码统计失败的合并或变更，而不是只有单一计数器。为此引入了 `system.dimensional_metrics`，它正是用于实现这一点的，并添加了第一个维度指标 `failed_merges`。[#83030](https://github.com/ClickHouse/ClickHouse/pull/83030) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 将 clickhouse client 中有关未知设置的警告合并，并以摘要形式记入日志。[#83042](https://github.com/ClickHouse/ClickHouse/pull/83042) ([Bharat Nallan](https://github.com/bharatnc)).
* Clickhouse client 现在会在连接出错时报告本地端口。[#83050](https://github.com/ClickHouse/ClickHouse/pull/83050) ([Jianfei Hu](https://github.com/incfly)) 。
* `AsynchronousMetrics` 中的错误处理略有改善。如果 `/sys/block` 目录存在但无法访问，server 将在不监控块设备的情况下启动。关闭了 [#79229](https://github.com/ClickHouse/ClickHouse/issues/79229)。[#83115](https://github.com/ClickHouse/ClickHouse/pull/83115) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 SystemLogs 的关闭顺序调整为位于普通表之后 (并且位于系统表之前，而不是普通表之前) 。[#83134](https://github.com/ClickHouse/ClickHouse/pull/83134) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为 `S3Queue` 的关闭过程添加日志。[#83163](https://github.com/ClickHouse/ClickHouse/pull/83163) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持将 `Time` 和 `Time64` 按 `MM:SS`、`M:SS`、`SS` 或 `S` 格式解析。[#83299](https://github.com/ClickHouse/ClickHouse/pull/83299) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 当 `distributed_ddl_output_mode='*_only_active'` 时，不再等待复制延迟大于 `max_replication_lag_to_enqueue` 的新副本或恢复后的副本。这有助于避免出现 `DDL task is not finished on some hosts`：某个新副本在完成初始化或恢复后变为活动状态，但它在初始化期间积压了大量复制日志。同时，还实现了 `SYSTEM SYNC DATABASE REPLICA STRICT` 查询，该查询会等待复制日志低于 `max_replication_lag_to_enqueue`。[#83302](https://github.com/ClickHouse/ClickHouse/pull/83302) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 不要在异常消息中输出过长的表达式操作说明。已关闭 [#83164](https://github.com/ClickHouse/ClickHouse/issues/83164)。[#83350](https://github.com/ClickHouse/ClickHouse/pull/83350) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了对分片前缀和后缀的解析能力，并可检查非常量列的覆盖情况。[#83377](https://github.com/ClickHouse/ClickHouse/pull/83377) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 使用命名集合时，统一 ODBC 和 JDBC 的参数名称。[#83410](https://github.com/ClickHouse/ClickHouse/pull/83410) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 当存储正在关闭时，`getStatus` 会抛出 `ErrorCodes::ABORTED` 异常。此前，这会导致 select 查询失败。现在我们会捕获 `ErrorCodes::ABORTED` 异常，并刻意忽略它。[#83435](https://github.com/ClickHouse/ClickHouse/pull/83435) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 为 `MergeParts` 条目的 part\_log profile events 新增进程资源指标 (例如 `UserTimeMicroseconds`、`SystemTimeMicroseconds`、`RealTimeMicroseconds`) 。[#83460](https://github.com/ClickHouse/ClickHouse/pull/83460) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 默认在 Keeper 中启用 `create_if_not_exists`、`check_not_exists`、`remove_recursive` 功能开关，以支持新类型的请求。[#83488](https://github.com/ClickHouse/ClickHouse/pull/83488) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在服务器关闭时，先停止 S3(Azure/etc)Queue 流式处理，再关闭任何表。[#83530](https://github.com/ClickHouse/ClickHouse/pull/83530) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 `JSON` 输入格式中，支持将 `Date`/`Date32` 作为整数处理。[#83597](https://github.com/ClickHouse/ClickHouse/pull/83597) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* 优化了某些情况下加载和添加投影时的异常消息，使其更易于阅读。[#83728](https://github.com/ClickHouse/ClickHouse/pull/83728) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增一个配置选项，可跳过对 `clickhouse-server` 二进制文件校验和完整性的检查。解决了 [#83637](https://github.com/ClickHouse/ClickHouse/issues/83637)。[#83749](https://github.com/ClickHouse/ClickHouse/pull/83749) ([Rafael Roquetto](https://github.com/rafaelroquetto)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复了 `clickhouse-benchmark` 中 `--reconnect` 选项不正确的默认值。该值在 [#79465](https://github.com/ClickHouse/ClickHouse/issues/79465) 中被误改。[#82677](https://github.com/ClickHouse/ClickHouse/pull/82677) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `CREATE DICTIONARY` 格式不统一的问题。关闭 [#82105](https://github.com/ClickHouse/ClickHouse/issues/82105)。[#82829](https://github.com/ClickHouse/ClickHouse/pull/82829) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复生存时间 (TTL) 包含 `materialize` 函数时格式表现不一致的问题。关闭 [#82828](https://github.com/ClickHouse/ClickHouse/issues/82828)。[#82831](https://github.com/ClickHouse/ClickHouse/pull/82831) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当子查询包含 INTO OUTFILE 等输出选项时，EXPLAIN AST 格式不一致的问题。关闭 [#82826](https://github.com/ClickHouse/ClickHouse/issues/82826)。[#82840](https://github.com/ClickHouse/ClickHouse/pull/82840) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在不允许使用别名的情况下，上下文中带括号且包含别名的表达式格式不一致的问题。关闭 [#82836](https://github.com/ClickHouse/ClickHouse/issues/82836)。关闭 [#82837](https://github.com/ClickHouse/ClickHouse/issues/82837)。[#82867](https://github.com/ClickHouse/ClickHouse/pull/82867) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在聚合函数状态与 IPv4 相乘时，使用正确的错误代码。关闭 [#82817](https://github.com/ClickHouse/ClickHouse/issues/82817)。[#82818](https://github.com/ClickHouse/ClickHouse/pull/82818) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复文件系统缓存中的逻辑错误："字节数为 0，但范围尚未结束"。[#81868](https://github.com/ClickHouse/ClickHouse/pull/81868) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 当生存时间 (TTL) 导致行数减少时，重新计算 min-max 索引，以确保依赖该索引的算法 (如 `minmax_count_projection`) 的正确性。此修复解决了 [#77091](https://github.com/ClickHouse/ClickHouse/issues/77091)。[#77166](https://github.com/ClickHouse/ClickHouse/pull/77166) ([Amos Bird](https://github.com/amosbird)) 。
* 对于包含 `ORDER BY ... LIMIT BY ... LIMIT N` 组合的查询，当 ORDER BY 以 PartialSorting 方式执行时，计数器 `rows_before_limit_at_least` 现在反映的是 LIMIT 子句消费的行数，而不是排序转换消费的行数。[#78999](https://github.com/ClickHouse/ClickHouse/pull/78999) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复了在使用包含交替分支且首个分支不是字面量的 regexp 对 token/ngram 索引进行过滤时，粒度跳过过多的问题。[#79373](https://github.com/ClickHouse/ClickHouse/pull/79373) ([Eduard Karacharov](https://github.com/korowa)).
* 修复了 `<=>` 运算符与 Join 存储相关的逻辑错误，查询现可返回正确的错误代码。[#80165](https://github.com/ClickHouse/ClickHouse/pull/80165) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 `loop` 函数与 `remote` 函数家族配合使用时发生崩溃的问题。确保在 `loop(remote(...))` 中会遵循 LIMIT 子句。[#80299](https://github.com/ClickHouse/ClickHouse/pull/80299) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了 `to_utc_timestamp` 和 `from_utc_timestamp` 函数在处理 Unix 纪元 (1970-01-01) 之前以及最大日期 (2106-02-07 06:28:15) 之后的日期时的错误行为。现在，这些函数会分别将值正确限制在纪元起点和最大日期。[#80498](https://github.com/ClickHouse/ClickHouse/pull/80498) ([Surya Kant Ranjan](https://github.com/iit2009046)).
* 对于某些使用并行副本执行的查询，按顺序读取优化可能会在发起节点上生效，但无法在远程节点上生效。这会导致并行副本协调器 (位于发起节点上) 与远程节点采用不同的读取模式，属于逻辑错误。[#80652](https://github.com/ClickHouse/ClickHouse/pull/80652) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了将列类型更改为 Nullable 时，在物化投影过程中出现的逻辑错误。 [#80741](https://github.com/ClickHouse/ClickHouse/pull/80741) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复更新 TTL 时，TTL GROUP BY 中 TTL 错误重新计算的问题。[#81222](https://github.com/ClickHouse/ClickHouse/pull/81222) ([Evgeniy Ulasik](https://github.com/H0uston)) 。
* 修复了 Parquet bloom filter 的一个问题：它会将 `WHERE function(key) IN (...)` 这样的条件误按 `WHERE key IN (...)` 处理。[#81255](https://github.com/ClickHouse/ClickHouse/pull/81255) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了 `Aggregator` 在合并过程中发生异常时可能崩溃的问题。[#81450](https://github.com/ClickHouse/ClickHouse/pull/81450) ([Nikita Taranov](https://github.com/nickitat)) 。
* 已修复 `InterpreterInsertQuery::extendQueryLogElemImpl`，在需要时会为数据库名和表名补上反引号 (例如名称中包含 `-` 等特殊字符时) 。[#81528](https://github.com/ClickHouse/ClickHouse/pull/81528) ([Ilia Shvyrialkin](https://github.com/Harzu)) 。
* 修复了在 `transform_null_in=1`、左侧参数为 NULL 且子查询结果为非 Nullable 时，`IN` 执行异常的问题。[#81584](https://github.com/ClickHouse/ClickHouse/pull/81584) ([Pavel Kruglov](https://github.com/Avogar)).
* 从现有表读取时，在执行 default/materialize 表达式的过程中，不要校验实验性/可疑类型。[#81618](https://github.com/ClickHouse/ClickHouse/pull/81618) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在生存时间 (TTL) 表达式中使用字典时，合并过程中出现的 "Context has expired" 问题。 [#81690](https://github.com/ClickHouse/ClickHouse/pull/81690) ([Azat Khuzhin](https://github.com/azat)).
* 修复 CAST 函数的单调性问题。[#81722](https://github.com/ClickHouse/ClickHouse/pull/81722) ([zoomxi](https://github.com/zoomxi)) 。
* 修复了在标量关联子查询处理过程中未读取必需列的问题。修复 [#81716](https://github.com/ClickHouse/ClickHouse/issues/81716)。[#81805](https://github.com/ClickHouse/ClickHouse/pull/81805) ([Dmitry Novik](https://github.com/novikd)) 。
* 在早期版本中，服务器对 `/js` 请求返回了过多内容。此修复解决了 [#61890](https://github.com/ClickHouse/ClickHouse/issues/61890)。[#81895](https://github.com/ClickHouse/ClickHouse/pull/81895) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 此前，`MongoDB` 表引擎定义中的 `host:port` 参数可以包含路径部分，但该部分会被静默忽略。`MongoDB` 集成会拒绝加载这类表。通过这项修复，*如果 `MongoDB` 引擎有五个参数，我们现在允许加载这类表，并忽略路径部分*，同时使用参数中的数据库名称。*注意：* 此修复不适用于新创建的表，也不适用于使用 `mongo` 表函数的查询，以及字典源和命名集合。[#81942](https://github.com/ClickHouse/ClickHouse/pull/81942) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了 `Aggregator` 在 merge 期间发生异常时可能崩溃的问题。[#82022](https://github.com/ClickHouse/ClickHouse/pull/82022) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了在查询中仅使用常量别名列时，过滤器分析出错的问题。修复 [#79448](https://github.com/ClickHouse/ClickHouse/issues/79448)。[#82037](https://github.com/ClickHouse/ClickHouse/pull/82037) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复在 GROUP BY 和 SET 的生存时间 (TTL) 中使用同一列时出现的 LOGICAL\_ERROR 及其后续崩溃。[#82054](https://github.com/ClickHouse/ClickHouse/pull/82054) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复敏感信息屏蔽中对 S3 表函数参数的校验问题，防止可能出现 `LOGICAL_ERROR`，关闭 [#80620](https://github.com/ClickHouse/ClickHouse/issues/80620)。[#82056](https://github.com/ClickHouse/ClickHouse/pull/82056) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 Iceberg 中的数据竞争问题。[#82088](https://github.com/ClickHouse/ClickHouse/pull/82088) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `DatabaseReplicated::getClusterImpl`。如果 `hosts` 的第一个元素 (或前几个元素) 的 `id == DROPPED_MARK`，并且同一分片中没有其他元素，那么 `shards` 的第一个元素将为空向量，从而导致 `std::out_of_range`。[#82093](https://github.com/ClickHouse/ClickHouse/pull/82093) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复 arraySimilarity 中的复制粘贴错误，并禁止使用 UInt32 和 Int32 权重。更新测试和文档。[#82103](https://github.com/ClickHouse/ClickHouse/pull/82103) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 修复了在 `WHERE` 条件中使用 `IndexSet` 时，带有 `arrayJoin` 的查询出现 `Not found column` 错误的问题。[#82113](https://github.com/ClickHouse/ClickHouse/pull/82113) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复 Glue catalog 集成中的一个错误。现在，ClickHouse 可以读取带有嵌套数据类型的表，即使其中某些子列包含 decimal，例如：`map<string, decimal(9, 2)>`。修复了 [#81301](https://github.com/ClickHouse/ClickHouse/issues/81301)。[#82114](https://github.com/ClickHouse/ClickHouse/pull/82114) ([alesapin](https://github.com/alesapin)) 。
* 修复了在 [https://github.com/ClickHouse/ClickHouse/pull/79051](https://github.com/ClickHouse/ClickHouse/pull/79051) 中于 25.5 版本引入的 SummingMergeTree 性能退化问题。[#82130](https://github.com/ClickHouse/ClickHouse/pull/82130) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 通过 URI 传递 settings 时，以最后一个值为准。[#82137](https://github.com/ClickHouse/ClickHouse/pull/82137) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复 Iceberg 中的 "Context has expired" 问题。[#82146](https://github.com/ClickHouse/ClickHouse/pull/82146) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了服务器在内存压力下运行时远程查询可能发生死锁的问题。[#82160](https://github.com/ClickHouse/ClickHouse/pull/82160) ([Kirill](https://github.com/kirillgarbar)) 。
* 修复了 `numericIndexedVectorPointwiseAdd`、`numericIndexedVectorPointwiseSubtract`、`numericIndexedVectorPointwiseMultiply`、`numericIndexedVectorPointwiseDivide` 函数在用于大数时出现的溢出问题。[#82165](https://github.com/ClickHouse/ClickHouse/pull/82165) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了表依赖关系中的一个缺陷，该缺陷会导致 Materialized Views 遗漏 INSERT 查询。[#82222](https://github.com/ClickHouse/ClickHouse/pull/82222) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复建议线程与主客户端线程之间可能存在的数据竞争问题。[#82233](https://github.com/ClickHouse/ClickHouse/pull/82233) ([Azat Khuzhin](https://github.com/azat)).
* 现在，ClickHouse 在 schema 演进后也能从 Glue catalog 读取 Iceberg 表了。修复了 [#81272](https://github.com/ClickHouse/ClickHouse/issues/81272)。[#82301](https://github.com/ClickHouse/ClickHouse/pull/82301) ([alesapin](https://github.com/alesapin)) 。
* 修复对异步指标设置 `asynchronous_metrics_update_period_s` 和 `asynchronous_heavy_metrics_update_period_s` 的校验问题。[#82310](https://github.com/ClickHouse/ClickHouse/pull/82310) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了在包含多个 JOIN 的查询中解析 matcher 时出现的逻辑错误，关闭了 [#81969](https://github.com/ClickHouse/ClickHouse/issues/81969)。[#82421](https://github.com/ClickHouse/ClickHouse/pull/82421) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 为 AWS ECS 令牌添加过期时间，使其能够重新加载。[#82422](https://github.com/ClickHouse/ClickHouse/pull/82422) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了 `CASE` 函数中 `NULL` 参数导致的一个错误。[#82436](https://github.com/ClickHouse/ClickHouse/pull/82436) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复客户端中的数据竞争问题 (通过不使用全局上下文) 以及 `session_timezone` 覆盖问题 (此前如果 `session_timezone` 例如在 `users.xml`/客户端选项中被设置为非空，而在查询上下文中被设为空，则会使用 `users.xml` 中的值，这是错误的；现在查询上下文将始终优先于全局上下文) 。[#82444](https://github.com/ClickHouse/ClickHouse/pull/82444) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在外部表引擎中为 cached buffer 禁用边界对齐时出现的问题。该问题由 [https://github.com/ClickHouse/ClickHouse/pull/81868](https://github.com/ClickHouse/ClickHouse/pull/81868) 引入。[#82493](https://github.com/ClickHouse/ClickHouse/pull/82493) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了键值存储与经过类型转换的键进行 JOIN 时发生的崩溃问题。[#82497](https://github.com/ClickHouse/ClickHouse/pull/82497) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复在日志/query\_log 中隐藏 named collection 值的问题。关闭 [#82405](https://github.com/ClickHouse/ClickHouse/issues/82405)。[#82510](https://github.com/ClickHouse/ClickHouse/pull/82510) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在终止会话时记录日志过程中可能发生的崩溃问题，因为 user\_id 有时可能为空。[#82513](https://github.com/ClickHouse/ClickHouse/pull/82513) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了 Time 解析可能导致 msan 问题的情况。此修复对应：[#82477](https://github.com/ClickHouse/ClickHouse/issues/82477)。[#82514](https://github.com/ClickHouse/ClickHouse/pull/82514) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 禁止将 `threadpool_writer_pool_size` 设为零，以确保服务端操作不会卡死。[#82532](https://github.com/ClickHouse/ClickHouse/pull/82532) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复在分析关联列的行策略表达式时出现的 `LOGICAL_ERROR`。 [#82618](https://github.com/ClickHouse/ClickHouse/pull/82618) ([Dmitry Novik](https://github.com/novikd)).
* 修复在 `enable_shared_storage_snapshot_in_query = 1` 时，`mergeTreeProjection` 表函数中对父元数据的错误使用问题。此修复针对 [#82634](https://github.com/ClickHouse/ClickHouse/issues/82634)。[#82638](https://github.com/ClickHouse/ClickHouse/pull/82638) ([Amos Bird](https://github.com/amosbird)) 。
* 函数 `trim{Left,Right,Both}` 现已支持 `FixedString(N)` 类型的输入字符串。例如，`SELECT trimBoth(toFixedString('abc', 3), 'ac')` 现在已可正常运行。[#82691](https://github.com/ClickHouse/ClickHouse/pull/82691) ([Robert Schulze](https://github.com/rschu1ze)).
* 在 AzureBlobStorage 中，对于原生复制，我们会比较身份验证方法；如果在此过程中发生异常，代码已更新为回退到读取并复制 (即非原生复制) 。[#82693](https://github.com/ClickHouse/ClickHouse/pull/82693) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 修复了 `groupArraySample`/`groupArrayLast` 在元素为空时的反序列化问题 (如果输入为空，反序列化可能会跳过部分二进制数据，从而导致读取数据时数据损坏，并在 TCP 协议中出现 UNKNOWN\_PACKET\_FROM\_SERVER) 。这不影响数值和日期时间类型。[#82763](https://github.com/ClickHouse/ClickHouse/pull/82763) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了空 `Memory` 表的备份问题，该问题会导致备份恢复因 `BACKUP_ENTRY_NOT_FOUND` 错误而失败。[#82791](https://github.com/ClickHouse/ClickHouse/pull/82791) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复 union/intersect/except\_default\_mode 重写中的异常安全性问题。关闭 [#82664](https://github.com/ClickHouse/ClickHouse/issues/82664)。[#82820](https://github.com/ClickHouse/ClickHouse/pull/82820) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 记录异步表加载作业的数量。如果有作业正在运行，则不要在 `TransactionLog::removeOldEntries` 中更新 `tail_ptr`。[#82824](https://github.com/ClickHouse/ClickHouse/pull/82824) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复 Iceberg 中的数据竞争问题。[#82841](https://github.com/ClickHouse/ClickHouse/pull/82841) ([Azat Khuzhin](https://github.com/azat)) 。
* 设置项 `use_skip_indexes_if_final_exact_mode` 的优化 (于 25.6 引入) 可能会因 `MergeTree` 引擎设置/数据分布而无法选出合适的候选范围。该问题现已解决。[#82879](https://github.com/ClickHouse/ClickHouse/pull/82879) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 在从 AST 解析类型为 SCRAM\_SHA256\_PASSWORD 的认证数据时设置 salt 值。[#82888](https://github.com/ClickHouse/ClickHouse/pull/82888) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 使用非缓存的 Database 实现时，在返回列之后，相应表的元数据会被删除，且该引用会失效。[#82939](https://github.com/ClickHouse/ClickHouse/pull/82939) ([buyval01](https://github.com/buyval01)).
* 修复了对包含与使用 `Merge` 存储的表进行 JOIN 的查询修改过滤器时的问题。修复了 [#82092](https://github.com/ClickHouse/ClickHouse/issues/82092)。[#82950](https://github.com/ClickHouse/ClickHouse/pull/82950) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复 QueryMetricLog 中的 LOGICAL\_ERROR：Mutex 不能为空。 [#82979](https://github.com/ClickHouse/ClickHouse/pull/82979) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了函数 `formatDateTime` 在将格式说明符 `%f` 与可变长度格式说明符 (例如 `%M`) 一起使用时输出错误的问题。[#83020](https://github.com/ClickHouse/ClickHouse/pull/83020) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复了这样一个性能下降问题：在启用 analyzer 时，次级查询总是从 VIEW 中读取所有列。修复了 [#81718](https://github.com/ClickHouse/ClickHouse/issues/81718)。[#83036](https://github.com/ClickHouse/ClickHouse/pull/83036) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在只读磁盘上恢复备份时容易引起误解的错误信息。[#83051](https://github.com/ClickHouse/ClickHouse/pull/83051) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 创建无依赖关系的表时，不再检查循环依赖。这修复了在 [https://github.com/ClickHouse/ClickHouse/pull/65405](https://github.com/ClickHouse/ClickHouse/pull/65405) 中引入的性能下降问题，该问题会出现在一次创建数千张表的场景中。[#83077](https://github.com/ClickHouse/ClickHouse/pull/83077) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了将负 Time 值隐式读取到表中的问题，并澄清了相关文档，避免造成困惑。[#83091](https://github.com/ClickHouse/ClickHouse/pull/83091) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 不要在 `lowCardinalityKeys` 函数中使用共享字典中的无关部分。[#83118](https://github.com/ClickHouse/ClickHouse/pull/83118) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了子列与 materialized view 一起使用时出现的回归问题。此项修复对应：[#82784](https://github.com/ClickHouse/ClickHouse/issues/82784)。[#83221](https://github.com/ClickHouse/ClickHouse/pull/83221) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了客户端崩溃问题：在错误的 INSERT 后，连接仍处于断开状态而导致崩溃。[#83253](https://github.com/ClickHouse/ClickHouse/pull/83253) ([Azat Khuzhin](https://github.com/azat)).
* 修复了计算包含空列的块大小时发生的崩溃。[#83271](https://github.com/ClickHouse/ClickHouse/pull/83271) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 UNION 中 Variant 类型可能导致的崩溃。[#83295](https://github.com/ClickHouse/ClickHouse/pull/83295) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 clickhouse-local 在处理不受支持的 SYSTEM 查询时出现的 LOGICAL\_ERROR。[#83333](https://github.com/ClickHouse/ClickHouse/pull/83333) ([Surya Kant Ranjan](https://github.com/iit2009046)).
* 修复了 S3 客户端中的 `no_sign_request`。可用它来显式禁止对 S3 请求签名。也可以通过基于端点的设置，为特定端点单独定义它。[#83379](https://github.com/ClickHouse/ClickHouse/pull/83379) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了一个可能导致崩溃的问题：在启用 CPU 调度的情况下，带有设置 'max\_threads=1' 的查询在高负载下执行时，可能会发生崩溃。[#83387](https://github.com/ClickHouse/ClickHouse/pull/83387) ([Fan Ziqi](https://github.com/f2quantum)) 。
* 修复了当 CTE 定义引用另一个同名表表达式时触发的 `TOO_DEEP_SUBQUERIES` 异常。[#83413](https://github.com/ClickHouse/ClickHouse/pull/83413) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了执行 `REVOKE S3 ON system.*` 时会错误撤销 `*.*` 上 S3 权限的问题。此修复解决了 [#83417](https://github.com/ClickHouse/ClickHouse/issues/83417)。[#83420](https://github.com/ClickHouse/ClickHouse/pull/83420) ([pufit](https://github.com/pufit)) 。
* 不要在不同查询之间共享 async\_read\_counters。[#83423](https://github.com/ClickHouse/ClickHouse/pull/83423) ([Azat Khuzhin](https://github.com/azat)) 。
* 当子查询包含 FINAL 时，禁用并行副本。[#83455](https://github.com/ClickHouse/ClickHouse/pull/83455) ([zoomxi](https://github.com/zoomxi)).
* 修复设置 `role_cache_expiration_time_seconds` 配置中的轻微整数溢出问题 (问题 [#83374](https://github.com/ClickHouse/ClickHouse/issues/83374)) 。[#83461](https://github.com/ClickHouse/ClickHouse/pull/83461) ([wushap](https://github.com/wushap)) 。
* 修复了在 [https://github.com/ClickHouse/ClickHouse/pull/79963](https://github.com/ClickHouse/ClickHouse/pull/79963) 中引入的一个问题。向带有 definer 的 MV 插入数据时，权限检查应使用 definer 的授权。此修复解决了 [#79951](https://github.com/ClickHouse/ClickHouse/issues/79951)。[#83502](https://github.com/ClickHouse/ClickHouse/pull/83502) ([pufit](https://github.com/pufit)) 。
* 禁用对 Iceberg 数组元素和 Iceberg Map 值 (包括其所有嵌套子字段) 执行基于边界的文件剪枝。[#83520](https://github.com/ClickHouse/ClickHouse/pull/83520) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复将文件缓存用作临时数据存储时可能出现的缓存未初始化错误。 [#83539](https://github.com/ClickHouse/ClickHouse/pull/83539) ([Bharat Nallan](https://github.com/bharatnc)).
* Keeper 修复：在会话关闭删除 ephemeral 节点时，正确更新 watch 总数。[#83583](https://github.com/ClickHouse/ClickHouse/pull/83583) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 max\_untracked\_memory 相关的错误内存处理。[#83607](https://github.com/ClickHouse/ClickHouse/pull/83607) ([Azat Khuzhin](https://github.com/azat)) 。
* 带有 UNION ALL 的 INSERT SELECT 在某些边缘场景下可能导致空指针解引用。此修复已关闭 [#83618](https://github.com/ClickHouse/ClickHouse/issues/83618)。[#83643](https://github.com/ClickHouse/ClickHouse/pull/83643) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 禁止将 max\_insert\_block\_size 设置为 0，因为这可能导致逻辑错误。[#83688](https://github.com/ClickHouse/ClickHouse/pull/83688) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复 `estimateCompressionRatio()` 中 `block&#95;size&#95;bytes=0` 导致的无限循环。[#83704](https://github.com/ClickHouse/ClickHouse/pull/83704) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `IndexUncompressedCacheBytes`/`IndexUncompressedCacheCells`/`IndexMarkCacheBytes`/`IndexMarkCacheFiles` 指标 (此前它们被归入不带 `Cache` 前缀的指标中) 。[#83730](https://github.com/ClickHouse/ClickHouse/pull/83730) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在 `BackgroundSchedulePool` 关闭期间可能发生的 abort (由任务中 join 线程导致) ，以及单元测试中可能出现的挂起问题。 [#83769](https://github.com/ClickHouse/ClickHouse/pull/83769) ([Azat Khuzhin](https://github.com/azat)).
* 引入一项向后兼容设置，使新的 analyzer 在发生名称冲突时，可以在 WITH 子句中引用外层别名。修复了 [#82700](https://github.com/ClickHouse/ClickHouse/issues/82700)。[#83797](https://github.com/ClickHouse/ClickHouse/pull/83797) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在清理库桥期间，因递归锁定上下文而导致关闭时发生死锁的问题。[#83824](https://github.com/ClickHouse/ClickHouse/pull/83824) ([Azat Khuzhin](https://github.com/azat)) 。

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

* 为 ClickHouse 词法分析器构建一个最小的 C 库 (10 KB) 。这是 [#80977](https://github.com/ClickHouse/ClickHouse/issues/80977) 所必需的。[#81347](https://github.com/ClickHouse/ClickHouse/pull/81347) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。为 standalone 词法分析器添加测试，并新增测试标签 `fasttest-only`。[#82472](https://github.com/ClickHouse/ClickHouse/pull/82472) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 为 Nix 子模块输入新增检查。[#81691](https://github.com/ClickHouse/ClickHouse/pull/81691) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了在 localhost 上运行集成测试时可能出现的一系列问题。[#82135](https://github.com/ClickHouse/ClickHouse/pull/82135) ([Oleg Doronin](https://github.com/dorooleg)) 。
* 在 Mac 和 FreeBSD 上编译 SymbolIndex。 (但它仅能在 ELF 系统上工作，即 Linux 和 FreeBSD) 。[#82347](https://github.com/ClickHouse/ClickHouse/pull/82347) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 Azure SDK 升级至 v1.15.0。[#82747](https://github.com/ClickHouse/ClickHouse/pull/82747) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 将 google-cloud-cpp 的存储模块添加到构建系统中。[#82881](https://github.com/ClickHouse/ClickHouse/pull/82881) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修改 clickhouse-server 的 `Dockerfile.ubuntu`，使其符合 Docker Official Library 的要求。[#83039](https://github.com/ClickHouse/ClickHouse/pull/83039) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 对 [#83158](https://github.com/ClickHouse/ClickHouse/issues/83158) 的后续修复，以解决将构建上传到 `curl clickhouse.com` 的问题。[#83463](https://github.com/ClickHouse/ClickHouse/pull/83463) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 在 `clickhouse/clickhouse-server` 和官方 `clickhouse` 镜像中添加 `busybox` 可执行文件及安装工具。[#83735](https://github.com/ClickHouse/ClickHouse/pull/83735) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 新增对 `CLICKHOUSE_HOST` 环境变量的支持，可用于指定 ClickHouse server 主机，并与现有的 `CLICKHOUSE_USER` 和 `CLICKHOUSE_PASSWORD` 环境变量保持一致。这样一来，无需直接修改客户端或配置文件，即可更轻松地完成配置。[#83659](https://github.com/ClickHouse/ClickHouse/pull/83659) ([Doron David](https://github.com/dorki)) 。

<div id="256">
  ### ClickHouse 发行版 25.6，2025-06-26
</div>

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

* 此前，即使 `pattern` 接受空匹配，函数 `countMatches` 也会在首次出现空匹配时停止计数。为解决此问题，`countMatches` 现在会在发生空匹配时向前推进一个字符，并继续执行。希望保留旧行为的用户可以启用设置 `count_matches_stop_at_empty_match`。[#81676](https://github.com/ClickHouse/ClickHouse/pull/81676) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 次要：强制将 `backup_threads` 和 `restore_threads` 服务器设置为非零。[#80224](https://github.com/ClickHouse/ClickHouse/pull/80224) ([Raúl Marín](https://github.com/Algunenano)).
* 次要：修复 `bitNot` 作用于 `String` 时，会在内部内存表示中返回以零结尾的字符串的问题。这不会影响任何用户可见的行为，但作者希望特别说明这一变更。[#80791](https://github.com/ClickHouse/ClickHouse/pull/80791) ([Azat Khuzhin](https://github.com/azat)).

#### 新特性

* 新增数据类型：`Time` (\[H]HH:MM:SS) 和 `Time64` (\[H]HH:MM:SS\[.fractional]) ，以及一些基础类型转换函数和与其他数据类型交互的函数。新增了用于兼容现有函数 `toTime` 的设置。目前，设置 `use_legacy_to_time` 以保留旧行为。[#81217](https://github.com/ClickHouse/ClickHouse/pull/81217) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。支持对 Time/Time64 进行比较。[#80327](https://github.com/ClickHouse/ClickHouse/pull/80327) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 一个新的 CLI 工具 [`chdig`](https://github.com/azat/chdig/)——用于 ClickHouse 的 TUI 界面 (类似 `top`) ，现已并入 ClickHouse。[#79666](https://github.com/ClickHouse/ClickHouse/pull/79666) ([Azat Khuzhin](https://github.com/azat)) 。
* 支持为 `Atomic` 和 `Ordinary` 数据库引擎设置 `disk` 参数，用于指定存放表元数据文件的磁盘。[#80546](https://github.com/ClickHouse/ClickHouse/pull/80546) ([Tuan Pham Anh](https://github.com/tuanpach)) 。这样就可以附加来自外部来源的数据库。
* 一种新的 MergeTree 类型：`CoalescingMergeTree`——该引擎会在后台合并期间采用第一个非 NULL 值。此项修复了 [#78869](https://github.com/ClickHouse/ClickHouse/issues/78869)。[#79344](https://github.com/ClickHouse/ClickHouse/pull/79344) ([scanhex12](https://github.com/scanhex12)) 。
* 新增对读取 WKB 的函数支持 (“Well-Known Binary”是一种用于对各种几何类型进行二进制编码的格式，常用于 GIS 应用) 。参见 [#43941](https://github.com/ClickHouse/ClickHouse/issues/43941)。[#80139](https://github.com/ClickHouse/ClickHouse/pull/80139) ([scanhex12](https://github.com/scanhex12)) 。
* 新增了面向工作负载的查询槽位调度功能，详情请参见[工作负载调度](/zh/concepts/features/configuration/server-config/workload-scheduling#query_scheduling)。[#78415](https://github.com/ClickHouse/ClickHouse/pull/78415) ([Sergei Trifonov](https://github.com/serxa)).
* `timeSeries*` 辅助函数可在处理时间序列数据的某些场景中加快速度：- 将数据按指定的起始时间戳、结束时间戳和 step 重采样到时间网格 - 计算类似 PromQL 的 `delta`、`rate`、`idelta` 和 `irate`。[#80590](https://github.com/ClickHouse/ClickHouse/pull/80590) ([Alexander Gololobov](https://github.com/davenger)) 。
* 新增 `mapContainsValuesLike`/`mapContainsValues`/`mapExtractValuesLike` 函数，用于按 map 值进行过滤，并支持在基于 bloom filter 的索引中使用这些函数。[#78171](https://github.com/ClickHouse/ClickHouse/pull/78171) ([UnamedRus](https://github.com/UnamedRus)) 。
* 现在，设置约束可以指定一组禁止的值。[#78499](https://github.com/ClickHouse/ClickHouse/pull/78499) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 新增了一个设置 `enable_shared_storage_snapshot_in_query`，用于在单个查询的所有子查询中共享同一个存储快照。这样即使同一张表在一个查询中被多次引用，也能确保读取结果一致。[#79471](https://github.com/ClickHouse/ClickHouse/pull/79471) ([Amos Bird](https://github.com/amosbird)).
* 支持直接将 `JSON` 列写入 `Parquet`，并直接从 `Parquet` 中读取 `JSON` 列。[#79649](https://github.com/ClickHouse/ClickHouse/pull/79649) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 为 `pointInPolygon` 增加对 `MultiPolygon` 的支持。[#79773](https://github.com/ClickHouse/ClickHouse/pull/79773) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增支持通过 `deltaLakeLocal` 表函数查询本地文件系统挂载的 Delta 表。[#79781](https://github.com/ClickHouse/ClickHouse/pull/79781) ([roykim98](https://github.com/roykim98)).
* 新增设置 `cast_string_to_date_time_mode`，可在从 String 转换时选择 DateTime 的解析模式。[#80210](https://github.com/ClickHouse/ClickHouse/pull/80210) ([Pavel Kruglov](https://github.com/Avogar)) 。例如，可将其设置为 best effort 模式。
* 新增了 `bech32Encode` 和 `bech32Decode` 函数，用于支持比特币的 Bech 算法 (问题 [#40381](https://github.com/ClickHouse/ClickHouse/issues/40381)) 。[#80239](https://github.com/ClickHouse/ClickHouse/pull/80239) ([George Larionov](https://github.com/glarik)) 。
* 新增了用于分析 MergeTree parts 名称的 SQL 函数。[#80573](https://github.com/ClickHouse/ClickHouse/pull/80573) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 通过引入新的虚拟列 `_disk_name`，现在可以按 parts 所在的磁盘对查询选中的 parts 进行过滤。 [#80650](https://github.com/ClickHouse/ClickHouse/pull/80650) ([tanner-bruce](https://github.com/tanner-bruce)).
* 新增一个着陆页，用于列出嵌入的 Web 工具。当收到来自浏览器类 User-Agent 的请求时，将打开该页面。[#81129](https://github.com/ClickHouse/ClickHouse/pull/81129) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 函数 `arrayFirst`、`arrayFirstIndex`、`arrayLast` 和 `arrayLastIndex` 会过滤掉过滤表达式返回的 NULL 值。此前版本不支持 Nullable 类型的过滤结果。修复了 [#81113](https://github.com/ClickHouse/ClickHouse/issues/81113)。[#81197](https://github.com/ClickHouse/ClickHouse/pull/81197) ([Lennard Eijsackers](https://github.com/Blokje5)) 。
* 现在支持使用 `USE DATABASE name`，替代 `USE name`。[#81307](https://github.com/ClickHouse/ClickHouse/pull/81307) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 新增了一个系统表 `system.codecs`，用于查看可用编解码器的信息。 (问题 [#81525](https://github.com/ClickHouse/ClickHouse/issues/81525)) 。[#81600](https://github.com/ClickHouse/ClickHouse/pull/81600) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 支持 `lag` 和 `lead` window functions。解决了 [#9887](https://github.com/ClickHouse/ClickHouse/issues/9887)。[#82108](https://github.com/ClickHouse/ClickHouse/pull/82108) ([Dmitry Novik](https://github.com/novikd)).
* 函数 `tokens` 现支持一种名为 `split` 的新分词器，非常适用于日志。[#80195](https://github.com/ClickHouse/ClickHouse/pull/80195) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 在 `clickhouse-local` 中新增了对 `--database` 参数的支持。你可以切换到先前创建的数据库。此项修复关闭了 [#44115](https://github.com/ClickHouse/ClickHouse/issues/44115)。[#81465](https://github.com/ClickHouse/ClickHouse/pull/81465) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* 为 `Kafka2` 使用 ClickHouse Keeper 实现了类似 Kafka 重平衡的逻辑。对于每个副本，我们支持两种分区锁：永久锁和临时锁。副本会尽可能长时间持有永久锁；在任意时刻，每个副本上的永久锁数量都不超过 `all_topic_partitions / active_replicas_count` (其中 `all_topic_partitions` 是所有分区的总数，`active_replicas_count` 是活跃副本数) 。如果超过这个数量，副本就会释放部分分区。某些分区会由副本临时持有。每个副本上的临时锁最大数量会动态变化，以便给其他副本机会将一些分区纳入永久锁。更新临时锁时，副本会先全部释放，再尝试重新获取其中一部分。[#78726](https://github.com/ClickHouse/ClickHouse/pull/78726) ([Daria Fomina](https://github.com/sinfillo)).
* 对 Experimental 文本索引的一项改进：现在支持通过键值对显式指定参数。目前支持的参数包括必需的 `tokenizer`，以及两个可选参数 `max_rows_per_postings_list` 和 `ngram_size`。[#80262](https://github.com/ClickHouse/ClickHouse/pull/80262) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 此前，全文索引不支持 `packed` 存储，因为段 id 会通过读取和写入磁盘上的 (`.gin_sid`) 文件进行即时更新。在 `packed` 存储场景下，不支持从未提交的文件中读取值，因此会导致问题。现在这个问题已经解决。[#80852](https://github.com/ClickHouse/ClickHouse/pull/80852) ([Elmi Ahmadov](https://github.com/ahmadov)).
* `gin` 类型的 Experimental 索引 (我并不喜欢这个名字，因为这是 PostgreSQL 黑客圈里的一个内部笑话) 已重命名为 `text`。现有的 `gin` 类型索引仍可加载，但如果尝试在搜索中使用它们，就会抛出异常 (并提示改用 `text` 索引) 。[#80855](https://github.com/ClickHouse/ClickHouse/pull/80855) ([Robert Schulze](https://github.com/rschu1ze)).

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

* 启用多 projection 过滤支持，允许在 part 级过滤中使用多个 projection。这解决了 [#55525](https://github.com/ClickHouse/ClickHouse/issues/55525)。这是继 [#78429](https://github.com/ClickHouse/ClickHouse/issues/78429) 之后，实现 projection 索引的第二步。[#80343](https://github.com/ClickHouse/ClickHouse/pull/80343) ([Amos Bird](https://github.com/amosbird)) 。
* 默认使用 `SLRU` 作为文件系统缓存策略。[#75072](https://github.com/ClickHouse/ClickHouse/pull/75072) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 消除查询管道中 Resize 步骤里的竞争。[#77562](https://github.com/ClickHouse/ClickHouse/pull/77562) ([Zhiguo Zhou](https://github.com/ZhiguoZh)) 。
* 引入了一个选项，可将块的 (解) 压缩和 (反) 序列化卸载到管道线程中，而不再由与网络连接关联的单个线程处理。该选项由设置 `enable_parallel_blocks_marshalling` 控制。这应能加快在发起节点与远程节点之间传输大量数据的分布式查询。[#78694](https://github.com/ClickHouse/ClickHouse/pull/78694) ([Nikita Taranov](https://github.com/nickitat)) 。
* 所有 bloom filter 类型的性能都有所提升。[OpenHouse 大会视频](https://www.youtube.com/watch?v=yIVz0NKwQvA\&pp=ygUQb3BlbmhvdXNlIG9wZW5haQ%3D%3D) [#79800](https://github.com/ClickHouse/ClickHouse/pull/79800) ([Delyan Kratunov](https://github.com/dkratunov)).
* 在 `UniqExactSet::merge` 中，当其中一个集合为空时，新增了快速路径。此外，现在如果左侧 (LHS) 集合是两级而右侧 (RHS) 是单级，则不会再将 RHS 转换为两级。[#79971](https://github.com/ClickHouse/ClickHouse/pull/79971) ([Nikita Taranov](https://github.com/nickitat)).
* 在使用两级哈希表时，提高内存复用效率并减少缺页错误，从而加快 GROUP BY。[#80245](https://github.com/ClickHouse/ClickHouse/pull/80245) ([Jiebin Sun](https://github.com/jiebinn)) 。
* 避免不必要的更新，减少查询条件缓存中的锁竞争。[#80247](https://github.com/ClickHouse/ClickHouse/pull/80247) ([Jiebin Sun](https://github.com/jiebinn)) 。
* 对 `concatenateBlocks` 进行了小幅优化。预计会对并行哈希连接有所帮助。[#80328](https://github.com/ClickHouse/ClickHouse/pull/80328) ([李扬](https://github.com/taiyang-li)).
* 在根据主键范围选择标记范围时，如果主键被函数包裹，就无法使用二分查找。此 PR 改进了这一限制：当主键被始终保持单调性的函数链包裹时，或者当 RPN 中包含一个始终为真的元素时，仍然可以使用二分查找。关闭 [#45536](https://github.com/ClickHouse/ClickHouse/issues/45536)。[#80597](https://github.com/ClickHouse/ClickHouse/pull/80597) ([zoomxi](https://github.com/zoomxi)).
* 提升 `Kafka` 引擎的关闭速度 (在存在多个 `Kafka` 表的情况下，移除额外的 3 秒延迟) 。[#80796](https://github.com/ClickHouse/ClickHouse/pull/80796) ([Azat Khuzhin](https://github.com/azat)) 。
* 异步插入：降低内存占用并提升插入查询性能。[#80972](https://github.com/ClickHouse/ClickHouse/pull/80972) ([Raúl Marín](https://github.com/Algunenano)) 。
* 如果禁用了日志表，则不要分析处理器的性能。[#81256](https://github.com/ClickHouse/ClickHouse/pull/81256) ([Raúl Marín](https://github.com/Algunenano))。这会提升极短查询的速度。
* 当源值恰好与请求的内容一致时，提升 `toFixedString` 的速度。[#81257](https://github.com/ClickHouse/ClickHouse/pull/81257) ([Raúl Marín](https://github.com/Algunenano)).
* 如果用户未受配额限制，则不处理配额值。[#81549](https://github.com/ClickHouse/ClickHouse/pull/81549) ([Raúl Marín](https://github.com/Algunenano)) 。这可以加快极短查询的执行速度。
* 修复了内存跟踪中的性能回归问题。[#81694](https://github.com/ClickHouse/ClickHouse/pull/81694) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 改进了分布式查询对分片键的优化。[#78452](https://github.com/ClickHouse/ClickHouse/pull/78452) ([fhw12345](https://github.com/fhw12345)).
* 并行副本：如果所有读取任务都已分配给其他副本，则避免等待未使用的慢副本。[#80199](https://github.com/ClickHouse/ClickHouse/pull/80199) ([Igor Nikonov](https://github.com/devcrafter)).
* 并行副本现使用单独的连接超时设置，参见 `parallel_replicas_connect_timeout_ms`。此前，`connect_timeout_with_failover_ms`/`connect_timeout_with_failover_secure_ms` 设置用作并行副本查询的连接超时值 (默认 1 秒) 。[#80421](https://github.com/ClickHouse/ClickHouse/pull/80421) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 在启用日志的 filesystem 中，`mkdir` 会写入 filesystem 的日志，并持久化到磁盘。在磁盘较慢的情况下，这可能会耗费较长时间。将其移出 reserve lock 的作用域。[#81371](https://github.com/ClickHouse/ClickHouse/pull/81371) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 将 Iceberg manifest 文件的读取延后到首次读取查询执行时。[#81619](https://github.com/ClickHouse/ClickHouse/pull/81619) ([Daniil Ivanik](https://github.com/divanik)).
* 在适用情况下，允许将 `GLOBAL [NOT] IN` 谓词移至 `PREWHERE` 子句。[#79996](https://github.com/ClickHouse/ClickHouse/pull/79996) ([Eduard Karacharov](https://github.com/korowa)) 。

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

* `EXPLAIN SYNTAX` 现在使用新的 analyzer。它会返回基于查询树构建的 AST。新增了选项 `query_tree_passes`，用于控制在将查询树转换为 AST 之前要执行的遍历次数。[#74536](https://github.com/ClickHouse/ClickHouse/pull/74536) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 在 Native 格式中为 Dynamic 和 JSON 实现了扁平化序列化，使得无需依赖 Dynamic 的 shared variant 和 JSON 的 shared data 等特殊结构，即可对 Dynamic 和 JSON 数据进行序列化/反序列化。可通过设置 `output_format_native_use_flattened_dynamic_and_json_serialization` 启用此序列化方式。这样一来，不同语言的客户端将更容易在 TCP 协议中支持 Dynamic 和 JSON。[#80499](https://github.com/ClickHouse/ClickHouse/pull/80499) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在出现 `AuthenticationRequired` 错误后刷新 `S3` 凭证。[#77353](https://github.com/ClickHouse/ClickHouse/pull/77353) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在 `system.asynchronous_metrics` 中新增了字典指标：- `DictionaryMaxUpdateDelay` - 字典更新的最大延迟 (以秒为单位) 。- `DictionaryTotalFailedUpdates` - 自上次成功加载以来，所有字典发生的错误总数。[#78175](https://github.com/ClickHouse/ClickHouse/pull/78175) ([Vlad](https://github.com/codeworse)).
* 新增一则关于可能为保存损坏表而创建的数据库的警告。[#78841](https://github.com/ClickHouse/ClickHouse/pull/78841) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 在 `S3Queue` 和 `AzureQueue` 引擎中新增 `_time` 虚拟列。[#78926](https://github.com/ClickHouse/ClickHouse/pull/78926) ([Anton Ivashkin](https://github.com/ianton-ru)) 。
* 使控制在 CPU 过载时断开连接的设置支持热重载。[#79052](https://github.com/ClickHouse/ClickHouse/pull/79052) ([Alexey Katsman](https://github.com/alexkats)) 。
* 为 Azure Blob 存储中普通磁盘在 system.tables 里报告的数据路径添加容器前缀，使其与 S3 和 GCP 的报告保持一致。[#79241](https://github.com/ClickHouse/ClickHouse/pull/79241) ([Julia Kartseva](https://github.com/jkartseva)).
* 现在，`clickhouse-client` 和 `local` 除了支持 `param_<name>` (下划线) 外，也支持使用 `param-<name>` (短横线) 形式的 query parameters。这解决了 [#63093](https://github.com/ClickHouse/ClickHouse/issues/63093)。[#79429](https://github.com/ClickHouse/ClickHouse/pull/79429) ([Engel Danila](https://github.com/aaaengel)) 。
* 启用校验和后，在将数据从本地复制到远程 S3 时，会显示有关带宽折减的详细警告信息。[#79464](https://github.com/ClickHouse/ClickHouse/pull/79464) ([VicoWu](https://github.com/VicoWu)).
* 此前，当 `input_format_parquet_max_block_size = 0` (无效值) 时，ClickHouse 会卡死。现在这一问题已修复。此更改解决了 [#79394](https://github.com/ClickHouse/ClickHouse/issues/79394)。[#79601](https://github.com/ClickHouse/ClickHouse/pull/79601) ([abashkeev](https://github.com/abashkeev)) 。
* 为 `startup_scripts` 新增 `throw_on_error` 设置：当 `throw_on_error` 为 true 时，只有所有查询都成功完成，服务器才会启动。默认情况下，`throw_on_error` 为 false，保持此前的行为不变。[#79732](https://github.com/ClickHouse/ClickHouse/pull/79732) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* 允许在任意类型的 `http_handlers` 中添加 `http_response_headers`。[#79975](https://github.com/ClickHouse/ClickHouse/pull/79975) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 函数 `reverse` 现已支持 `Tuple` 数据类型。解决了 [#80053](https://github.com/ClickHouse/ClickHouse/issues/80053)。[#80083](https://github.com/ClickHouse/ClickHouse/pull/80083) ([flynn](https://github.com/ucasfl)) 。
* 解决 [#75817](https://github.com/ClickHouse/ClickHouse/issues/75817)：允许通过 `system.zookeeper` 表获取 `auxiliary_zookeepers` 数据。[#80146](https://github.com/ClickHouse/ClickHouse/pull/80146) ([Nikolay Govorov](https://github.com/mrdimidium)) 。
* 新增有关服务器 TCP 套接字的异步指标，提升了可观测性。关闭 [#80187](https://github.com/ClickHouse/ClickHouse/issues/80187)。[#80188](https://github.com/ClickHouse/ClickHouse/pull/80188) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 支持将 `anyLast_respect_nulls` 和 `any_respect_nulls` 作为 `SimpleAggregateFunction` 使用。[#80219](https://github.com/ClickHouse/ClickHouse/pull/80219) ([Diskein](https://github.com/Diskein)) 。
* 移除对 Replicated 数据库不必要的 `adjustCreateQueryForBackup` 调用。[#80282](https://github.com/ClickHouse/ClickHouse/pull/80282) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 允许 `clickhouse-local` 使用不带等号的额外选项 (位于 `--` 之后，例如 `-- --config.value='abc'`) 。修复 [#80292](https://github.com/ClickHouse/ClickHouse/issues/80292)。[#80293](https://github.com/ClickHouse/ClickHouse/pull/80293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 `SHOW ... LIKE` 查询中高亮元字符。此更改关闭了 [#80275](https://github.com/ClickHouse/ClickHouse/issues/80275)。[#80297](https://github.com/ClickHouse/ClickHouse/pull/80297) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使 `clickhouse-local` 中的 SQL UDF 支持持久化。此前创建的函数会在启动时加载。此更改关闭了 [#80085](https://github.com/ClickHouse/ClickHouse/issues/80085)。[#80300](https://github.com/ClickHouse/ClickHouse/pull/80300) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 explain plan 中 preliminary DISTINCT 步骤的说明。[#80330](https://github.com/ClickHouse/ClickHouse/pull/80330) ([UnamedRus](https://github.com/UnamedRus)) 。
* 支持在 ODBC/JDBC 中使用命名集合。[#80334](https://github.com/ClickHouse/ClickHouse/pull/80334) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 只读和损坏磁盘数量的指标。DiskLocalCheckThread 启动时会记录一条指示日志。[#80391](https://github.com/ClickHouse/ClickHouse/pull/80391) ([VicoWu](https://github.com/VicoWu)) 。
* 实现了 `s3_plain_rewritable` 存储对 projections 的支持。在之前的版本中，S3 中引用 projections 的元数据对象在移动后不会更新。关闭 [#70258](https://github.com/ClickHouse/ClickHouse/issues/70258)。[#80393](https://github.com/ClickHouse/ClickHouse/pull/80393) ([Sav](https://github.com/sberss)).
* `SYSTEM UNFREEZE` 命令不会尝试在只读磁盘和一次写入磁盘上查找 parts。此更改关闭了 [#80430](https://github.com/ClickHouse/ClickHouse/issues/80430)。[#80432](https://github.com/ClickHouse/ClickHouse/pull/80432) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 下调了与合并后 parts 相关消息的日志级别。[#80476](https://github.com/ClickHouse/ClickHouse/pull/80476) ([Hans Krutzer](https://github.com/hkrutzer)) 。
* 调整 Iceberg 表分区裁剪的默认行为。[#80583](https://github.com/ClickHouse/ClickHouse/pull/80583) ([Melvyn Peignon](https://github.com/melvynator)) 。
* 为提升索引搜索算法的可观测性，新增了两个 ProfileEvents：`IndexBinarySearchAlgorithm` 和 `IndexGenericExclusionSearchAlgorithm`。[#80679](https://github.com/ClickHouse/ClickHouse/pull/80679) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 对于旧版内核不支持 `MADV_POPULATE_WRITE` 的情况，不要在日志中报错 (以免污染日志) 。[#80704](https://github.com/ClickHouse/ClickHouse/pull/80704) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增了 `TTL` 表达式对 `Date32` 和 `DateTime64` 的支持。[#80710](https://github.com/ClickHouse/ClickHouse/pull/80710) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 调整 `max_merge_delayed_streams_for_parallel_write` 的兼容性取值。[#80760](https://github.com/ClickHouse/ClickHouse/pull/80760) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一处崩溃问题：如果在析构函数中尝试删除临时文件时抛出异常 (这些文件用于将临时数据落盘到磁盘) ，程序可能会终止。[#80776](https://github.com/ClickHouse/ClickHouse/pull/80776) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `SYSTEM SYNC REPLICA` 新增 `IF EXISTS` 修饰符。[#80810](https://github.com/ClickHouse/ClickHouse/pull/80810) ([Raúl Marín](https://github.com/Algunenano)) 。
* 扩展了关于 "Having zero bytes, but read range is not finished..." 的异常消息，并为 `system.filesystem_cache` 添加了 `finished_download_time` 列。[#80849](https://github.com/ClickHouse/ClickHouse/pull/80849) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在配合 `EXPLAIN` 使用 indexes = 1 时，其输出中会新增搜索算法部分，显示 "binary search" 或 "generic exclusion search" 之一。[#80881](https://github.com/ClickHouse/ClickHouse/pull/80881) ([Pablo Marcos](https://github.com/pamarcos)).
* 在 2024 年初，由于新的 analyzer 默认未启用，MySQL handler 的 `prefer_column_name_to_alias` 被硬编码为 true。现在，这个硬编码可以去掉了。[#80916](https://github.com/ClickHouse/ClickHouse/pull/80916) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 现在，`system.iceberg_history` 也会显示诸如 glue 或 iceberg rest 这类目录数据库的历史记录。此外，为保持一致性，`system.iceberg_history` 中的 `table_name` 和 `database_name` 列已分别重命名为 `table` 和 `database`。[#80975](https://github.com/ClickHouse/ClickHouse/pull/80975) ([alesapin](https://github.com/alesapin)).
* 允许 `merge` 表函数在只读模式下使用，因此使用它时不再需要 `CREATE TEMPORARY TABLE` 权限。[#80981](https://github.com/ClickHouse/ClickHouse/pull/80981) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 改进了内存缓存的内部信息展示 (通过 `system.metrics` 而非不完整的 `system.asynchronouse_metrics` 暴露缓存相关信息) 。在 `dashboard.html` 中添加了内存缓存大小 (以字节为单位) 。`VectorSimilarityIndexCacheSize`/`IcebergMetadataFilesCacheSize` 已重命名为 `VectorSimilarityIndexCacheBytes`/`IcebergMetadataFilesCacheBytes`。[#81023](https://github.com/ClickHouse/ClickHouse/pull/81023) ([Azat Khuzhin](https://github.com/azat)) 。
* 从 `system.rocksdb` 读取时，忽略那些使用了无法包含 `RocksDB` 表的引擎的数据库。[#81083](https://github.com/ClickHouse/ClickHouse/pull/81083) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 允许在 `clickhouse-local` 的配置文件中使用 `filesystem_caches` 和 `named_collections`。[#81105](https://github.com/ClickHouse/ClickHouse/pull/81105) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `INSERT` 查询中 `PARTITION BY` 的语法高亮问题。在之前的版本中，`PARTITION BY` 不会被高亮为关键字。[#81106](https://github.com/ClickHouse/ClickHouse/pull/81106) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI 的两项小改进：- 正确处理没有输出的查询，例如 `CREATE`、`INSERT` (此前，这些查询会导致加载指示器一直转个不停) ；- 双击表时，滚动到顶部。[#81131](https://github.com/ClickHouse/ClickHouse/pull/81131) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `MemoryResidentWithoutPageCache` 指标表示 server 进程使用的物理内存量 (以字节为单位) ，不包括用户态页缓存。在使用用户态页缓存时，它能更准确地反映实际内存使用情况。禁用用户态页缓存时，该值等于 `MemoryResident`。 [#81233](https://github.com/ClickHouse/ClickHouse/pull/81233) ([Jayme Bird](https://github.com/jaymebrd)) 。
* 将客户端、本地服务器、Keeper 客户端和磁盘应用中已手动记录的异常标记为“已记录”，以避免重复记录。[#81271](https://github.com/ClickHouse/ClickHouse/pull/81271) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 设置 `use_skip_indexes_if_final` 和 `use_skip_indexes_if_final_exact_mode` 的默认值现已改为 `True`。带有 `FINAL` 子句的查询现在会使用跳过索引 (如适用) 来筛选粒度，同时还会读取与匹配主键范围对应的其他粒度。对于需要此前近似/不精确结果行为的用户，在经过谨慎评估后，可以将 `use_skip_indexes_if_final_exact_mode` 设置为 FALSE。 [#81331](https://github.com/ClickHouse/ClickHouse/pull/81331) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 当你在 Web UI 中有多个查询时，它会运行光标所在位置对应的那条查询。延续 [#80977](https://github.com/ClickHouse/ClickHouse/issues/80977)。[#81354](https://github.com/ClickHouse/ClickHouse/pull/81354) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 此 PR 解决了转换函数在单调性检查中实现 `is_strict` 时存在的问题。目前，某些转换函数 (如 `toFloat64(UInt32)` 和 `toDate(UInt8)`) 会错误地将 `is_strict` 返回为 false，而实际上应返回 true。[#81359](https://github.com/ClickHouse/ClickHouse/pull/81359) ([zoomxi](https://github.com/zoomxi)).
* 在检查 `KeyCondition` 是否匹配连续区间时，如果键经过非严格函数链封装，可能需要将 `Constraint::POINT` 转换为 `Constraint::RANGE`。例如：`toDate(event_time) = '2025-06-03'` 意味着 `event_time` 对应一个区间：\['2025-06-03 00:00:00', '2025-06-04 00:00:00')。此 PR 修复了这一问题。[#81400](https://github.com/ClickHouse/ClickHouse/pull/81400) ([zoomxi](https://github.com/zoomxi)).
* `clickhouse`/`ch` 别名在指定 `--host` 或 `--port` 时，会调用 `clickhouse-client` 而非 `clickhouse-local`。延续 [#79422](https://github.com/ClickHouse/ClickHouse/issues/79422)。关闭了 [#65252](https://github.com/ClickHouse/ClickHouse/issues/65252)。[#81509](https://github.com/ClickHouse/ClickHouse/pull/81509) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 既然我们已经有了 Keeper 响应时间分布的数据，就可以为指标优化直方图分桶。[#81516](https://github.com/ClickHouse/ClickHouse/pull/81516) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增 profile 事件 `PageCacheReadBytes`。[#81742](https://github.com/ClickHouse/ClickHouse/pull/81742) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复文件系统缓存中的逻辑错误："字节数为零，但范围尚未结束"。[#81868](https://github.com/ClickHouse/ClickHouse/pull/81868) ([Kseniia Sumarokova](https://github.com/kssenii)) 。

#### 缺陷修复 (官方稳定版本中用户可见的问题行为)

* 修复参数化视图中使用 SELECT EXCEPT 查询时的问题。关闭了 [#49447](https://github.com/ClickHouse/ClickHouse/issues/49447)。[#57380](https://github.com/ClickHouse/ClickHouse/pull/57380) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* analyzer：修复了 join 中列类型提升后列投影名称错误的问题。解决了 [#63345](https://github.com/ClickHouse/ClickHouse/issues/63345)。[#63519](https://github.com/ClickHouse/ClickHouse/pull/63519) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在启用 analyzer\_compatibility\_join\_using\_top\_level\_identifier 时，列名冲突场景下的一个逻辑错误。[#75676](https://github.com/ClickHouse/ClickHouse/pull/75676) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复在启用 `allow_push_predicate_ast_for_distributed_subqueries` 时下推谓词中 CTE 的使用问题。修复了 [#75647](https://github.com/ClickHouse/ClickHouse/issues/75647)。修复了 [#79672](https://github.com/ClickHouse/ClickHouse/issues/79672)。[#77316](https://github.com/ClickHouse/ClickHouse/pull/77316) ([Dmitry Novik](https://github.com/novikd)).
* 修复了一个问题：即使指定的副本并不存在，SYSTEM SYNC REPLICA LIGHTWEIGHT 'foo' 也会显示成功。该命令现在会在尝试同步前，先正确验证该副本是否存在于 Keeper 中。[#78405](https://github.com/ClickHouse/ClickHouse/pull/78405) ([Jayme Bird](https://github.com/jaymebrd)) 。
* 修复了一个非常特定情况下的崩溃问题：当在 `ON CLUSTER` 查询的 `CONSTRAINT` 部分中使用 `currentDatabase` 函数时，会触发该问题。关闭 [#78100](https://github.com/ClickHouse/ClickHouse/issues/78100)。[#79070](https://github.com/ClickHouse/ClickHouse/pull/79070) ([pufit](https://github.com/pufit)).
* 修复了在服务器间查询中传递外部角色的问题。[#79099](https://github.com/ClickHouse/ClickHouse/pull/79099) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 在 SingleValueDataGeneric 中改用 IColumn 而不是 Field。这修复了某些聚合函数 (如 `argMax`) 在 `Dynamic/Variant/JSON` 类型下返回值错误的问题。[#79166](https://github.com/ClickHouse/ClickHouse/pull/79166) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 Azure Blob 存储中应用 use\_native\_copy 和 allow\_azure\_native\_copy 设置的问题，并调整为仅在凭证一致时才使用原生复制，解决了 [#78964](https://github.com/ClickHouse/ClickHouse/issues/78964)。[#79561](https://github.com/ClickHouse/ClickHouse/pull/79561) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 修复了在检查某列是否为关联列时出现的、有关该列来源作用域未知的逻辑错误。修复了 [#78183](https://github.com/ClickHouse/ClickHouse/issues/78183)。修复了 [#79451](https://github.com/ClickHouse/ClickHouse/issues/79451)。[#79727](https://github.com/ClickHouse/ClickHouse/pull/79727) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复 grouping sets 与 ColumnConst 及 analyzer 一起使用时结果错误的问题。[#79743](https://github.com/ClickHouse/ClickHouse/pull/79743) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 修复从分布式表读取数据时，在本地副本已过期的情况下本地分片结果重复的问题。[#79761](https://github.com/ClickHouse/ClickHouse/pull/79761) ([Eduard Karacharov](https://github.com/korowa)).
* 修复带负号符号位的 NaN 的排序顺序。[#79847](https://github.com/ClickHouse/ClickHouse/pull/79847) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 现在，GROUP BY ALL 不再将 GROUPING 部分纳入考虑。[#79915](https://github.com/ClickHouse/ClickHouse/pull/79915) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了 `TopK` / `TopKWeighted` 函数中错误的状态合并问题；此前即使容量未耗尽，也会导致错误值过多。[#79939](https://github.com/ClickHouse/ClickHouse/pull/79939) ([Joel Höner](https://github.com/athre0z)).
* 在 `azure_blob_storage` 对象存储中支持遵循 `readonly` 设置。[#79954](https://github.com/ClickHouse/ClickHouse/pull/79954) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复了在使用带有反斜杠转义字符的 `match(column, '^…')` 时出现的查询结果错误和内存不足崩溃问题。[#79969](https://github.com/ClickHouse/ClickHouse/pull/79969) ([filimonov](https://github.com/filimonov)).
* 为数据湖禁用 Hive 分区功能。部分修复了 [https://github.com/issues/assigned?issue=ClickHouse%7CClickHouse%7C79937。](https://github.com/issues/assigned?issue=ClickHouse%7CClickHouse%7C79937。) [#80005](https://github.com/ClickHouse/ClickHouse/pull/80005) ([Daniil Ivanik](https://github.com/divanik)).
* 包含 lambda 表达式的跳过索引无法生效。修复了这样一种情况：当索引定义中的高层函数与查询中的函数完全一致时，跳过索引仍无法生效。[#80025](https://github.com/ClickHouse/ClickHouse/pull/80025) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复副本根据复制日志执行 ATTACH\_PART 命令附加 part 时的元数据版本问题。[#80038](https://github.com/ClickHouse/ClickHouse/pull/80038) ([Aleksei Filatov](https://github.com/aalexfvk)) 。
* 可执行用户自定义函数 (eUDF) 的名称不会像其他函数那样被添加到 `system.query_log` 表的 `used_functions` 列中。此 PR 实现了在请求中使用 eUDF 时，将其名称也添加进去。[#80073](https://github.com/ClickHouse/ClickHouse/pull/80073) ([Kyamran](https://github.com/nibblerenush)).
* 修复了 Arrow 格式中 `LowCardinality(FixedString)` 的逻辑错误。[#80156](https://github.com/ClickHouse/ClickHouse/pull/80156) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复从 Merge 引擎读取子列时的问题。[#80158](https://github.com/ClickHouse/ClickHouse/pull/80158) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 `KeyCondition` 中数值类型之间比较时的一个错误。[#80207](https://github.com/ClickHouse/ClickHouse/pull/80207) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了对带有投影的表应用惰性物化时出现的 AMBIGUOUS\_COLUMN\_NAME 问题。[#80251](https://github.com/ClickHouse/ClickHouse/pull/80251) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了在使用隐式投影时，对类似 LIKE 'ab\_c%' 这类字符串前缀过滤器进行错误 count 优化的问题。此修复解决了 [#80250](https://github.com/ClickHouse/ClickHouse/issues/80250)。[#80261](https://github.com/ClickHouse/ClickHouse/pull/80261) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在 MongoDB 文档中将嵌套数值字段错误序列化为字符串的问题。移除了 MongoDB 文档的最大嵌套深度限制。[#80289](https://github.com/ClickHouse/ClickHouse/pull/80289) ([Kirill Nikiforov](https://github.com/allmazz)) 。
* 在 Replicated database 中，对 RMT 执行更宽松的元数据检查。关闭 [#80296](https://github.com/ClickHouse/ClickHouse/issues/80296)。[#80298](https://github.com/ClickHouse/ClickHouse/pull/80298) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复 PostgreSQL 存储中 DateTime 和 DateTime64 的文本表示问题。 [#80301](https://github.com/ClickHouse/ClickHouse/pull/80301) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 允许在 `StripeLog` 表中使用带时区的 `DateTime`。此更改修复了 [#44120](https://github.com/ClickHouse/ClickHouse/issues/44120)。[#80304](https://github.com/ClickHouse/ClickHouse/pull/80304) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 如果查询计划步骤会改变行数，则禁用对包含非确定性函数的谓词进行过滤器下推。修复了 [#40273](https://github.com/ClickHouse/ClickHouse/issues/40273)。[#80329](https://github.com/ClickHouse/ClickHouse/pull/80329) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复包含子列的投影中可能出现的逻辑错误及崩溃问题。[#80333](https://github.com/ClickHouse/ClickHouse/pull/80333) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 `ON` 表达式不是简单等值条件时，由逻辑 JOIN 分离中的过滤器下推优化导致的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误。修复 [#79647](https://github.com/ClickHouse/ClickHouse/issues/79647) 和 [#77848](https://github.com/ClickHouse/ClickHouse/issues/77848)。[#80360](https://github.com/ClickHouse/ClickHouse/pull/80360) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了在读取分区表中按逆序排列的键时结果错误的问题。此修复对应 [#79987](https://github.com/ClickHouse/ClickHouse/issues/79987)。[#80448](https://github.com/ClickHouse/ClickHouse/pull/80448) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在启用 optimize\_read\_in\_order 且键为 Nullable 的表中排序错误的问题。[#80515](https://github.com/ClickHouse/ClickHouse/pull/80515) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复了一个问题：如果使用 SYSTEM STOP REPLICATED VIEW 暂停视图，可刷新materialized view 的 DROP 操作会卡住。[#80543](https://github.com/ClickHouse/ClickHouse/pull/80543) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复在分布式查询中使用常量元组时出现“Cannot find column”错误的问题。[#80596](https://github.com/ClickHouse/ClickHouse/pull/80596) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了启用 `join_use_nulls` 时分布式表中的 `shardNum` 函数问题。[#80612](https://github.com/ClickHouse/ClickHouse/pull/80612) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了在 Merge 引擎中读取仅存在于部分表中的列时结果错误的问题。[#80643](https://github.com/ClickHouse/ClickHouse/pull/80643) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复可能的 SSH 协议问题 (由 replxx 中的卡住所致) 。[#80688](https://github.com/ClickHouse/ClickHouse/pull/80688) ([Azat Khuzhin](https://github.com/azat)) 。
* iceberg\_history 表中的时间戳现在应该已经正确了。[#80711](https://github.com/ClickHouse/ClickHouse/pull/80711) ([Melvyn Peignon](https://github.com/melvynator)) 。
* 修复了字典注册失败时可能引发的崩溃问题 (当 `CREATE DICTIONARY` 因 `CANNOT_SCHEDULE_TASK` 失败时，字典 registry 中可能会留下悬空指针，进而导致后续崩溃) 。[#80714](https://github.com/ClickHouse/ClickHouse/pull/80714) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了对象存储表函数中仅包含单个元素的枚举通配符处理问题。[#80716](https://github.com/ClickHouse/ClickHouse/pull/80716) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了比较函数在处理 Tuple(Dynamic) 和 String 时返回结果类型错误、从而导致逻辑错误的问题。[#80728](https://github.com/ClickHouse/ClickHouse/pull/80728) ([Pavel Kruglov](https://github.com/Avogar)).
* 为 Unity Catalog 补充缺失的 `timestamp_ntz` 数据类型支持。修复了 [#79535](https://github.com/ClickHouse/ClickHouse/issues/79535) 和 [#79875](https://github.com/ClickHouse/ClickHouse/issues/79875)。[#80740](https://github.com/ClickHouse/ClickHouse/pull/80740) ([alesapin](https://github.com/alesapin)) 。
* 修复了分布式查询中使用 `IN cte` 时出现的 `THERE_IS_NO_COLUMN` 错误。修复 [#75032](https://github.com/ClickHouse/ClickHouse/issues/75032)。[#80757](https://github.com/ClickHouse/ClickHouse/pull/80757) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复外部 ORDER BY 中文件数量过多的问题 (会导致内存占用过高) 。[#80777](https://github.com/ClickHouse/ClickHouse/pull/80777) ([Azat Khuzhin](https://github.com/azat)) 。
* 此 PR 可能会关闭 [#80742](https://github.com/ClickHouse/ClickHouse/issues/80742)。[#80783](https://github.com/ClickHouse/ClickHouse/pull/80783) ([zoomxi](https://github.com/zoomxi)) 。
* 修复了 Kafka 中因 get\_member\_id() 从 NULL 构造 std::string 而导致的崩溃问题 (该问题很可能只会在与 broker 的连接失败时出现) 。[#80793](https://github.com/ClickHouse/ClickHouse/pull/80793) ([Azat Khuzhin](https://github.com/azat)).
* 在关闭 Kafka 引擎前妥善等待消费者退出 (关闭后仍处于活动状态的消费者可能触发各种调试断言，也可能在表已删除/分离后继续在后台从 broker 读取数据) 。[#80795](https://github.com/ClickHouse/ClickHouse/pull/80795) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了由 `predicate-push-down` 优化引起的 `NOT_FOUND_COLUMN_IN_BLOCK`。修复 [#80443](https://github.com/ClickHouse/ClickHouse/issues/80443)。[#80834](https://github.com/ClickHouse/ClickHouse/pull/80834) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了在带有 USING 的 JOIN 中解析表 function 里的星号 (\*) 匹配器时出现的逻辑错误。[#80894](https://github.com/ClickHouse/ClickHouse/pull/80894) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 Iceberg 元数据文件缓存的内存统计问题。[#80904](https://github.com/ClickHouse/ClickHouse/pull/80904) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在使用 Nullable 分区键时分区错误的问题。 [#80913](https://github.com/ClickHouse/ClickHouse/pull/80913) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复了以下问题：当源表在初始发起端不存在时，带有下推谓词 (`allow_push_predicate_ast_for_distributed_subqueries=1`) 的分布式查询会报 `Table does not exist` 错误。修复了 [#77281](https://github.com/ClickHouse/ClickHouse/issues/77281)。[#80915](https://github.com/ClickHouse/ClickHouse/pull/80915) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复带命名窗口的嵌套函数中的逻辑错误。[#80926](https://github.com/ClickHouse/ClickHouse/pull/80926) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复 Nullable 和浮点列的极值问题。 [#80970](https://github.com/ClickHouse/ClickHouse/pull/80970) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复查询 system.tables 时可能发生的崩溃 (很可能发生在内存压力较大时) 。[#80976](https://github.com/ClickHouse/ClickHouse/pull/80976) ([Azat Khuzhin](https://github.com/azat)).
* 修复了对压缩方式根据文件扩展名推断的文件执行 TRUNCATE 时的原子重命名问题。[#80979](https://github.com/ClickHouse/ClickHouse/pull/80979) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复 ErrorCodes::getName。[#81032](https://github.com/ClickHouse/ClickHouse/pull/81032) ([RinChanNOW](https://github.com/RinChanNOWWW)) 。
* 修复了一个 bug：当用户并不拥有 Unity Catalog 中所有表的权限时，无法列出表。现在，所有表都能正确列出，但如果尝试读取受限表，则会抛出异常。[#81044](https://github.com/ClickHouse/ClickHouse/pull/81044) ([alesapin](https://github.com/alesapin)).
* 现在，ClickHouse 会在 `SHOW TABLES` 查询中忽略来自数据湖目录的错误和异常响应。修复了 [#79725](https://github.com/ClickHouse/ClickHouse/issues/79725)。[#81046](https://github.com/ClickHouse/ClickHouse/pull/81046) ([alesapin](https://github.com/alesapin)) 。
* 修复 `JSONExtract` 和 JSON type 解析中从整数值解析 DateTime64 的问题。[#81050](https://github.com/ClickHouse/ClickHouse/pull/81050) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 schema inference 缓存中体现 date\_time\_input\_format 设置。[#81052](https://github.com/ClickHouse/ClickHouse/pull/81052) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了以下崩溃问题：如果表在查询开始后、列发送之前被 DROP，则在 INSERT 时会发生崩溃。[#81053](https://github.com/ClickHouse/ClickHouse/pull/81053) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 quantileDeterministic 中使用未初始化值的问题。[#81062](https://github.com/ClickHouse/ClickHouse/pull/81062) ([Azat Khuzhin](https://github.com/azat)).
* 修复 metadatastoragefromdisk 磁盘事务中的硬链接计数管理问题。添加测试。[#81066](https://github.com/ClickHouse/ClickHouse/pull/81066) ([Sema Checherinda](https://github.com/CheSema)) 。
* 用户自定义函数 (UDF) 的名称不会像其他函数那样记录到 `system.query_log` 表中。此 PR 实现了以下功能：如果请求中使用了 UDF，则会将其名称添加到 `used_executable_user_defined_functions` 或 `used_sql_user_defined_functions` 这两列中的一列。[#81101](https://github.com/ClickHouse/ClickHouse/pull/81101) ([Kyamran](https://github.com/nibblerenush)).
* 修复了以下问题：通过 HTTP 协议使用文本格式 (`JSON`、`Values` 等) 进行插入且省略 `Enum` 字段时，会出现 `Too large size ... passed to allocator` 错误或可能导致崩溃。[#81145](https://github.com/ClickHouse/ClickHouse/pull/81145) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了将包含稀疏列的 INSERT 块发送到非 MT MV 时出现的 LOGICAL\_ERROR。 [#81161](https://github.com/ClickHouse/ClickHouse/pull/81161) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在跨副本复制场景下，`distributed_product_mode_local=local` 出现 `Unknown table expression identifier` 的问题。[#81162](https://github.com/ClickHouse/ClickHouse/pull/81162) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了过滤后错误缓存 Parquet 文件行数的问题。[#81184](https://github.com/ClickHouse/ClickHouse/pull/81184) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复在使用相对缓存路径时，fs cache max\_size\_to\_total\_space 设置的问题。[#81237](https://github.com/ClickHouse/ClickHouse/pull/81237) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 clickhouse-local 在以 Parquet 格式输出 const Tuple 或 Map 时崩溃的问题。[#81249](https://github.com/ClickHouse/ClickHouse/pull/81249) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 校验通过网络接收的数组偏移量。 [#81269](https://github.com/ClickHouse/ClickHouse/pull/81269) ([Azat Khuzhin](https://github.com/azat)).
* 修复了一个边界情况：当查询 join 空表并使用窗口函数时，会触发该问题。该缺陷会导致并行流数量暴增，进而引发 OOM。[#81299](https://github.com/ClickHouse/ClickHouse/pull/81299) ([Alexander Gololobov](https://github.com/davenger)) 。
* 数据湖 Cluster 函数 (`deltaLakeCluster`、`icebergCluster` 等) 修复： (1) 修复了在使用旧版 analyzer 时，`DataLakeConfiguration` 与 `Cluster` 函数配合使用可能导致的段错误； (2) 移除了重复的数据湖元数据更新 (会产生额外的对象存储请求) ； (3) 修复了在未显式指定格式时对对象存储的冗余列举问题 (此前已对非 Cluster 数据湖引擎完成此修复) 。[#81300](https://github.com/ClickHouse/ClickHouse/pull/81300) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 使 force\_restore\_data 标志可用于恢复丢失的 Keeper 元数据。[#81324](https://github.com/ClickHouse/ClickHouse/pull/81324) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 delta-kernel 中的区域错误。修复 [#79914](https://github.com/ClickHouse/ClickHouse/issues/79914)。[#81353](https://github.com/ClickHouse/ClickHouse/pull/81353) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 禁用 divideOrNull 中不正确的 JIT。[#81370](https://github.com/ClickHouse/ClickHouse/pull/81370) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 MergeTree 表的分区列名过长时导致的插入错误。[#81390](https://github.com/ClickHouse/ClickHouse/pull/81390) ([hy123q](https://github.com/haoyangqian)) 。
* 已在 [#81957](https://github.com/ClickHouse/ClickHouse/issues/81957) 中回移：修复了 `Aggregator` 在合并过程中发生异常时可能崩溃的问题。[#81450](https://github.com/ClickHouse/ClickHouse/pull/81450) ([Nikita Taranov](https://github.com/nickitat)) 。
* 不要把多个 manifest 文件的内容存放在内存中。[#81470](https://github.com/ClickHouse/ClickHouse/pull/81470) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复关闭后台池 (`background_.*pool_size`) 时可能发生的崩溃。[#81473](https://github.com/ClickHouse/ClickHouse/pull/81473) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在使用 `URL` 引擎向表写入时，`Npy` 格式发生的越界读取问题。此修复关闭了 [#81356](https://github.com/ClickHouse/ClickHouse/issues/81356)。[#81502](https://github.com/ClickHouse/ClickHouse/pull/81502) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Web UI 有时会显示 `NaN%` (典型的 JavaScript 问题) 。[#81507](https://github.com/ClickHouse/ClickHouse/pull/81507) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `database_replicated_enforce_synchronous_settings=1` 时 `DatabaseReplicated` 的问题。[#81564](https://github.com/ClickHouse/ClickHouse/pull/81564) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 LowCardinality(Nullable(...)) 类型的排序顺序问题。[#81583](https://github.com/ClickHouse/ClickHouse/pull/81583) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 如果请求尚未从套接字中完整读取，服务器不应保持 HTTP 连接。[#81595](https://github.com/ClickHouse/ClickHouse/pull/81595) ([Sema Checherinda](https://github.com/CheSema)).
* 使标量关联子查询返回投影表达式的 Nullable 类型结果。修复了关联子查询产生空结果集时的问题。 [#81632](https://github.com/ClickHouse/ClickHouse/pull/81632) ([Dmitry Novik](https://github.com/novikd)).
* 修复对 `ReplicatedMergeTree` 执行 `ATTACH` 时出现的 `Unexpected relative path for a deduplicated part` 问题。[#81647](https://github.com/ClickHouse/ClickHouse/pull/81647) ([Azat Khuzhin](https://github.com/azat)) 。
* 查询设置 `use_iceberg_partition_pruning` 对 Iceberg 存储不起作用，因为它使用的是全局上下文，而不是查询上下文。不过这并不关键，因为其默认值为 true。此 PR 可修复该问题。[#81673](https://github.com/ClickHouse/ClickHouse/pull/81673) ([Han Fei](https://github.com/hanfei1991)) 。
* 已在 [#82128](https://github.com/ClickHouse/ClickHouse/issues/82128) 中回移：修复了在生存时间 (TTL) 表达式中使用 `dict` 时，合并过程中出现 "Context has expired" 的问题。[#81690](https://github.com/ClickHouse/ClickHouse/pull/81690) ([Azat Khuzhin](https://github.com/azat)).
* 为 MergeTree 设置 `merge_max_block_size` 添加校验，确保其不为零。[#81693](https://github.com/ClickHouse/ClickHouse/pull/81693) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了 `clickhouse-local` 中导致 `DROP VIEW ` 查询卡住的问题。[#81705](https://github.com/ClickHouse/ClickHouse/pull/81705) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了某些情况下 StorageRedis join 的问题。[#81736](https://github.com/ClickHouse/ClickHouse/pull/81736) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复了在启用旧版 analyzer 且 `USING ()` 为空时，`ConcurrentHashJoin` 的崩溃问题。[#81754](https://github.com/ClickHouse/ClickHouse/pull/81754) ([Nikita Taranov](https://github.com/nickitat)) 。
* Keeper 修复：如果日志中存在无效条目，则阻止提交新的日志。此前，如果 leader 错误地应用了某些日志，即使 follower 会检测到摘要不匹配并中止，它仍会继续提交新的日志。[#81780](https://github.com/ClickHouse/ClickHouse/pull/81780) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了在标量关联子查询处理期间未读取必需列的问题。修复了 [#81716](https://github.com/ClickHouse/ClickHouse/issues/81716)。[#81805](https://github.com/ClickHouse/ClickHouse/pull/81805) ([Dmitry Novik](https://github.com/novikd)) 。
* 有人把 Kusto 搞得到处都是。现已清理干净。此项关闭了 [#81643](https://github.com/ClickHouse/ClickHouse/issues/81643)。[#81885](https://github.com/ClickHouse/ClickHouse/pull/81885) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在先前版本中，server 对 `/js` 请求返回了过多内容。此项修复关闭了 [#61890](https://github.com/ClickHouse/ClickHouse/issues/61890)。[#81895](https://github.com/ClickHouse/ClickHouse/pull/81895) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 此前，`MongoDB` 表引擎定义中的 `host:port` 参数可以包含路径部分，但这部分会被静默忽略。MongoDB 集成会拒绝加载此类表。通过此修复，*如果* `MongoDB` 引擎有五个参数，*我们允许加载此类表并忽略路径部分*，同时使用参数中的数据库名称。*注意：* 此修复不适用于新创建的表或使用 `mongo` 表函数的查询，也不适用于字典源和命名集合。[#81942](https://github.com/ClickHouse/ClickHouse/pull/81942) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在 merge 期间发生异常时，`Aggregator` 可能崩溃的问题。[#82022](https://github.com/ClickHouse/ClickHouse/pull/82022) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了 `arraySimilarity` 中的复制粘贴错误，并禁止使用 `UInt32` 和 `Int32` 权重。更新了测试和文档。[#82103](https://github.com/ClickHouse/ClickHouse/pull/82103) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 修复建议线程与主客户端线程之间可能出现的数据竞争问题。[#82233](https://github.com/ClickHouse/ClickHouse/pull/82233) ([Azat Khuzhin](https://github.com/azat)) 。

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

* 使用 `postgres` 16.9。[#81437](https://github.com/ClickHouse/ClickHouse/pull/81437) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 改用 `openssl` 3.2.4。[#81438](https://github.com/ClickHouse/ClickHouse/pull/81438) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用了 `abseil-cpp` 2025-01-27。[#81440](https://github.com/ClickHouse/ClickHouse/pull/81440) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `mongo-c-driver` 1.30.4。 [#81449](https://github.com/ClickHouse/ClickHouse/pull/81449) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `krb5` 1.21.3-final。[#81453](https://github.com/ClickHouse/ClickHouse/pull/81453) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `orc` 2.1.2。 [#81455](https://github.com/ClickHouse/ClickHouse/pull/81455) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `grpc` 1.73.0。[#81629](https://github.com/ClickHouse/ClickHouse/pull/81629) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `delta-kernel-rs` v0.12.1。 [#81707](https://github.com/ClickHouse/ClickHouse/pull/81707) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 `c-ares` 升级到 `v1.34.5`。[#81159](https://github.com/ClickHouse/ClickHouse/pull/81159) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 `curl` 升级至 8.14，以解决 CVE-2025-5025 和 CVE-2025-4947。 [#81171](https://github.com/ClickHouse/ClickHouse/pull/81171) ([larryluogit](https://github.com/larryluogit)).
* 将 `libarchive` 升级到 3.7.9，以修复以下问题：CVE-2024-20696 CVE-2025-25724 CVE-2024-48958 CVE-2024-57970 CVE-2025-1632 CVE-2024-48957 CVE-2024-48615。[#81174](https://github.com/ClickHouse/ClickHouse/pull/81174) ([larryluogit](https://github.com/larryluogit)) 。
* 将 `libxml2` 升级至 2.14.3。[#81187](https://github.com/ClickHouse/ClickHouse/pull/81187) ([larryluogit](https://github.com/larryluogit)) 。
* 避免将 vendored Rust 源码复制到 `CARGO_HOME`。[#79560](https://github.com/ClickHouse/ClickHouse/pull/79560) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 通过将 Sentry 库替换为我们自己的端点，消除对该库的依赖。[#80236](https://github.com/ClickHouse/ClickHouse/pull/80236) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 更新 CI 镜像中的 Python 依赖项，以修复 Dependabot 告警。[#80658](https://github.com/ClickHouse/ClickHouse/pull/80658) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在启动时，重试从 Keeper 读取 replicated DDL 停止标志，以便在为 Keeper 启用故障注入时提高测试的稳健性。[#80964](https://github.com/ClickHouse/ClickHouse/pull/80964) ([Alexander Gololobov](https://github.com/davenger)) 。
* 对 Ubuntu 软件仓库 URL 使用 https。[#81016](https://github.com/ClickHouse/ClickHouse/pull/81016) ([Raúl Marín](https://github.com/Algunenano)) 。
* 更新测试镜像中的 Python 依赖。[#81042](https://github.com/ClickHouse/ClickHouse/pull/81042) ([dependabot\[bot\]](https://github.com/apps/dependabot)) 。
* 为 Nix 构建添加 `flake.nix`。[#81463](https://github.com/ClickHouse/ClickHouse/pull/81463) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复 `delta-kernel-rs` 在构建期间需要网络访问的问题。关闭 [#80609](https://github.com/ClickHouse/ClickHouse/issues/80609)。[#81602](https://github.com/ClickHouse/ClickHouse/pull/81602) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。请阅读文章 [A Year of Rust in ClickHouse](https://clickhouse.com/blog/rust)。

<div id="255">
  ### ClickHouse 发行版 25.5，2025-05-22
</div>

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

* 函数 `geoToH3` 现在按 (lat, lon, res) 的顺序接受输入 (这也是其他几何函数的常见顺序) 。希望保留此前结果顺序 (lon, lat, res) 的用户，可以设置 `geotoh3_argument_order = 'lon_lat'`。 [#78852](https://github.com/ClickHouse/ClickHouse/pull/78852) ([Pratima Patel](https://github.com/pratimapatel2008)).
* 新增文件系统缓存设置 `allow_dynamic_cache_resize`，默认值为 `false`，用于允许文件系统缓存动态调整大小。原因：在某些环境中 (ClickHouse Cloud) ，所有扩缩容事件都通过进程重启完成，我们希望显式禁用此功能，以便更好地控制其行为，并作为一项安全措施。此 PR 被标记为向后不兼容，因为在旧版本中，动态缓存调整大小默认启用，无需额外设置。 [#79148](https://github.com/ClickHouse/ClickHouse/pull/79148) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 已移除对旧版索引类型 `annoy` 和 `usearch` 的支持。两者长期以来都只是占位实现，也就是说，任何尝试使用这些旧版索引的操作实际上都会返回错误。如果你仍然有 `annoy` 和 `usearch` 索引，请将其删除。 [#79802](https://github.com/ClickHouse/ClickHouse/pull/79802) ([Robert Schulze](https://github.com/rschu1ze)).
* 移除 `format_alter_commands_with_parentheses` 服务器设置。该设置在 24.2 中引入，且默认禁用；在 25.2 中改为默认启用。由于已不存在不支持新格式的 LTS 版本，因此可以移除此设置。 [#79970](https://github.com/ClickHouse/ClickHouse/pull/79970) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 默认启用 `DeltaLake` 存储的 `delta-kernel-rs` 实现。 [#79541](https://github.com/ClickHouse/ClickHouse/pull/79541) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 如果从 `URL` 读取时涉及多次重定向，设置 `enable_url_encoding` 会在整个重定向链中被正确应用。 [#79563](https://github.com/ClickHouse/ClickHouse/pull/79563) ([Shankar Iyer](https://github.com/shankar-iyer)). 现在，设置 `enble_url_encoding` 的默认值已设为 `false`。 [#80088](https://github.com/ClickHouse/ClickHouse/pull/80088) ([Shankar Iyer](https://github.com/shankar-iyer)).

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

* 支持在 WHERE 子句中使用标量关联子查询。关闭 [#6697](https://github.com/ClickHouse/ClickHouse/issues/6697)。[#79600](https://github.com/ClickHouse/ClickHouse/pull/79600) ([Dmitry Novik](https://github.com/novikd)) 。在简单场景下，支持在投影列表中使用关联子查询。[#79925](https://github.com/ClickHouse/ClickHouse/pull/79925) ([Dmitry Novik](https://github.com/novikd)) 。[#76078](https://github.com/ClickHouse/ClickHouse/pull/76078) ([Dmitry Novik](https://github.com/novikd)) 。现在已覆盖 TPC-H 测试套件的 100%。
* 采用向量相似度索引的向量搜索现已进入 Beta 阶段 (此前为 Experimental) 。[#80164](https://github.com/ClickHouse/ClickHouse/pull/80164) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 支持在 `Parquet` 格式中使用 Geo 类型。这解决了 [#75317](https://github.com/ClickHouse/ClickHouse/issues/75317)。[#79777](https://github.com/ClickHouse/ClickHouse/pull/79777) ([scanhex12](https://github.com/scanhex12)) 。
* 新增函数 `sparseGrams`、`sparseGramsHashes`、`sparseGramsHashesUTF8`、`sparseGramsUTF8`，用于计算“稀疏 n-gram”——一种用于提取子字符串以进行索引和搜索的稳健算法。[#79517](https://github.com/ClickHouse/ClickHouse/pull/79517) ([scanhex12](https://github.com/scanhex12)) 。
* `clickhouse-local` (及其简写别名 `ch`) 现在会在有输入数据需要处理时隐式使用 `FROM table`。这解决了 [#65023](https://github.com/ClickHouse/ClickHouse/issues/65023)。此外，如果未指定 `--input-format` 且处理的是普通文件，`clickhouse-local` 现在还会启用格式推断。[#79085](https://github.com/ClickHouse/ClickHouse/pull/79085) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 添加 `stringBytesUniq` 和 `stringBytesEntropy` 函数，用于搜索可能为随机或加密的数据。[#79350](https://github.com/ClickHouse/ClickHouse/pull/79350) ([Sachin Kumar Singh](https://github.com/sachinkumarsingh092)) 。
* 新增了 base32 编码和解码函数。[#79809](https://github.com/ClickHouse/ClickHouse/pull/79809) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 新增 `getServerSetting` 和 `getMergeTreeSetting` 函数。修复 #78318。[#78439](https://github.com/ClickHouse/ClickHouse/pull/78439) ([NamNguyenHoai](https://github.com/NamHoaiNguyen)) 。
* 新增 `iceberg_enable_version_hint` 设置，用于利用 `version-hint.text` 文件。[#78594](https://github.com/ClickHouse/ClickHouse/pull/78594) ([Arnaud Briche](https://github.com/arnaudbriche)) 。
* 支持使用 `LIKE` 关键字进行过滤，并截断数据库中的特定表。[#78597](https://github.com/ClickHouse/ClickHouse/pull/78597) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 在 `MergeTree` 家族表中支持 `_part_starting_offset` 虚拟列。该列表示所有先前 parts 的累计行数，并在查询时根据当前的 part 列表计算得出。累计值会在整个查询执行期间保留，即使经过 part pruning 后仍然有效。相关内部逻辑已重构，以支持这一行为。[#79417](https://github.com/ClickHouse/ClickHouse/pull/79417) ([Amos Bird](https://github.com/amosbird)) 。
* 添加函数 `divideOrNull`、`moduloOrNull`、`intDivOrNull`、`positiveModuloOrNull`，使其在右侧参数为零时返回 NULL。[#78276](https://github.com/ClickHouse/ClickHouse/pull/78276) ([kevinyhzou](https://github.com/KevinyhZou)) 。
* ClickHouse 向量搜索现已同时支持前过滤和后过滤，并提供了相关设置，可进行更细粒度的控制。 (问题 [#78161](https://github.com/ClickHouse/ClickHouse/issues/78161)) 。[#79854](https://github.com/ClickHouse/ClickHouse/pull/79854) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 新增 [`icebergHash`](https://iceberg.apache.org/spec/#appendix-b-32-bit-hash-requirements) 和 [`icebergBucket`](https://iceberg.apache.org/spec/#bucket-transform-details) 函数。支持对采用 [`bucket 转换`](https://iceberg.apache.org/spec/#partitioning) 进行分区的 `Iceberg` 表执行数据文件裁剪。[#79262](https://github.com/ClickHouse/ClickHouse/pull/79262) ([Daniil Ivanik](https://github.com/divanik)) 。

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

* 新增 `Time`/`Time64` 数据类型：`Time` (HHH:MM:SS) 和 `Time64` (HHH:MM:SS.`<fractional>`) ，以及一些基础转换函数和用于与其他数据类型交互的函数。此外，现有函数 `toTime` 已更名为 `toTimeWithFixedDate`，因为转换函数需要使用 `toTime`。 [#75735](https://github.com/ClickHouse/ClickHouse/pull/75735) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
  72459\) 。
* 用于 Iceberg 数据湖的 Hive metastore 目录。 [#77677](https://github.com/ClickHouse/ClickHouse/pull/77677) ([scanhex12](https://github.com/scanhex12)) 。
* `full_text` 类型的索引已重命名为 `gin`。这采用了 PostgreSQL 和其他数据库中更常见的术语。现有的 `full_text` 类型索引仍可加载，但如果尝试在搜索中使用它们，则会抛出异常 (并提示改用 `gin` 索引) 。 [#79024](https://github.com/ClickHouse/ClickHouse/pull/79024) ([Robert Schulze](https://github.com/rschu1ze)) 。

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

* 将 Compact part 格式更改为为每个子流保存标记，从而能够读取单独的子列。旧的 Compact 格式仍支持读操作，并且可通过 MergeTree setting `write_marks_for_substreams_in_compact_parts` 启用写入。由于这会更改 compact parts 的存储方式，为了让升级更稳妥，该功能默认处于禁用状态。它将在后续某个版本中默认启用。 [#77940](https://github.com/ClickHouse/ClickHouse/pull/77940) ([Pavel Kruglov](https://github.com/Avogar)).
* 允许将带有子列的条件移至 prewhere。[#79489](https://github.com/ClickHouse/ClickHouse/pull/79489) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 通过一次性在多个粒度上计算二级索引表达式来提升其性能。[#64109](https://github.com/ClickHouse/ClickHouse/pull/64109) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认启用 `compile_expressions` (普通表达式片段的 JIT 编译器) 。此更改修复了 [#51264](https://github.com/ClickHouse/ClickHouse/issues/51264)、[#56386](https://github.com/ClickHouse/ClickHouse/issues/56386) 和 [#66486](https://github.com/ClickHouse/ClickHouse/issues/66486)。[#79907](https://github.com/ClickHouse/ClickHouse/pull/79907) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增设置：`use_skip_indexes_in_final_exact_mode`。如果对 `ReplacingMergeTree` 表的查询带有 FINAL 子句，仅根据跳过索引读取表范围可能会产生不正确的结果。此设置可通过扫描与跳过索引返回的主键范围重叠的较新 parts，确保返回正确结果。设为 0 表示禁用，设为 1 表示启用。[#78350](https://github.com/ClickHouse/ClickHouse/pull/78350) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 对象存储 cluster 表函数 (例如 `s3Cluster`) 现在会根据一致性哈希将文件分配给各副本读取，以提高缓存局部性。[#77326](https://github.com/ClickHouse/ClickHouse/pull/77326) ([Andrej Hoos](https://github.com/adikus)).
* 通过允许 `S3Queue`/`AzureQueue` 并行执行 `INSERT`，可提升其性能 (可通过队列设置 `parallel_inserts=true` 启用) 。此前，S3Queue/AzureQueue 只能并行执行管道的第一部分 (下载、解析) ，而 `INSERT` 是单线程执行的。而且 `INSERT` 几乎总是瓶颈。现在，其性能将随着 `processing_threads_num` 的增加而近乎线性扩展。[#77671](https://github.com/ClickHouse/ClickHouse/pull/77671) ([Azat Khuzhin](https://github.com/azat))。进一步提升了 S3Queue/AzureQueue 中 max\_processed\_files\_before\_commit 的公平性。[#79363](https://github.com/ClickHouse/ClickHouse/pull/79363) ([Azat Khuzhin](https://github.com/azat))。
* 引入了一个阈值 (由设置 `parallel_hash_join_threshold` 控定) ：当右侧表的大小低于该阈值时，将回退到 `hash` 算法。[#76185](https://github.com/ClickHouse/ClickHouse/pull/76185) ([Nikita Taranov](https://github.com/nickitat)) 。
* 现在，我们使用副本数量来确定启用并行副本时读取任务的大小。当待读取的数据量不大时，这样可以在各副本之间实现更好的工作分配。[#78695](https://github.com/ClickHouse/ClickHouse/pull/78695) ([Nikita Taranov](https://github.com/nickitat)).
* 支持在分布式聚合的最终阶段并行合并 `uniqExact` 状态。[#78703](https://github.com/ClickHouse/ClickHouse/pull/78703) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了按键聚合时并行合并 `uniqExact` 状态可能导致的性能下降问题。 [#78724](https://github.com/ClickHouse/ClickHouse/pull/78724) ([Nikita Taranov](https://github.com/nickitat)).
* 降低对 Azure 存储的 List Blobs API 调用次数。[#78860](https://github.com/ClickHouse/ClickHouse/pull/78860) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复了使用并行副本的分布式 INSERT SELECT 的性能问题。[#79441](https://github.com/ClickHouse/ClickHouse/pull/79441) ([Azat Khuzhin](https://github.com/azat)) 。
* 避免 `LogSeriesLimiter` 在每次构造时都执行清理，从而防止高并发场景下的锁竞争和性能回退。[#79864](https://github.com/ClickHouse/ClickHouse/pull/79864) ([filimonov](https://github.com/filimonov)).
* 通过简单的 `count` 优化提升查询速度。[#79945](https://github.com/ClickHouse/ClickHouse/pull/79945) ([Raúl Marín](https://github.com/Algunenano)).
* 改进了部分涉及 `Decimal` 的操作的内联优化。 [#79999](https://github.com/ClickHouse/ClickHouse/pull/79999) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 默认将 `input_format_parquet_bloom_filter_push_down` 设置为 true。同时，修复了设置变更历史记录中的一处错误。[#80058](https://github.com/ClickHouse/ClickHouse/pull/80058) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 优化了对所有行都应删除的 parts 执行 `ALTER ... DELETE` 变更的场景。现在，在这种情况下会创建一个空的 part，而不是保留原始 part 且不执行变更。[#79307](https://github.com/ClickHouse/ClickHouse/pull/79307) ([Anton Popov](https://github.com/CurtizJ)).
* 在向 Compact part 插入数据时，尽可能避免对块进行额外复制。[#79536](https://github.com/ClickHouse/ClickHouse/pull/79536) ([Pavel Kruglov](https://github.com/Avogar)).
* 新增设置 `input_format_max_block_size_bytes`，用于按字节限制输入格式中创建的块大小。这有助于在行包含较大值时，避免数据导入过程中内存占用过高。[#79495](https://github.com/ClickHouse/ClickHouse/pull/79495) ([Pavel Kruglov](https://github.com/Avogar)).
* 移除线程以及 async\_socket\_for\_remote/use\_hedge\_requests 的保护页。将 `FiberStack` 中的分配方式从 `mmap` 改为 `aligned_alloc`。这是因为该做法会拆分 VMA，在高负载下可能触及 vm.max\_map\_count 限制。[#79147](https://github.com/ClickHouse/ClickHouse/pull/79147) ([Sema Checherinda](https://github.com/CheSema)) 。
* 并行副本中的惰性物化。[#79401](https://github.com/ClickHouse/ClickHouse/pull/79401) ([Igor Nikonov](https://github.com/devcrafter)) 。

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

* 新增了可即时应用轻量级删除的功能 (在设置 `lightweight_deletes_sync = 0`, `apply_mutations_on_fly = 1` 时) 。[#79281](https://github.com/ClickHouse/ClickHouse/pull/79281) ([Anton Popov](https://github.com/CurtizJ)).
* 如果终端中显示的是 Pretty 格式的数据，并且后续块的列宽与前一个块相同，就可以通过向上移动光标，将其接续并拼接到前一个块后面。这修复了 [#79333](https://github.com/ClickHouse/ClickHouse/issues/79333)。该功能由新设置 `output_format_pretty_glue_chunks` 控制。[#79339](https://github.com/ClickHouse/ClickHouse/pull/79339) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `isIPAddressInRange` 函数扩展为支持 `String`、`IPv4`、`IPv6`、`Nullable(String)`、`Nullable(IPv4)` 和 `Nullable(IPv6)` 数据类型。[#78364](https://github.com/ClickHouse/ClickHouse/pull/78364) ([YjyJeff](https://github.com/YjyJeff)).
* 允许动态修改 `PostgreSQL` 引擎的连接池相关设置。[#78414](https://github.com/ClickHouse/ClickHouse/pull/78414) ([Samay Sharma](https://github.com/samay-sharma)) 。
* 允许在普通投影中指定 `_part_offset`。这是构建投影索引的第一步。可与 [#58224](https://github.com/ClickHouse/ClickHouse/issues/58224) 结合使用，并有助于改进 #63207。[#78429](https://github.com/ClickHouse/ClickHouse/pull/78429) ([Amos Bird](https://github.com/amosbird)) 。
* 为 `system.named_collections` 新增列 (`create_query` 和 `source`) 。已关闭 [#78179](https://github.com/ClickHouse/ClickHouse/issues/78179)。[#78582](https://github.com/ClickHouse/ClickHouse/pull/78582) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 向系统表 `system.query_condition_cache` 新增了一个字段 `condition`。该字段存储明文条件，其哈希值会被用作查询条件缓存中的键。[#78671](https://github.com/ClickHouse/ClickHouse/pull/78671) ([Robert Schulze](https://github.com/rschu1ze)).
* 现在可以在 `BFloat16` 列上创建向量相似度索引。[#78850](https://github.com/ClickHouse/ClickHouse/pull/78850) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 支持在对 `DateTime64` 进行 best effort 解析时处理带小数部分的 Unix 时间戳。[#78908](https://github.com/ClickHouse/ClickHouse/pull/78908) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在存储 `DeltaLake` 的 delta-kernel 实现中，修复了列映射模式相关问题，并新增了 schema 演进测试。 [#78921](https://github.com/ClickHouse/ClickHouse/pull/78921) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 通过更优地转换值，改进了在 Values format 中向 `Variant` 列插入数据的处理。[#78923](https://github.com/ClickHouse/ClickHouse/pull/78923) ([Pavel Kruglov](https://github.com/Avogar)).
* `tokens` 函数已扩展，现可接受额外的 "tokenizer" 参数，以及更多特定于分词器的参数。[#79001](https://github.com/ClickHouse/ClickHouse/pull/79001) ([Elmi Ahmadov](https://github.com/ahmadov)).
* `SHOW CLUSTER` 语句现在会展开其参数中的宏 (如果有) 。[#79006](https://github.com/ClickHouse/ClickHouse/pull/79006) ([arf42](https://github.com/arf42)).
* 哈希函数现已支持在数组、元组和 Map 中使用 `NULL`。 (问题 [#48365](https://github.com/ClickHouse/ClickHouse/issues/48365) 和 [#48623](https://github.com/ClickHouse/ClickHouse/issues/48623)) 。[#79008](https://github.com/ClickHouse/ClickHouse/pull/79008) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 将 cctz 更新至 2025a。[#79043](https://github.com/ClickHouse/ClickHouse/pull/79043) ([Raúl Marín](https://github.com/Algunenano)) 。
* 将 UDFs 的默认 stderr 处理方式改为 "log\_last"，这样可用性更好。[#79066](https://github.com/ClickHouse/ClickHouse/pull/79066) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 使 Web UI 中的标签页可撤销关闭。这解决了 [#71284](https://github.com/ClickHouse/ClickHouse/issues/71284)。[#79084](https://github.com/ClickHouse/ClickHouse/pull/79084) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 `recoverLostReplica` 期间移除配置项，处理方式与此处相同：[https://github.com/ClickHouse/ClickHouse/pull/78637。\[#79113](https://github.com/ClickHouse/ClickHouse/pull/78637。\[#79113)]\([https://github.com/ClickHouse/ClickHouse/pull/79113](https://github.com/ClickHouse/ClickHouse/pull/79113)) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 新增 profile events：`ParquetReadRowGroups` 和 `ParquetPrunedRowGroups`，用于分析 Parquet 索引裁剪情况。[#79180](https://github.com/ClickHouse/ClickHouse/pull/79180) ([flynn](https://github.com/ucasfl)) 。
* 支持在集群中对数据库执行 `ALTER`。 [#79242](https://github.com/ClickHouse/ClickHouse/pull/79242) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 显式跳过 QueryMetricLog 统计信息收集过程中错过的运行，否则该日志需要很长时间才能追上当前时间。[#79257](https://github.com/ClickHouse/ClickHouse/pull/79257) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 对基于 `Arrow` 的格式的读取做了一些小优化。[#79308](https://github.com/ClickHouse/ClickHouse/pull/79308) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 设置 `allow_archive_path_syntax` 被误标记为 Experimental。添加测试，防止 Experimental 设置默认启用。[#79320](https://github.com/ClickHouse/ClickHouse/pull/79320) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持按单个查询粒度调整 page cache 设置。这有助于更快地进行试验，并可针对高吞吐、低延迟查询进行细粒度调优。[#79337](https://github.com/ClickHouse/ClickHouse/pull/79337) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 不要在 Pretty formats 中为看起来像大多数 64 位哈希值的数字显示数值提示。这解决了 [#79334](https://github.com/ClickHouse/ClickHouse/issues/79334)。[#79338](https://github.com/ClickHouse/ClickHouse/pull/79338) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 高级仪表板中图表的颜色将根据相应查询的哈希值计算。这使你在滚动浏览仪表板时更容易记住并定位图表。[#79341](https://github.com/ClickHouse/ClickHouse/pull/79341) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增异步指标 `FilesystemCacheCapacity`——表示 `cache` 虚拟文件系统的总容量。这对于全局基础设施监控很有帮助。[#79348](https://github.com/ClickHouse/ClickHouse/pull/79348) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 优化对 system.parts 的访问 (仅在需要时读取列/索引的大小) 。[#79352](https://github.com/ClickHouse/ClickHouse/pull/79352) ([Azat Khuzhin](https://github.com/azat)) 。
* 对于查询 `'SHOW CLUSTER <name>'`，仅计算相关字段，而不是所有字段。[#79368](https://github.com/ClickHouse/ClickHouse/pull/79368) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 支持为 `DatabaseCatalog` 指定存储设置。[#79407](https://github.com/ClickHouse/ClickHouse/pull/79407) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持 `DeltaLake` 本地存储。[#79416](https://github.com/ClickHouse/ClickHouse/pull/79416) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 新增一个查询级别设置，用于启用 delta-kernel-rs：`allow_experimental_delta_kernel_rs`。[#79418](https://github.com/ClickHouse/ClickHouse/pull/79418) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复列出 Azure/S3 blob 存储中的 blob 时可能出现的无限循环问题。[#79425](https://github.com/ClickHouse/ClickHouse/pull/79425) ([Alexander Gololobov](https://github.com/davenger)) 。
* 添加了文件系统缓存设置 `max_size_ratio_to_total_space`。[#79460](https://github.com/ClickHouse/ClickHouse/pull/79460) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 对于 `clickhouse-benchmark`，重新配置 `reconnect` 选项，使其可接受 0、1 或 N 作为重连值。[#79465](https://github.com/ClickHouse/ClickHouse/pull/79465) ([Sachin Kumar Singh](https://github.com/sachinkumarsingh092)).
* 允许对位于不同 `plain_rewritable` 磁盘上的表使用 `ALTER TABLE ... MOVE|REPLACE PARTITION`。[#79566](https://github.com/ClickHouse/ClickHouse/pull/79566) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 当参考向量的类型为 `Array(BFloat16)` 时，现在也会使用向量相似度索引。[#79745](https://github.com/ClickHouse/ClickHouse/pull/79745) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 在 system.error\_log 表中新增 last\_error\_message、last\_error\_trace 和 query\_id。相关问题见 [#75816](https://github.com/ClickHouse/ClickHouse/issues/75816)。[#79836](https://github.com/ClickHouse/ClickHouse/pull/79836) ([Andrei Tinikov](https://github.com/Dolso)) 。
* 默认启用发送崩溃报告。可在服务器的配置文件中将其关闭。[#79838](https://github.com/ClickHouse/ClickHouse/pull/79838) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 系统表 `system.functions` 现在会显示各函数最早是在哪个 ClickHouse 版本中引入的。[#79839](https://github.com/ClickHouse/ClickHouse/pull/79839) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增了 `access_control_improvements.enable_user_name_access_type` 设置。该设置支持为用户/角色启用或禁用精细化授权，该功能在 [https://github.com/ClickHouse/ClickHouse/pull/72246](https://github.com/ClickHouse/ClickHouse/pull/72246) 中引入。如果你的集群中包含版本早于 25.1 的副本，可能需要关闭此设置。[#79842](https://github.com/ClickHouse/ClickHouse/pull/79842) ([pufit](https://github.com/pufit)).
* `ASTSelectWithUnionQuery::clone()` 方法现已正确将 `is_normalized` 字段也考虑在内。这可能有助于解决 [#77569](https://github.com/ClickHouse/ClickHouse/issues/77569)。[#79909](https://github.com/ClickHouse/ClickHouse/pull/79909) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了某些带有 EXCEPT 运算符的查询在格式化时不一致的问题。如果 EXCEPT 运算符左侧以 `*` 结尾，格式化后的查询会丢失括号，随后被解析为带有 `EXCEPT` 修饰符的 `*`。这些查询是由 fuzzer 发现的，实际使用中几乎不可能遇到。此更改关闭了 [#79950](https://github.com/ClickHouse/ClickHouse/issues/79950)。[#79952](https://github.com/ClickHouse/ClickHouse/pull/79952) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过缓存 Variant 反序列化顺序，小幅改进了 `JSON` 类型的解析。[#79984](https://github.com/ClickHouse/ClickHouse/pull/79984) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 新增设置 `s3_slow_all_threads_after_network_error`。[#80035](https://github.com/ClickHouse/ClickHouse/pull/80035) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 关于所选待合并 parts 的日志级别设置有误 (Information) 。关闭 [#80061](https://github.com/ClickHouse/ClickHouse/issues/80061)。[#80062](https://github.com/ClickHouse/ClickHouse/pull/80062) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* trace-visualizer：在工具提示和状态消息中添加 runtime/共享。[#79040](https://github.com/ClickHouse/ClickHouse/pull/79040) ([Sergei Trifonov](https://github.com/serxa)).
* trace-visualizer：从 ClickHouse server 读取数据。[#79042](https://github.com/ClickHouse/ClickHouse/pull/79042) ([Sergei Trifonov](https://github.com/serxa)) 。
* 新增合并失败指标。[#79228](https://github.com/ClickHouse/ClickHouse/pull/79228) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* `clickhouse-benchmark` 现在会在指定最大迭代次数时按其显示百分比。[#79346](https://github.com/ClickHouse/ClickHouse/pull/79346) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 system.parts 表可视化工具。[#79437](https://github.com/ClickHouse/ClickHouse/pull/79437) ([Sergei Trifonov](https://github.com/serxa)) 。
* 新增查询延迟分析工具。[#79978](https://github.com/ClickHouse/ClickHouse/pull/79978) ([Sergei Trifonov](https://github.com/serxa)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复了重命名分片中缺失列时的问题。[#76346](https://github.com/ClickHouse/ClickHouse/pull/76346) ([Anton Popov](https://github.com/CurtizJ)) 。
* materialized view 可能启动得过晚，例如晚于向其传输流数据的 Kafka 表。 [#72123](https://github.com/ClickHouse/ClickHouse/pull/72123) ([Ilya Golshtein](https://github.com/ilejn)).
* 修复了在启用 analyzer 时创建 `VIEW` 过程中 `SELECT` 查询重写的问题。关闭 [#75956](https://github.com/ClickHouse/ClickHouse/issues/75956)。[#76356](https://github.com/ClickHouse/ClickHouse/pull/76356) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了通过 `apply_settings_from_server` 从服务器应用 `async_insert` 的问题 (此前会导致客户端报 `Unknown packet 11 from server` 错误) 。[#77578](https://github.com/ClickHouse/ClickHouse/pull/77578) ([Azat Khuzhin](https://github.com/azat)).
* 修复了 Replicated database 中可刷新materialized view 在新添加的副本上无法正常工作的问题。[#77774](https://github.com/ClickHouse/ClickHouse/pull/77774) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了可刷新的 materialized views 导致备份失效的问题。[#77893](https://github.com/ClickHouse/ClickHouse/pull/77893) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了 `transform` 中一个早已有之的逻辑错误。[#78247](https://github.com/ClickHouse/ClickHouse/pull/78247) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了使用 analyzer 时某些情况下未应用二级索引的问题。修复了 [#65607](https://github.com/ClickHouse/ClickHouse/issues/65607)，修复了 [#69373](https://github.com/ClickHouse/ClickHouse/issues/69373)。[#78485](https://github.com/ClickHouse/ClickHouse/pull/78485) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复在通过 HTTP 协议且启用压缩时转储 profile events (`NetworkSendElapsedMicroseconds`/`NetworkSendBytes`) 的问题 (误差不应超过缓冲区大小，通常约为 1MiB) 。[#78516](https://github.com/ClickHouse/ClickHouse/pull/78516) ([Azat Khuzhin](https://github.com/azat)).
* 修复 analyzer 在 JOIN ... USING 涉及 ALIAS 列时产生 LOGICAL\_ERROR 的问题——此时应返回恰当的错误。[#78618](https://github.com/ClickHouse/ClickHouse/pull/78618) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复 analyzer：如果 `SELECT` 包含位置参数，`CREATE VIEW ... ON CLUSTER` 会失败。[#78663](https://github.com/ClickHouse/ClickHouse/pull/78663) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了以下问题：当对启用 schema inference 的表函数执行 `INSERT SELECT`，且 `SELECT` 包含标量子查询时，会出现 `Block structure mismatch` 错误。[#78677](https://github.com/ClickHouse/ClickHouse/pull/78677) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复 analyzer：对于 SELECT 查询中的分布式表，在设置 `prefer&#95;global&#95;in&#95;and&#95;join=1` 时，应将 `in` 函数替换为 `globalIn`。[#78749](https://github.com/ClickHouse/ClickHouse/pull/78749) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了多种从使用 `MongoDB` engine 或 `mongodb` table function 的表中读取数据的 `SELECT` queries：包括在 `WHERE` clause 中对常量值进行隐式转换的 queries (例如 `WHERE datetime = '2025-03-10 00:00:00'`) ；以及带有 `LIMIT` 和 `GROUP BY` 的 queries。此前，这些 queries 可能返回错误结果。[#78777](https://github.com/ClickHouse/ClickHouse/pull/78777) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复不同 JSON 类型之间的转换问题。现在通过先转换为/从 String 再进行简单强制类型转换来实现。这样效率较低，但可确保 100% 准确。 [#78807](https://github.com/ClickHouse/ClickHouse/pull/78807) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复将 Dynamic 类型转换为 Interval 时出现的逻辑错误。[#78813](https://github.com/ClickHouse/ClickHouse/pull/78813) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复发生 JSON 解析错误时的列回滚问题。[#78836](https://github.com/ClickHouse/ClickHouse/pull/78836) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在使用常量别名列进行 JOIN 时出现的 'bad cast' 错误。[#78848](https://github.com/ClickHouse/ClickHouse/pull/78848) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 禁止在 materialized view 中对视图和目标表中类型不同的列使用 prewhere。[#78889](https://github.com/ClickHouse/ClickHouse/pull/78889) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了解析 Variant 列中的错误二进制数据时出现的逻辑错误。[#78982](https://github.com/ClickHouse/ClickHouse/pull/78982) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 当 Parquet 批次大小设置为 0 时，会抛出异常。此前，当 output\_format\_parquet\_batch\_size = 0 时，ClickHouse 会挂起。现在此问题已修复。[#78991](https://github.com/ClickHouse/ClickHouse/pull/78991) ([daryawessely](https://github.com/daryawessely)) 。
* 修复 compact parts 中 basic format 下 Variant 判别符的反序列化问题。该问题是在 [https://github.com/ClickHouse/ClickHouse/pull/55518](https://github.com/ClickHouse/ClickHouse/pull/55518) 中引入的。[#79000](https://github.com/ClickHouse/ClickHouse/pull/79000) ([Pavel Kruglov](https://github.com/Avogar)) 。
* `complex_key_ssd_cache` 类型的字典现在会拒绝 `block_size` 和 `write_buffer_size` 参数为零或负数的情况 (问题 [#78314](https://github.com/ClickHouse/ClickHouse/issues/78314)) 。[#79028](https://github.com/ClickHouse/ClickHouse/pull/79028) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 避免在 SummingMergeTree 中将 Field 用于非聚合列。这可能会导致在 SummingMergeTree 中使用 Dynamic/Variant 类型时出现意料之外的错误。[#79051](https://github.com/ClickHouse/ClickHouse/pull/79051) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 analyzer 中从目标端表为 Distributed 且请求头不同的 Materialized View 读取数据时出现的问题。[#79059](https://github.com/ClickHouse/ClickHouse/pull/79059) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了一个问题：对于进行过批次插入的表，`arrayUnion()` 会返回额外的 (错误的) 值。修复了 [#75057](https://github.com/ClickHouse/ClickHouse/issues/75057)。[#79079](https://github.com/ClickHouse/ClickHouse/pull/79079) ([Peter Nguyen](https://github.com/petern48)) 。
* 修复 `OpenSSLInitializer` 中的段错误。已关闭 [#79092](https://github.com/ClickHouse/ClickHouse/issues/79092)。[#79097](https://github.com/ClickHouse/ClickHouse/pull/79097) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 始终为 S3 ListObject 设置前缀。[#79114](https://github.com/ClickHouse/ClickHouse/pull/79114) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一个 bug：对于进行过批次插入的表，arrayUnion() 会返回额外的错误值。修复了 [#79157](https://github.com/ClickHouse/ClickHouse/issues/79157)。[#79158](https://github.com/ClickHouse/ClickHouse/pull/79158) ([Peter Nguyen](https://github.com/petern48)) 。
* 修复过滤器下推后的逻辑错误。[#79164](https://github.com/ClickHouse/ClickHouse/pull/79164) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复 DeltaLake 表引擎在通过基于 `http` 的端点使用 delta-kernel 实现时出现的问题，并修复 NOSIGN。关闭 [#78124](https://github.com/ClickHouse/ClickHouse/issues/78124)。[#79203](https://github.com/ClickHouse/ClickHouse/pull/79203) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* Keeper 修复：避免在 multi 请求失败时触发 watches。[#79247](https://github.com/ClickHouse/ClickHouse/pull/79247) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 禁止在 `IN` 中使用 Dynamic 和 JSON 类型。按照当前 `IN` 的实现，这可能导致不正确的结果。在 `IN` 中妥善支持这些类型较为复杂，后续可能会实现。[#79282](https://github.com/ClickHouse/ClickHouse/pull/79282) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 JSON 类型解析中重复路径检查的问题。[#79317](https://github.com/ClickHouse/ClickHouse/pull/79317) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 SecureStreamSocket 连接方面的问题。[#79383](https://github.com/ClickHouse/ClickHouse/pull/79383) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复含有数据的 plain\_rewritable 磁盘的加载问题。[#79439](https://github.com/ClickHouse/ClickHouse/pull/79439) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复 MergeTree 中 Wide parts 动态子列发现过程中的崩溃。[#79466](https://github.com/ClickHouse/ClickHouse/pull/79466) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 仅在初始 create 查询时校验表名长度。为避免向后兼容性问题，不要对后续 create 操作进行此项校验。[#79488](https://github.com/ClickHouse/ClickHouse/pull/79488) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了在带有稀疏列的表中若干情况下出现的 `Block structure mismatch` 错误。[#79491](https://github.com/ClickHouse/ClickHouse/pull/79491) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了两种会出现 "Logical Error: Can't set alias of \* of Asterisk on alias" 的情况。[#79505](https://github.com/ClickHouse/ClickHouse/pull/79505) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了重命名 Atomic 数据库时使用了错误路径的问题。[#79569](https://github.com/ClickHouse/ClickHouse/pull/79569) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复对 JSON 列与其他列一起进行 ORDER BY 时的问题。[#79591](https://github.com/ClickHouse/ClickHouse/pull/79591) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在从远程读取数据且同时禁用 `use_hedged_requests` 和 `allow_experimental_parallel_reading_from_replicas` 时结果重复的问题。[#79599](https://github.com/ClickHouse/ClickHouse/pull/79599) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复使用 Unity Catalog 时 delta-kernel 实现发生崩溃的问题。[#79677](https://github.com/ClickHouse/ClickHouse/pull/79677) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为自动发现集群解析宏。 [#79696](https://github.com/ClickHouse/ClickHouse/pull/79696) ([Anton Ivashkin](https://github.com/ianton-ru)).
* 妥善处理错误配置的 page\_cache\_limits。 [#79805](https://github.com/ClickHouse/ClickHouse/pull/79805) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了 SQL 函数 `formatDateTime` 在以下情况下的结果错误：当可变长度的格式说明符 (例如 `%W`，即星期几 `Monday` `Tuesday` 等) 后面跟着复合格式说明符 (即一次输出多个组成部分的格式说明符，例如 `%D`，也就是美式日期 `05/04/25`) 时。[#79835](https://github.com/ClickHouse/ClickHouse/pull/79835) ([Robert Schulze](https://github.com/rschu1ze)) 。
* IcebergS3 支持 count 优化，但 IcebergS3Cluster 不支持。因此，在集群模式下返回的 count() 结果可能会是副本数量的倍数。[#79844](https://github.com/ClickHouse/ClickHouse/pull/79844) ([wxybear](https://github.com/wxybear)) 。
* 修复了这样一种情况下由惰性物化导致的 AMBIGUOUS\_COLUMN\_NAME 错误：在投影之前，没有任何列用于查询执行。例如，SELECT \* FROM t ORDER BY rand() LIMIT 5。 [#79926](https://github.com/ClickHouse/ClickHouse/pull/79926) ([Igor Nikonov](https://github.com/devcrafter)).
* 在查询 `CREATE DATABASE datalake ENGINE = DataLakeCatalog(\'http://catalog:8181\', \'admin\', \'password\')` 中隐藏密码。[#79941](https://github.com/ClickHouse/ClickHouse/pull/79941) ([Han Fei](https://github.com/hanfei1991)) 。
* 允许在 JOIN USING 中指定别名。若列已被重命名 (例如由于 ARRAY JOIN) ，请指定该别名。修复了 [#73707](https://github.com/ClickHouse/ClickHouse/issues/73707)。[#79942](https://github.com/ClickHouse/ClickHouse/pull/79942) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 使包含 UNION 的 materialized views 能在新副本上正常工作。[#80037](https://github.com/ClickHouse/ClickHouse/pull/80037) ([Samay Sharma](https://github.com/samay-sharma)).
* SQL 函数 `parseDateTime` 中的格式说明符 `%e` 现在可识别个位数日期 (例如 `3`) ，而此前要求使用空格填充 (例如 ` 3`) 。这使其行为与 MySQL 保持兼容。若要保留之前的行为，请设置 `parsedatetime_e_requires_space_padding = 1`。 (问题 [#78243](https://github.com/ClickHouse/ClickHouse/issues/78243)) 。[#80057](https://github.com/ClickHouse/ClickHouse/pull/80057) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复 ClickHouse 日志中 `Cannot find 'kernel' in '[...]/memory.stat'` 警告 (问题 [#77410](https://github.com/ClickHouse/ClickHouse/issues/77410)) 。[#80129](https://github.com/ClickHouse/ClickHouse/pull/80129) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 在 FunctionComparison 中检查栈大小，以避免栈溢出导致崩溃。[#78208](https://github.com/ClickHouse/ClickHouse/pull/78208) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复从 `system.workloads` 执行 SELECT 时的竞态问题。[#78743](https://github.com/ClickHouse/ClickHouse/pull/78743) ([Sergei Trifonov](https://github.com/serxa)) 。
* 修复：分布式查询中的延迟物化。[#78815](https://github.com/ClickHouse/ClickHouse/pull/78815) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 修复 `Array(Bool)` 到 `Array(FixedString)` 的转换问题。[#78863](https://github.com/ClickHouse/ClickHouse/pull/78863) ([Nikita Taranov](https://github.com/nickitat)) 。
* 降低 Parquet 版本选择的混淆性。[#78818](https://github.com/ClickHouse/ClickHouse/pull/78818) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复 `ReservoirSampler` 自身合并问题。[#79031](https://github.com/ClickHouse/ClickHouse/pull/79031) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复在客户端上下文中存储插入目标表的问题。[#79046](https://github.com/ClickHouse/ClickHouse/pull/79046) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 修复 `AggregatingSortedAlgorithm` 和 `SummingSortedAlgorithm` 中数据成员的销毁顺序。[#79056](https://github.com/ClickHouse/ClickHouse/pull/79056) ([Nikita Taranov](https://github.com/nickitat)) 。
* `enable_user_name_access_type` 不应影响 `DEFINER` 访问类型。[#80026](https://github.com/ClickHouse/ClickHouse/pull/80026) ([pufit](https://github.com/pufit)) 。
* 如果 system 数据库的元数据位于 Keeper 中，对 system 数据库的查询可能会挂起。[#79304](https://github.com/ClickHouse/ClickHouse/pull/79304) ([Mikhail Artemenko](https://github.com/Michicosun)).

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

* 支持复用已构建的 `chcache` 可执行文件，而不必每次都重新构建。[#78851](https://github.com/ClickHouse/ClickHouse/pull/78851) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 添加 NATS 暂停等待机制。[#78987](https://github.com/ClickHouse/ClickHouse/pull/78987) ([Dmitry Novikov](https://github.com/dmitry-sles-novikov)) 。
* 修复将 ARM 构建产物错误发布为 amd64compat 的问题。[#79122](https://github.com/ClickHouse/ClickHouse/pull/79122) ([Alexander Gololobov](https://github.com/davenger)) 。
* 对 OpenSSL 使用预先生成的汇编代码。[#79386](https://github.com/ClickHouse/ClickHouse/pull/79386) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了使用 `clang20` 构建时的问题。[#79588](https://github.com/ClickHouse/ClickHouse/pull/79588) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* `chcache`：支持 Rust 缓存。[#78691](https://github.com/ClickHouse/ClickHouse/pull/78691) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 为 `zstd` 汇编文件添加栈回溯信息。[#79288](https://github.com/ClickHouse/ClickHouse/pull/79288) ([Michael Kolupaev](https://github.com/al13n321)) 。

<div id="254">
  ### ClickHouse 发行版 25.4，2025-04-22
</div>

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

* 当 `allow_materialized_view_with_bad_select` 为 `false` 时，检查 materialized view 中的所有列是否与目标表一致。[#74481](https://github.com/ClickHouse/ClickHouse/pull/74481) ([Christoph Wurm](https://github.com/cwurm)).
* 修复了 `dateTrunc` 与负数 Date/DateTime 参数一起使用时的问题。[#77622](https://github.com/ClickHouse/ClickHouse/pull/77622) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 旧版 `MongoDB` 集成已被移除。服务器设置 `use_legacy_mongodb_integration` 已废弃，现已不再生效。[#77895](https://github.com/ClickHouse/ClickHouse/pull/77895) ([Robert Schulze](https://github.com/rschu1ze)).
* 增强了对 `SummingMergeTree` 的校验，对于用作分区键或排序键的列会跳过聚合。[#78022](https://github.com/ClickHouse/ClickHouse/pull/78022) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).

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

* 新增了面向工作负载的 CPU slot 调度，详情请参阅[文档](/zh/concepts/features/configuration/server-config/workload-scheduling#cpu_scheduling)。[#77595](https://github.com/ClickHouse/ClickHouse/pull/77595) ([Sergei Trifonov](https://github.com/serxa)) 。
* 如果指定 `--path` 命令行参数，`clickhouse-local` 在重启后仍会保留其数据库。此更改修复了 [#50647](https://github.com/ClickHouse/ClickHouse/issues/50647)。此更改修复了 [#49947](https://github.com/ClickHouse/ClickHouse/issues/49947)。[#71722](https://github.com/ClickHouse/ClickHouse/pull/71722) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当 server 过载时拒绝查询。该决策基于等待时间 (`OSCPUWaitMicroseconds`) 与忙碌时间 (`OSCPUVirtualTimeMicroseconds`) 的比值。当该比值介于 `min_os_cpu_wait_time_ratio_to_throw` 和 `max_os_cpu_wait_time_ratio_to_throw` 之间时，查询会以一定概率被拒绝 (这些都是查询级设置) 。[#63206](https://github.com/ClickHouse/ClickHouse/pull/63206) ([Alexey Katsman](https://github.com/alexkats)).
* `Iceberg` 中的时间旅行：新增设置，支持按特定时间戳查询 `Iceberg` 表。[#71072](https://github.com/ClickHouse/ClickHouse/pull/71072) ([Brett Hoerner](https://github.com/bretthoerner)) 。[#77439](https://github.com/ClickHouse/ClickHouse/pull/77439) ([Daniil Ivanik](https://github.com/divanik)) 。
* 用于缓存 `Iceberg` 元数据的内存缓存，存储 manifest 文件/列表和 `metadata.json`，以加快查询速度。[#77156](https://github.com/ClickHouse/ClickHouse/pull/77156) ([Han Fei](https://github.com/hanfei1991)) 。
* 支持 Azure Blob 存储上的 `DeltaLake` 表引擎。修复了 [#68043](https://github.com/ClickHouse/ClickHouse/issues/68043)。[#74541](https://github.com/ClickHouse/ClickHouse/pull/74541) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 为已反序列化的向量相似度索引新增了内存缓存。这应能加快重复执行的近似最近邻 (ANN) 搜索查询。新缓存的大小由服务器设置 `vector_similarity_index_cache_size` 和 `vector_similarity_index_cache_max_entries` 控制。此功能取代了早期版本中的跳过索引缓存功能。[#77905](https://github.com/ClickHouse/ClickHouse/pull/77905) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 支持 DeltaLake 的分区裁剪。[#78486](https://github.com/ClickHouse/ClickHouse/pull/78486) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持只读 `MergeTree` 表的后台刷新，从而可使用无限数量的分布式读取器查询可更新表 (ClickHouse 原生数据湖) 。[#76467](https://github.com/ClickHouse/ClickHouse/pull/76467) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 支持使用自定义磁盘存储数据库元数据文件。目前仅支持在全局服务器级别进行配置。[#77365](https://github.com/ClickHouse/ClickHouse/pull/77365) ([Tuan Pham Anh](https://github.com/tuanpach)).
* plain\_rewritable 磁盘现已支持 ALTER TABLE ... ATTACH|DETACH|MOVE|REPLACE PARTITION。[#77406](https://github.com/ClickHouse/ClickHouse/pull/77406) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 为 `Kafka` 表引擎新增了用于 `SASL` 配置和凭据的表设置。这样便可直接在 CREATE TABLE 语句中为 Kafka 及兼容 Kafka 的系统配置基于 SASL 的身份验证，而无需使用配置文件或命名集合。[#78810](https://github.com/ClickHouse/ClickHouse/pull/78810) ([Christoph Wurm](https://github.com/cwurm)) 。
* 允许为 MergeTree 表设置 `default_compression_codec`：当 CREATE 查询未为指定列显式定义压缩编解码器时，将使用该设置。这修复了 [#42005](https://github.com/ClickHouse/ClickHouse/issues/42005)。[#66394](https://github.com/ClickHouse/ClickHouse/pull/66394) ([gvoelfin](https://github.com/gvoelfin)) 。
* 在集群配置中添加 `bind_host` 设置，以便 ClickHouse 在分布式连接中使用特定网络。[#74741](https://github.com/ClickHouse/ClickHouse/pull/74741) ([Todd Yocum](https://github.com/toddyocum)) 。
* 在 `system.tables` 中新增列 `parametrized_view_parameters`。修复了 [https://github.com/clickhouse/clickhouse/issues/66756。\[#75112](https://github.com/clickhouse/clickhouse/issues/66756。\[#75112)]\([https://github.com/ClickHouse/ClickHouse/pull/75112](https://github.com/ClickHouse/ClickHouse/pull/75112)) ([NamNguyenHoai](https://github.com/NamHoaiNguyen)) 。
* 允许修改数据库注释。关闭 [#73351](https://github.com/ClickHouse/ClickHouse/issues/73351) ### 面向用户变更的文档条目。[#75622](https://github.com/ClickHouse/ClickHouse/pull/75622) ([NamNguyenHoai](https://github.com/NamHoaiNguyen)).
* 支持 PostgreSQL 兼容协议中的 `SCRAM-SHA-256` 身份验证。[#76839](https://github.com/ClickHouse/ClickHouse/pull/76839) ([scanhex12](https://github.com/scanhex12)) 。
* 新增函数 `arrayLevenshteinDistance`、`arrayLevenshteinDistanceWeighted` 和 `arraySimilarity`。[#77187](https://github.com/ClickHouse/ClickHouse/pull/77187) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 设置 `parallel_distributed_insert_select` 现已适用于向 `ReplicatedMergeTree` 执行的 `INSERT SELECT` (此前需要 `Distribued` 表) 。[#78041](https://github.com/ClickHouse/ClickHouse/pull/78041) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 引入 `toInterval` 函数。该函数接受 2 个参数 (value 和 unit) ，并将值转换为特定的 `Interval` 类型。[#78723](https://github.com/ClickHouse/ClickHouse/pull/78723) ([Andrew Davis](https://github.com/pulpdrew)) 。
* 为 Iceberg 表函数和引擎新增了几种便捷方式，以解析根 `metadata.json` 文件。关闭了 [#78455](https://github.com/ClickHouse/ClickHouse/issues/78455)。[#78475](https://github.com/ClickHouse/ClickHouse/pull/78475) ([Daniil Ivanik](https://github.com/divanik)) 。
* 在 ClickHouse 中支持 SSH 协议的密码认证。[#78586](https://github.com/ClickHouse/ClickHouse/pull/78586) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。

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

* 支持将关联子查询用作 `WHERE` 子句中 `EXISTS` 表达式的参数。解决了 [#72459](https://github.com/ClickHouse/ClickHouse/issues/72459)。[#76078](https://github.com/ClickHouse/ClickHouse/pull/76078) ([Dmitry Novik](https://github.com/novikd)) 。
* 新增函数 `sparseGrams` 和 `sparseGramsHashes`，提供 ASCII 和 UTF8 版本。作者：[scanhex12](https://github.com/scanhex12)。[#78176](https://github.com/ClickHouse/ClickHouse/pull/78176) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。请勿使用：该实现将在后续版本中发生变更。

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

* 通过惰性列提升性能，这类列会在 ORDER BY 和 LIMIT 之后再读取数据。[#55518](https://github.com/ClickHouse/ClickHouse/pull/55518) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 默认启用查询条件缓存。[#79080](https://github.com/ClickHouse/ClickHouse/pull/79080) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过对 `col->insertFrom()` 调用进行去虚拟化，加快 JOIN 结果的构建。[#77350](https://github.com/ClickHouse/ClickHouse/pull/77350) ([Alexander Gololobov](https://github.com/davenger)).
* 如果可能，将过滤器查询计划步骤中的等值条件并入 JOIN 条件中，以便将其用作哈希表的键。[#78877](https://github.com/ClickHouse/ClickHouse/pull/78877) ([Dmitry Novik](https://github.com/novikd)).
* 如果 JOIN 键同时是两个 parts 的 PK 前缀，则可对 JOIN 使用动态分片。可通过 `query_plan_join_shard_by_pk_ranges` 设置启用此优化 (默认禁用) 。[#74733](https://github.com/ClickHouse/ClickHouse/pull/74733) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 支持根据列的上下界值对 `Iceberg` 数据进行剪枝。修复了 [#77638](https://github.com/ClickHouse/ClickHouse/issues/77638)。[#78242](https://github.com/ClickHouse/ClickHouse/pull/78242) ([alesapin](https://github.com/alesapin)) 。
* 为 `Iceberg` 实现了简单的计数优化。现在，不带任何过滤器的 `count()` 查询应该会更快。关闭 [#77639](https://github.com/ClickHouse/ClickHouse/issues/77639)。[#78090](https://github.com/ClickHouse/ClickHouse/pull/78090) ([alesapin](https://github.com/alesapin)).
* 新增支持使用 `max_merge_delayed_streams_for_parallel_write` 配置合并时可并行写出的列数 (这应可将写入 S3 的纵向合并的内存使用量降低约 25 倍) 。[#77922](https://github.com/ClickHouse/ClickHouse/pull/77922) ([Azat Khuzhin](https://github.com/azat)) 。
* 当缓存以被动方式使用时 (例如用于 merges) ，请禁用 `filesystem_cache_prefer_bigger_buffer_size`。这会降低 merges 期间的内存消耗。[#77898](https://github.com/ClickHouse/ClickHouse/pull/77898) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 现在，在启用并行副本时，我们会根据副本数量来确定读取任务大小。当待读取的数据量不大时，这样可以在各个副本之间更好地分配工作。[#78695](https://github.com/ClickHouse/ClickHouse/pull/78695) ([Nikita Taranov](https://github.com/nickitat)).
* 为 `ORC` 格式支持异步 IO 预取，可通过隐藏远程 IO 延迟来提升整体性能。[#70534](https://github.com/ClickHouse/ClickHouse/pull/70534) ([李扬](https://github.com/taiyang-li)).
* 预先为异步插入分配内存，以提升性能。[#74945](https://github.com/ClickHouse/ClickHouse/pull/74945) ([Ilya Golshtein](https://github.com/ilejn)) 。
* 在可使用 `multiRead` 的地方，不再使用单独的 `get` 请求，以减少 Keeper 请求数量；随着副本数量增加，这类请求原本可能会给 Keeper 带来显著负载。[#56862](https://github.com/ClickHouse/ClickHouse/pull/56862) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 对接受 Nullable 参数的函数进行了小幅优化。[#76489](https://github.com/ClickHouse/ClickHouse/pull/76489) ([李扬](https://github.com/taiyang-li)) 。
* 优化了 `arraySort`。[#76850](https://github.com/ClickHouse/ClickHouse/pull/76850) ([李扬](https://github.com/taiyang-li)) 。
* 将同一 part 的多个标记合并后一次性写入查询条件缓存，以减少锁开销。[#77377](https://github.com/ClickHouse/ClickHouse/pull/77377) ([zhongyuankai](https://github.com/zhongyuankai)) 。
* 针对带有一次括号展开的查询，优化 `s3Cluster` 的性能。[#77686](https://github.com/ClickHouse/ClickHouse/pull/77686) ([Tomáš Hromada](https://github.com/gyfis)).
* 优化按单个 Nullable 或 LowCardinality 列排序的性能。[#77789](https://github.com/ClickHouse/ClickHouse/pull/77789) ([李扬](https://github.com/taiyang-li)).
* 优化 `Native` 格式的内存占用。[#78442](https://github.com/ClickHouse/ClickHouse/pull/78442) ([Azat Khuzhin](https://github.com/azat)) 。
* 小优化：如果需要进行类型转换，则不要将 `count(if(...))` 重写为 `countIf`。关闭 [#78564](https://github.com/ClickHouse/ClickHouse/issues/78564)。[#78565](https://github.com/ClickHouse/ClickHouse/pull/78565) ([李扬](https://github.com/taiyang-li)) 。
* `hasAll` 函数现在可以利用 `tokenbf_v1`、`ngrambf_v1` 全文跳过索引。[#77662](https://github.com/ClickHouse/ClickHouse/pull/77662) ([UnamedRus](https://github.com/UnamedRus)).
* 向量相似度索引最多可能会超额分配 2 倍主内存。此修复重构了内存分配策略，减少了内存占用，并提高了向量相似度索引缓存的利用效率。 (问题 [#78056](https://github.com/ClickHouse/ClickHouse/issues/78056)) 。[#78394](https://github.com/ClickHouse/ClickHouse/pull/78394) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 为 `system.metric_log` 表新增了设置 `schema_type`，用于指定 schema 类型。允许三种 schema：`wide` —— 当前 schema，每个 metric/event 单独存储在一列中 (最适合读取单独的列) ；`transposed` —— 类似于 `system.asynchronous_metric_log`，metrics/events 以行的形式存储；以及最值得关注的 `transposed_with_wide_view` —— 使用 `transposed` schema 创建底层表，同时再提供一个采用 `wide` schema 的视图，将查询转换到底层表上执行。在 `transposed_with_wide_view` 中，视图不支持亚秒级分辨率，`event_time_microseconds` 只是出于向后兼容而保留的别名。[#78412](https://github.com/ClickHouse/ClickHouse/pull/78412) ([alesapin](https://github.com/alesapin)).

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

* 支持为 `Distributed` 查询序列化查询计划。新增设置 `serialize_query_plan`。启用后，来自 `Distributed` 表的查询在远程执行时将使用序列化后的查询计划。这会在 TCP 协议中引入一种新的数据包类型，需要在服务器配置中添加 `<process_query_plan_packet>true</process_query_plan_packet>`，以允许处理此类数据包。[#69652](https://github.com/ClickHouse/ClickHouse/pull/69652) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 支持从视图读取 `JSON` 类型及其子列。[#76903](https://github.com/ClickHouse/ClickHouse/pull/76903) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 新增对 ALTER DATABASE ... ON CLUSTER 的支持。[#79242](https://github.com/ClickHouse/ClickHouse/pull/79242) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 可刷新materialized view 的刷新操作现已显示在 `system.query_log` 中。[#71333](https://github.com/ClickHouse/ClickHouse/pull/71333) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 现在可以通过其配置中的一项新设置将用户自定义函数 (UDFs) 标记为确定性函数。此外，查询缓存现在也会检查查询中调用的 UDFs 是否具有确定性；如果是，则会缓存查询结果。 (Issue [#59988](https://github.com/ClickHouse/ClickHouse/issues/59988)) 。[#77769](https://github.com/ClickHouse/ClickHouse/pull/77769) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 为所有类型的复制任务启用了退避机制。这将有助于降低 CPU 使用率、内存使用量以及日志文件大小。新增了设置 `max_postpone_time_for_failed_replicated_fetches_ms`、`max_postpone_time_for_failed_replicated_merges_ms` 和 `max_postpone_time_for_failed_replicated_tasks_ms`，它们与 `max_postpone_time_for_failed_mutations_ms` 类似。[#74576](https://github.com/ClickHouse/ClickHouse/pull/74576) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* 向 `system.errors` 添加 `query_id`。解决了 [#75815](https://github.com/ClickHouse/ClickHouse/issues/75815)。[#76581](https://github.com/ClickHouse/ClickHouse/pull/76581) ([Vladimir Baikov](https://github.com/bkvvldmr)) 。
* 新增对将 `UInt128` 转换为 `IPv6` 的支持。这样就可以对 `IPv6` 执行 `bitAnd` 操作和算术运算，并再将结果转换回 `IPv6`。关闭 [#76752](https://github.com/ClickHouse/ClickHouse/issues/76752)。此外，这也使得对 `IPv6` 执行 `bitAnd` 操作所得的结果可以再转换回 `IPv6`。另请参见 [#57707](https://github.com/ClickHouse/ClickHouse/pull/57707)。[#76928](https://github.com/ClickHouse/ClickHouse/pull/76928) ([Muzammil Abdul Rehman](https://github.com/muzammilar)) 。
* 默认情况下，不会在 `Variant` 类型内的文本格式中解析特殊的 `Bool` 值。可通过设置 `allow_special_bool_values_inside_variant` 启用此功能。[#76974](https://github.com/ClickHouse/ClickHouse/pull/76974) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持在会话级和服务器级配置低 `priority` 查询的单任务等待时间。[#77013](https://github.com/ClickHouse/ClickHouse/pull/77013) ([VicoWu](https://github.com/VicoWu)) 。
* 为 `JSON` 数据类型的值支持比较。现在，JSON 对象可以像 Map 一样进行比较。[#77397](https://github.com/ClickHouse/ClickHouse/pull/77397) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 改进了 `system.kafka_consumers` 的权限支持。转发内部 `librdkafka` 错误 (顺便一提，这个库很烂) 。[#77700](https://github.com/ClickHouse/ClickHouse/pull/77700) ([Ilya Golshtein](https://github.com/ilejn)).
* 为 Buffer 表引擎的设置新增了校验。[#77840](https://github.com/ClickHouse/ClickHouse/pull/77840) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 添加配置项 `enable_hdfs_pread`，用于在 `HDFS` 中启用或禁用 pread。[#77885](https://github.com/ClickHouse/ClickHouse/pull/77885) ([kevinyhzou](https://github.com/KevinyhZou)).
* 新增用于统计 ZooKeeper `multi` 读写请求次数的 profile events。[#77888](https://github.com/ClickHouse/ClickHouse/pull/77888) ([JackyWoo](https://github.com/JackyWoo)) 。
* 允许在启用 `disable_insertion_and_mutation` 时创建临时表并向其中插入数据。[#77901](https://github.com/ClickHouse/ClickHouse/pull/77901) ([Xu Jia](https://github.com/XuJia0210)) 。
* 将 `max_insert_delayed_streams_for_parallel_write` 调低至 100。[#77919](https://github.com/ClickHouse/ClickHouse/pull/77919) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 Joda 语法中的年份解析问题 (如果你想知道的话，这是 Java 世界里的写法) ，例如 `yyy`。[#77973](https://github.com/ClickHouse/ClickHouse/pull/77973) ([李扬](https://github.com/taiyang-li)) 。
* 附加 `MergeTree` 表的 parts 时，将按照其块顺序执行，这对于 `ReplacingMergeTree` 等特殊合并算法很重要。此更改解决了 [#71009](https://github.com/ClickHouse/ClickHouse/issues/71009)。[#77976](https://github.com/ClickHouse/ClickHouse/pull/77976) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 查询脱敏规则现在可以在发生匹配时抛出 `LOGICAL_ERROR`。这有助于检查预设密码是否在任何日志中泄露。[#78094](https://github.com/ClickHouse/ClickHouse/pull/78094) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 为更好地兼容 MySQL，向 `information_schema.tables` 新增了列 `index_length_column`。[#78119](https://github.com/ClickHouse/ClickHouse/pull/78119) ([Paweł Zakrzewski](https://github.com/KrzaQ)) 。
* 引入两个新指标：`TotalMergeFailures` 和 `NonAbortedMergeFailures`。这些指标用于检测短时间内发生过多 merge 失败的情况。[#78150](https://github.com/ClickHouse/ClickHouse/pull/78150) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复在路径样式下未指定 key 时 S3 URL 解析错误的问题。[#78185](https://github.com/ClickHouse/ClickHouse/pull/78185) ([Arthur Passos](https://github.com/arthurpassos)).
* 修复了异步指标 `BlockActiveTime`、`BlockDiscardTime`、`BlockWriteTime`、`BlockQueueTime` 和 `BlockReadTime` 的错误值 (在此更改之前，1 秒会被错误地报告为 0.001) 。[#78211](https://github.com/ClickHouse/ClickHouse/pull/78211) ([filimonov](https://github.com/filimonov)).
* 对于 StorageS3(Azure)Queue 在向 materialized view 推送期间发生的错误，现已遵循 `loading_retries` 限制；此前，此类错误会无限重试。[#78313](https://github.com/ClickHouse/ClickHouse/pull/78313) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在采用 `delta-kernel-rs` 实现的 DeltaLake 中，修复了性能问题和进度条问题。[#78368](https://github.com/ClickHouse/ClickHouse/pull/78368) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 运行时磁盘现已支持 `include`、`from_env` 和 `from_zk`。解决了 [#78177](https://github.com/ClickHouse/ClickHouse/issues/78177)。[#78470](https://github.com/ClickHouse/ClickHouse/pull/78470) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 `system.warnings` 表中为长时间运行的变更添加动态警告。[#78658](https://github.com/ClickHouse/ClickHouse/pull/78658) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 向系统表 `system.query_condition_cache` 添加了字段 `condition`。该字段存储明文条件，其哈希值被用作查询条件缓存中的键。[#78671](https://github.com/ClickHouse/ClickHouse/pull/78671) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 允许 Hive 分区的值为空。[#78816](https://github.com/ClickHouse/ClickHouse/pull/78816) ([Arthur Passos](https://github.com/arthurpassos)).
* 修复 `BFloat16` 在 `IN` 子句中的类型强制转换问题 (即 `SELECT toBFloat16(1) IN [1, 2, 3];` 现在会返回 `1`) 。关闭 [#78754](https://github.com/ClickHouse/ClickHouse/issues/78754)。[#78839](https://github.com/ClickHouse/ClickHouse/pull/78839) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 如果已设置 `disk = ...`，则不要检查位于其他磁盘上的 `MergeTree` parts。[#78855](https://github.com/ClickHouse/ClickHouse/pull/78855) ([Azat Khuzhin](https://github.com/azat)) 。
* 将 `system.query_log` 中 `used_data_type_families` 的数据类型记录为规范名称。[#78972](https://github.com/ClickHouse/ClickHouse/pull/78972) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 `recoverLostReplica` 期间进行设置清理，与 [#78637](https://github.com/ClickHouse/ClickHouse/pull/78637) 中的处理方式相同。[#79113](https://github.com/ClickHouse/ClickHouse/pull/79113) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 在 INFILE schema 推断中使用插入列。[#78490](https://github.com/ClickHouse/ClickHouse/pull/78490) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常)

* 修复了在聚合投影中使用 `count(Nullable)` 时的错误投影分析。此修复解决了 [#74495](https://github.com/ClickHouse/ClickHouse/issues/74495)。此 PR 还在投影分析过程中添加了一些日志，以便更清楚地说明为什么会使用某个投影，或为什么不会使用。[#74498](https://github.com/ClickHouse/ClickHouse/pull/74498) ([Amos Bird](https://github.com/amosbird)).
* 修复了在执行 `DETACH PART` 期间出现 `Part <...> does not contain in snapshot of previous virtual parts. (PART_IS_TEMPORARILY_LOCKED)` 错误的问题。[#76039](https://github.com/ClickHouse/ClickHouse/pull/76039) ([Aleksei Filatov](https://github.com/aalexfvk)).
* 修复 analyzer 中包含字面量的表达式导致跳过索引失效的问题，并在索引分析期间移除无意义的类型转换。[#77229](https://github.com/ClickHouse/ClickHouse/pull/77229) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了一个 bug：此前 `close_session` 查询参数不生效，导致命名会话只能在 `session_timeout` 到期后才会关闭。[#77336](https://github.com/ClickHouse/ClickHouse/pull/77336) ([Alexey Katsman](https://github.com/alexkats)).
* 修复了在没有附加 materialized view 的情况下接收来自 NATS 服务器的消息时出现的问题。[#77392](https://github.com/ClickHouse/ClickHouse/pull/77392) ([Dmitry Novikov](https://github.com/dmitry-sles-novikov)) 。
* 修复了通过 `merge` 表函数从空 `FileLog` 中读取时出现的逻辑错误，关闭 [#75575](https://github.com/ClickHouse/ClickHouse/issues/75575)。[#77441](https://github.com/ClickHouse/ClickHouse/pull/77441) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 共享 Variant 的 `Dynamic` 序列化现使用默认格式设置。[#77572](https://github.com/ClickHouse/ClickHouse/pull/77572) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了检查本地磁盘上表数据路径是否存在时的问题。[#77608](https://github.com/ClickHouse/ClickHouse/pull/77608) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了某些类型将常量值发送到远程端时的问题。[#77634](https://github.com/ClickHouse/ClickHouse/pull/77634) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 S3/AzureQueue 中因 Context 过期导致的崩溃。[#77720](https://github.com/ClickHouse/ClickHouse/pull/77720) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 隐藏 RabbitMQ、Nats、Redis 和 AzureQueue 表引擎中的凭证。[#77755](https://github.com/ClickHouse/ClickHouse/pull/77755) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 `argMin`/`argMax` 中比较 `NaN` 时的未定义行为。[#77756](https://github.com/ClickHouse/ClickHouse/pull/77756) ([Raúl Marín](https://github.com/Algunenano)) 。
* 定期检查合并和变更是否已被取消，即使该操作不会产生任何可写入的块。[#77766](https://github.com/ClickHouse/ClickHouse/pull/77766) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了 Replicated database 中可刷新materialized view在新添加的副本上无法正常工作的问题。[#77774](https://github.com/ClickHouse/ClickHouse/pull/77774) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了发生 `NOT_FOUND_COLUMN_IN_BLOCK` 错误时可能导致的崩溃。[#77854](https://github.com/ClickHouse/ClickHouse/pull/77854) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复在填充数据时 S3/AzureQueue 崩溃的问题。[#77878](https://github.com/ClickHouse/ClickHouse/pull/77878) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 在 SSH 服务器中禁用历史记录的模糊搜索 (因为它需要 skim 库) 。[#78002](https://github.com/ClickHouse/ClickHouse/pull/78002) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一个错误：如果表中的另一个向量列定义了向量相似度索引，那么对未建立索引的列执行向量搜索查询时会返回错误结果。 (Issue [#77978](https://github.com/ClickHouse/ClickHouse/issues/77978)) 。[#78069](https://github.com/ClickHouse/ClickHouse/pull/78069) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 修复了提示“"所请求的输出格式 {} 是二进制的……仍要输出吗？\[y/N]"”中的一个细微错误。[#78095](https://github.com/ClickHouse/ClickHouse/pull/78095) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 `toStartOfInterval` 的 origin 参数为 0 时的一个问题。[#78096](https://github.com/ClickHouse/ClickHouse/pull/78096) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 禁止为 HTTP 接口指定空的 `session_id` 查询参数。[#78098](https://github.com/ClickHouse/ClickHouse/pull/78098) ([Alexey Katsman](https://github.com/alexkats)) 。
* 修复了 `Replicated` 数据库中可能出现的元数据覆盖问题，该问题可能由在 `ALTER` 查询后立即执行 `RENAME` 查询引发。[#78107](https://github.com/ClickHouse/ClickHouse/pull/78107) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复 `NATS` 引擎崩溃问题。[#78108](https://github.com/ClickHouse/ClickHouse/pull/78108) ([Dmitry Novikov](https://github.com/dmitry-sles-novikov)) 。
* 不要在用于 SSH 的嵌入式客户端中尝试创建 history\_file (在之前的版本中，虽然创建始终失败，但仍会尝试创建) 。[#78112](https://github.com/ClickHouse/ClickHouse/pull/78112) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在执行 `RENAME DATABASE` 或 `DROP TABLE` 语句后，`system.detached_tables` 显示错误信息的问题。[#78126](https://github.com/ClickHouse/ClickHouse/pull/78126) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了 [#77274](https://github.com/ClickHouse/ClickHouse/pull/77274) 之后 `Replicated` 数据库中表数量过多检查的问题。此外，为避免在 `ReplicatedMergeTree` 或 `KeeperMap` 场景下在 Keeper 中创建未计入的节点，现已改为在创建存储之前执行该检查。[#78127](https://github.com/ClickHouse/ClickHouse/pull/78127) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了因并发初始化 `S3Queue` 元数据可能导致的崩溃问题。[#78131](https://github.com/ClickHouse/ClickHouse/pull/78131) ([Azat Khuzhin](https://github.com/azat)).
* `groupArray*` 函数现在会对 `max_size` 参数中 `Int` 类型的 0 值报出 `BAD_ARGUMENTS` 错误，这与 `UInt` 类型的处理方式一致，而不是尝试使用该值执行。[#78140](https://github.com/ClickHouse/ClickHouse/pull/78140) ([Eduard Karacharov](https://github.com/korowa))。
* 修复了这样一种崩溃问题：如果本地表在被 detached 之前就已被移除，在恢复丢失的副本时会发生崩溃。[#78173](https://github.com/ClickHouse/ClickHouse/pull/78173) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `system.s3_queue_settings` 中 “alterable” 列始终返回 `false` 的问题。[#78187](https://github.com/ClickHouse/ClickHouse/pull/78187) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 对 Azure 访问签名进行掩码处理，使用户和日志中都无法看到。[#78189](https://github.com/ClickHouse/ClickHouse/pull/78189) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了 Wide parts 中带前缀的子流预取问题。[#78205](https://github.com/ClickHouse/ClickHouse/pull/78205) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在键数组类型为 `LowCardinality(Nullable)` 的情况下，`mapFromArrays` 发生崩溃或返回错误结果的问题。[#78240](https://github.com/ClickHouse/ClickHouse/pull/78240) ([Eduard Karacharov](https://github.com/korowa)).
* 修复 delta-kernel-rs 的身份验证选项。[#78255](https://github.com/ClickHouse/ClickHouse/pull/78255) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 如果副本的 `disable_insertion_and_mutation` 为 true，则不会调度可刷新materialized view任务。该任务本质上属于插入操作，因此如果 `disable_insertion_and_mutation` 为 true，就会失败。[#78277](https://github.com/ClickHouse/ClickHouse/pull/78277) ([Xu Jia](https://github.com/XuJia0210)).
* 验证 `Merge` 引擎对底层表的访问权限。[#78339](https://github.com/ClickHouse/ClickHouse/pull/78339) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 查询 `Distributed` 表时，`FINAL` 修饰符可能被忽略。[#78428](https://github.com/ClickHouse/ClickHouse/pull/78428) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* `bitmapMin` 在 bitmap 为空时会返回 uint32\_max (当输入类型更大时则返回 uint64\_max) ，这与空 roaring\_bitmap 的最小值返回行为一致。[#78444](https://github.com/ClickHouse/ClickHouse/pull/78444) ([wxybear](https://github.com/wxybear)) 。
* 当启用 `distributed_aggregation_memory_efficient` 时，禁用在读取 FROM 后立即进行查询处理并行化，因为这可能导致逻辑错误。关闭了 [#76934](https://github.com/ClickHouse/ClickHouse/issues/76934)。[#78500](https://github.com/ClickHouse/ClickHouse/pull/78500) ([flynn](https://github.com/ucasfl)).
* 在应用 `max_streams_to_max_threads_ratio` 设置后，如果规划的流数量为零，则至少设置一个读取流。[#78505](https://github.com/ClickHouse/ClickHouse/pull/78505) ([Eduard Karacharov](https://github.com/korowa)) 。
* 在存储 `S3Queue` 中修复了逻辑错误 "无法取消注册：表 uuid 尚未注册"。关闭了 [#78285](https://github.com/ClickHouse/ClickHouse/issues/78285)。[#78541](https://github.com/ClickHouse/ClickHouse/pull/78541) ([Kseniia Sumarokova](https://github.com/kssenii)).
* ClickHouse 现在可以在同时启用 cgroups v1 和 v2 的系统上识别自身的 cgroup v2。[#78566](https://github.com/ClickHouse/ClickHouse/pull/78566) ([Grigory Korolev](https://github.com/gkorolev)) 。
* `-Cluster` 表函数在与表级设置一同使用时会报错。[#78587](https://github.com/ClickHouse/ClickHouse/pull/78587) ([Daniil Ivanik](https://github.com/divanik)) 。
* 在 ReplicatedMergeTree 不支持 INSERT 事务时，改进了相关检查。[#78633](https://github.com/ClickHouse/ClickHouse/pull/78633) ([Azat Khuzhin](https://github.com/azat)) 。
* 在 attach 过程中清理查询设置。[#78637](https://github.com/ClickHouse/ClickHouse/pull/78637) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在 `iceberg_metadata_file_path` 中指定无效 path 时导致的崩溃。[#78688](https://github.com/ClickHouse/ClickHouse/pull/78688) ([alesapin](https://github.com/alesapin)).
* 在采用 delta-kernel-s 实现的 `DeltaLake` 表引擎中，修复了以下问题：当读取 schema 与表 schema 不一致，且同时存在分区列时，会导致出现 "not found column" 错误。 [#78690](https://github.com/ClickHouse/ClickHouse/pull/78690) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了一个问题：在计划关闭某个命名 session 后 (但在 timeout 到期前) ，如果又创建了一个同名的新命名 session，它会在第一个 session 原定关闭的时间点被关闭。 [#78698](https://github.com/ClickHouse/ClickHouse/pull/78698) ([Alexey Katsman](https://github.com/alexkats)).
* 修复了几类从使用 `MongoDB` engine 或 `mongodb` 表函数的表中读取数据的 `SELECT` 查询：包括在 `WHERE` 子句中对常量值进行隐式转换的查询 (例如 `WHERE datetime = '2025-03-10 00:00:00'`) ，以及带有 `LIMIT` 和 `GROUP BY` 的查询。此前，这些查询可能会返回错误结果。[#78777](https://github.com/ClickHouse/ClickHouse/pull/78777) ([Anton Popov](https://github.com/CurtizJ)) 。
* 运行 `CHECK TABLE` 时，不要阻塞表的关闭。[#78782](https://github.com/ClickHouse/ClickHouse/pull/78782) ([Raúl Marín](https://github.com/Algunenano)).
* Keeper 修复：修正在所有情况下 ephemeral 计数的问题。[#78799](https://github.com/ClickHouse/ClickHouse/pull/78799) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在 `StorageDistributed` 中使用 `view` 以外的表函数时的错误类型转换。关闭 [#78464](https://github.com/ClickHouse/ClickHouse/issues/78464)。[#78828](https://github.com/ClickHouse/ClickHouse/pull/78828) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复 `tupleElement(*, 1)` 格式化不一致的问题。关闭 [#78639](https://github.com/ClickHouse/ClickHouse/issues/78639)。[#78832](https://github.com/ClickHouse/ClickHouse/pull/78832) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* `ssd_cache` 类型的字典现在会拒绝 `block_size` 和 `write_buffer_size` 参数为零或负数的值 (问题 [#78314](https://github.com/ClickHouse/ClickHouse/issues/78314)) 。[#78854](https://github.com/ClickHouse/ClickHouse/pull/78854) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 修复了错误关机后执行 ALTER 时可刷新 MATERIALIZED VIEW 崩溃的问题。 [#78858](https://github.com/ClickHouse/ClickHouse/pull/78858) ([Azat Khuzhin](https://github.com/azat)).
* 修复了 `CSV` 格式中无效 `DateTime` 值的解析问题。[#78919](https://github.com/ClickHouse/ClickHouse/pull/78919) ([Pavel Kruglov](https://github.com/Avogar)) 。
* Keeper 修复：避免在 multi 请求失败时触发 watches。[#79247](https://github.com/ClickHouse/ClickHouse/pull/79247) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了读取 Iceberg 表时的失败问题：当显式指定 min-max 值且其为 `NULL` 时，会触发该问题。已注意到 Go Iceberg 库会生成这类极其糟糕的文件。关闭 [#78740](https://github.com/ClickHouse/ClickHouse/issues/78740)。[#78764](https://github.com/ClickHouse/ClickHouse/pull/78764) ([flynn](https://github.com/ucasfl)).

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

* 在 Rust 中遵循 CPU 目标特性设置，并在所有 crate 中启用 LTO。[#78590](https://github.com/ClickHouse/ClickHouse/pull/78590) ([Raúl Marín](https://github.com/Algunenano)).

<div id="253">
  ### ClickHouse 发行版 25.3 LTS，2025-03-20
</div>

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

* 禁止截断 Replicated 数据库。[#76651](https://github.com/ClickHouse/ClickHouse/pull/76651) ([Bharat Nallan](https://github.com/bharatnc)).
* 已撤回跳过索引缓存。[#77447](https://github.com/ClickHouse/ClickHouse/pull/77447) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).

#### 新特性

* `JSON` 数据类型现已可用于生产环境。请参见 [https://jsonbench.com/。\`Dynamic\`](https://jsonbench.com/。`Dynamic`) 和 `Variant` 数据类型现已可用于生产环境。[#77785](https://github.com/ClickHouse/ClickHouse/pull/77785) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 clickhouse-server 引入了 SSH 协议。现在，可以使用任何 SSH 客户端连接到 ClickHouse。此项已关闭：[#74340](https://github.com/ClickHouse/ClickHouse/issues/74340)。[#74989](https://github.com/ClickHouse/ClickHouse/pull/74989) ([George Gamezardashvili](https://github.com/Infjoker)) 。
* 如果启用了并行副本，则将表函数替换为其对应的 `-Cluster` 版本。修复了 [#65024](https://github.com/ClickHouse/ClickHouse/issues/65024)。[#70659](https://github.com/ClickHouse/ClickHouse/pull/70659) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 用户态页缓存的一种新实现，可将数据缓存在进程内内存中，而非依赖操作系统页缓存；当数据存储在远程虚拟文件系统上，且没有本地文件系统缓存支持时，这一实现非常有用。[#70509](https://github.com/ClickHouse/ClickHouse/pull/70509) ([Michael Kolupaev](https://github.com/al13n321)).
* 新增了 `concurrent_threads_scheduler` 服务器设置，用于控制 CPU 插槽如何在并发查询之间分配。可将其设置为 `round_robin` (此前的行为) 或 `fair_round_robin`，以解决 INSERT 和 SELECT 之间 CPU 分配不公平的问题。[#75949](https://github.com/ClickHouse/ClickHouse/pull/75949) ([Sergei Trifonov](https://github.com/serxa)) 。
* 新增 `estimateCompressionRatio` 聚合函数 [#70801](https://github.com/ClickHouse/ClickHouse/issues/70801)。[#76661](https://github.com/ClickHouse/ClickHouse/pull/76661) ([Tariq Almawash](https://github.com/talmawash)) 。
* 新增函数 `arraySymmetricDifference`。它返回多个数组参数中未在所有参数中同时出现的所有元素。示例：`SELECT arraySymmetricDifference([1, 2], [2, 3])` 返回 `[1, 3]`。 (问题 [#61673](https://github.com/ClickHouse/ClickHouse/issues/61673)) 。[#76231](https://github.com/ClickHouse/ClickHouse/pull/76231) ([Filipp Abapolov](https://github.com/pheepa)) 。
* 允许通过存储/表函数设置 `iceberg_metadata_file_path `，为 Iceberg 显式指定要读取的元数据文件。修复了 [#47412](https://github.com/ClickHouse/ClickHouse/issues/47412)。[#77318](https://github.com/ClickHouse/ClickHouse/pull/77318) ([alesapin](https://github.com/alesapin)).
* 新增了 `keccak256` 哈希函数，该函数常见于区块链实现中，尤其是基于 EVM 的系统。[#76669](https://github.com/ClickHouse/ClickHouse/pull/76669) ([Arnaud Briche](https://github.com/arnaudbriche)) 。
* 新增三个函数：`icebergTruncate` (按规范实现，参见 [https://iceberg.apache.org/spec/#truncate-transform-details](https://iceberg.apache.org/spec/#truncate-transform-details)) 、`toYearNumSinceEpoch` 和 `toMonthNumSinceEpoch`。在 `Iceberg` 引擎的分区剪枝中支持 `truncate` 转换。[#77403](https://github.com/ClickHouse/ClickHouse/pull/77403) ([alesapin](https://github.com/alesapin)) 。
* 新增对 `LowCardinality(Decimal)` 数据类型的支持 [#72256](https://github.com/ClickHouse/ClickHouse/issues/72256)。[#72833](https://github.com/ClickHouse/ClickHouse/pull/72833) ([zhanglistar](https://github.com/zhanglistar)) 。
* `FilterTransformPassedRows` 和 `FilterTransformPassedBytes` profile events 将显示查询执行期间被过滤掉的行数和字节数。[#76662](https://github.com/ClickHouse/ClickHouse/pull/76662) ([Onkar Deshpande](https://github.com/onkar)) 。
* 支持 histogram metric 类型。该接口与 Prometheus 客户端非常相似，您只需调用 `observe(value)`，即可增加与该值对应 bucket 中的计数。histogram metrics 通过 `system.histogram_metrics` 暴露。 [#75736](https://github.com/ClickHouse/ClickHouse/pull/75736) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增对基于显式值进行切换的非常量 CASE 的支持。[#77399](https://github.com/ClickHouse/ClickHouse/pull/77399) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。

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

* 为基于 AWS S3 和本地文件系统的 DeltaLake 表新增了对 [Unity Catalog](https://www.databricks.com/product/unity-catalog) 的支持。[#76988](https://github.com/ClickHouse/ClickHouse/pull/76988) ([alesapin](https://github.com/alesapin))。
* 为 Iceberg 表引入了与 AWS Glue 服务目录的实验性集成。[#77257](https://github.com/ClickHouse/ClickHouse/pull/77257) ([alesapin](https://github.com/alesapin))。
* 新增了对动态集群自动发现的支持。这扩展了现有的 *node* 自动发现功能。ClickHouse 现在可使用 `<multicluster_root_path>` 在同一 ZooKeeper 路径下自动发现并注册新的 *clusters*。[#76001](https://github.com/ClickHouse/ClickHouse/pull/76001) ([Anton Ivashkin](https://github.com/ianton-ru))。
* 允许在达到可配置的超时时间后，通过新设置 `enable_replacing_merge_with_cleanup_for_min_age_to_force_merge` 自动对整个分区执行清理合并。[#76440](https://github.com/ClickHouse/ClickHouse/pull/76440) ([Christoph Wurm](https://github.com/cwurm))。

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

* 实现查询条件缓存，通过复用重复条件来提升查询性能。不满足条件的数据范围会作为内存中的临时索引被记录下来，后续查询将使用该索引。关闭 [#67768](https://github.com/ClickHouse/ClickHouse/issues/67768) [#69236](https://github.com/ClickHouse/ClickHouse/pull/69236) ([zhongyuankai](https://github.com/zhongyuankai)).
* 在移除 parts 时主动从缓存中清除数据。如果数据量较少，则不要让缓存增长到最大容量。[#76641](https://github.com/ClickHouse/ClickHouse/pull/76641) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在算术计算中使用 clang 内建的 i256 替换 Int256 和 UInt256，从而提升性能 [#70502](https://github.com/ClickHouse/ClickHouse/issues/70502)。[#73658](https://github.com/ClickHouse/ClickHouse/pull/73658) ([李扬](https://github.com/taiyang-li)).
* 在某些情况下 (例如空数组列) ，parts 可能包含空文件。当表位于元数据存储与对象存储分离的磁盘上时，可以跳过向 ObjectStorage 写入空 blob，仅为此类文件存储元数据。[#75860](https://github.com/ClickHouse/ClickHouse/pull/75860) ([Alexander Gololobov](https://github.com/davenger)).
* 提升 Decimal32/Decimal64/DateTime64 的 min/max 性能。[#76570](https://github.com/ClickHouse/ClickHouse/pull/76570) ([李扬](https://github.com/taiyang-li)).
* 查询编译 (设置 `compile_expressions`) 现在会考虑机器类型，这会显著加快此类查询的执行速度。[#76753](https://github.com/ClickHouse/ClickHouse/pull/76753) ([ZhangLiStar](https://github.com/zhanglistar)).
* 优化 `arraySort`。[#76850](https://github.com/ClickHouse/ClickHouse/pull/76850) ([李扬](https://github.com/taiyang-li)).
* 当缓存仅被动使用时 (例如用于 merges) ，禁用 `filesystem_cache_prefer_bigger_buffer_size`。[#77898](https://github.com/ClickHouse/ClickHouse/pull/77898) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在代码中的一些位置应用 `preserve_most` 属性，以实现略好的代码生成效果。[#67778](https://github.com/ClickHouse/ClickHouse/pull/67778) ([Nikita Taranov](https://github.com/nickitat)).
* 加快 ClickHouse server 关闭速度 (去掉 2.5 秒延迟) 。[#76550](https://github.com/ClickHouse/ClickHouse/pull/76550) ([Azat Khuzhin](https://github.com/azat)).
* 避免在 ReadBufferFromS3 和其他远程读取缓冲区中发生额外分配，将其内存占用降低一半。[#76692](https://github.com/ClickHouse/ClickHouse/pull/76692) ([Sema Checherinda](https://github.com/CheSema)).
* 将 zstd 从 1.5.5 升级到 1.5.7，可能会带来一些[性能提升](https://github.com/facebook/zstd/releases/tag/v1.5.7)。[#77137](https://github.com/ClickHouse/ClickHouse/pull/77137) ([Pradeep Chhetri](https://github.com/chhetripradeep)).
* 减少在 Wide parts 中预取 JSON 列时的内存占用。这在 ClickHouse 运行于共享存储之上时尤其适用，例如在 ClickHouse Cloud 中。[#77640](https://github.com/ClickHouse/ClickHouse/pull/77640) ([Pavel Kruglov](https://github.com/Avogar)).

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

* 支持在 `TRUNCATE` 与 `INTO OUTFILE` 配合使用时进行原子重命名。修复了 [#70323](https://github.com/ClickHouse/ClickHouse/issues/70323)。[#77181](https://github.com/ClickHouse/ClickHouse/pull/77181) ([Onkar Deshpande](https://github.com/onkar)) 。
* 现在已不能再将 `NaN` 或 `inf` 用作设置中的浮点值了。反正这在以前也没什么意义。[#77546](https://github.com/ClickHouse/ClickHouse/pull/77546) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 当 analyzer 被禁用时，无论 `compatibility` 设置为何，默认都会禁用并行副本。仍可通过显式将 `parallel_replicas_only_with_analyzer` 设置为 `false` 来更改这一行为。 [#77115](https://github.com/ClickHouse/ClickHouse/pull/77115) ([Igor Nikonov](https://github.com/devcrafter)).
* 新增了可定义请求头列表的功能，这些请求头会从客户端请求中转发到外部 HTTP 身份验证器。[#77054](https://github.com/ClickHouse/ClickHouse/pull/77054) ([inv2004](https://github.com/inv2004)).
* 对元组列中的字段，列匹配支持忽略列名大小写。关闭 [https://github.com/apache/incubator-gluten/issues/8324。\[#73780](https://github.com/apache/incubator-gluten/issues/8324。\[#73780)]\([https://github.com/ClickHouse/ClickHouse/pull/73780](https://github.com/ClickHouse/ClickHouse/pull/73780)) ([李扬](https://github.com/taiyang-li)) 。
* Gorilla 编解码器的参数现在将始终保存在 .sql 文件的表元数据中。此项修复关闭了：[ #70072](https://github.com/ClickHouse/ClickHouse/issues/70072)。[#74814](https://github.com/ClickHouse/ClickHouse/pull/74814) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 改进了对某些数据湖的解析能力 (Sequence ID 解析：新增了对 manifest 文件中序列标识符的解析功能；以及 Avro 元数据解析：重新设计了 Avro 元数据解析器，以便于后续扩展) 。[#75010](https://github.com/ClickHouse/ClickHouse/pull/75010) ([Daniil Ivanik](https://github.com/divanik)) 。
* 从 `system.opentelemetry_span_log` 的默认 ORDER BY 中删除 trace\_id。[#75907](https://github.com/ClickHouse/ClickHouse/pull/75907) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在可将加密 (属性 `encrypted_by`) 应用于任何 configuration file (config.xml、users.xml、嵌套配置文件) 。此前，它仅适用于顶层 config.xml 文件。[#75911](https://github.com/ClickHouse/ClickHouse/pull/75911) ([Mikhail Gorshkov](https://github.com/mgorshkov)) 。
* 改进 `system.warnings` 表，并添加一些可动态添加、更新或删除的警告信息。[#76029](https://github.com/ClickHouse/ClickHouse/pull/76029) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 此 PR 导致无法运行查询 `ALTER USER user1 ADD PROFILES a, DROP ALL PROFILES`，因为所有 `DROP` 操作都必须按顺序排在最前面。[#76242](https://github.com/ClickHouse/ClickHouse/pull/76242) ([pufit](https://github.com/pufit)).
* 对 SYNC REPLICA 进行了多项改进 (更清晰的错误信息、更完善的测试、健全性检查) 。[#76307](https://github.com/ClickHouse/ClickHouse/pull/76307) ([Azat Khuzhin](https://github.com/azat)) 。
* 在备份期间向 S3 执行多部分复制因 Access Denied 失败时，会使用正确的回退机制。在使用不同凭证的存储桶之间执行备份时，多部分复制可能会产生 Access Denied 错误。 [#76515](https://github.com/ClickHouse/ClickHouse/pull/76515) ([Antonio Andelic](https://github.com/antonio2368)).
* 将 librdkafka (这东西就是一坨垃圾) 升级到 2.8.0 版本 (结果还是一样烂) ，并改进了 Kafka 表的关闭流程，从而减少了删除表和服务器重启期间的延迟。`engine=Kafka` 在删除表时不再显式退出消费者组。相反，消费者会继续留在组中，直到在 `session_timeout_ms` (默认值：45 秒) 无活动后被自动移除。[#76621](https://github.com/ClickHouse/ClickHouse/pull/76621) ([filimonov](https://github.com/filimonov)).
* 修复了对 S3 请求设置的校验。[#76658](https://github.com/ClickHouse/ClickHouse/pull/76658) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 像 `server_settings` 或 `settings` 这样的系统表带有 `default` 值列，用起来很方便。现在，`merge_tree_settings` 和 `replicated_merge_tree_settings` 中也加入了该列。[#76942](https://github.com/ClickHouse/ClickHouse/pull/76942) ([Diego Nieto](https://github.com/lesandie)) 。
* 新增了 `ProfileEvents::QueryPreempted`，其实现逻辑与 `CurrentMetrics::QueryPreempted` 类似。[#77015](https://github.com/ClickHouse/ClickHouse/pull/77015) ([VicoWu](https://github.com/VicoWu)) 。
* 此前，Replicated database 可能会将查询中指定的凭据输出到日志中。该问题已修复。关闭了：[ #77123](https://github.com/ClickHouse/ClickHouse/issues/77123)。[#77133](https://github.com/ClickHouse/ClickHouse/pull/77133) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 允许在 `plain_rewritable disk` 上执行 ALTER TABLE DROP PARTITION。[#77138](https://github.com/ClickHouse/ClickHouse/pull/77138) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 备份/恢复设置 `allow_s3_native_copy` 现在支持三种取值：- `False` - 不使用 S3 原生复制；- `True` (旧默认值) - ClickHouse 会先尝试 S3 原生复制，如果失败则回退到读取+写入方式；- `'auto'` (新默认值) - ClickHouse 会先比较源端和目标端的凭据。如果两者相同，ClickHouse 会尝试 S3 原生复制，之后在必要时可回退到读取+写入方式。如果两者不同，ClickHouse 将直接采用读取+写入方式。[#77401](https://github.com/ClickHouse/ClickHouse/pull/77401) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在 DeltaLake 表引擎的 delta kernel 中，支持使用 AWS 会话令牌和环境凭据。[#77661](https://github.com/ClickHouse/ClickHouse/pull/77661) ([Kseniia Sumarokova](https://github.com/kssenii)) 。

#### 缺陷修复 (官方稳定版本中用户可见的异常行为)

* 修复异步分布式 `INSERT` 在处理待处理批次时可能卡住的问题 (例如因 `No such file or directory`) 。[#72939](https://github.com/ClickHouse/ClickHouse/pull/72939) ([Azat Khuzhin](https://github.com/azat)).
* 通过对隐式 `Date` 到 `DateTime` 转换强制采用饱和行为，改进了索引分析期间的日期时间转换。这解决了因日期时间取值范围限制而导致的潜在索引分析偏差问题。此修复对应 [#73307](https://github.com/ClickHouse/ClickHouse/issues/73307)。此外，还修复了在 `date_time_overflow_behavior = 'ignore'` (默认值) 时显式 `toDateTime` 转换的问题。[#73326](https://github.com/ClickHouse/ClickHouse/pull/73326) ([Amos Bird](https://github.com/amosbird)).
* 修复了因 UUID 与表名之间的竞争条件而导致的各种 bug (例如，这将修复 `RENAME` 与 `RESTART REPLICA` 之间的竞争；在并发执行 `RENAME` 与 `SYSTEM RESTART REPLICA` 时，你最终可能会重启错误的副本，和/或让其中一个表停留在 `Table X is being restarted` 状态) 。[#76308](https://github.com/ClickHouse/ClickHouse/pull/76308) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复以下场景下的数据丢失问题：启用 async insert 并执行 insert into ... from file ... 时，如果各块大小不一致，且第一个块的大小 \< async\_max\_size，而第二个块 > async\_max\_size，则第二个块不会被插入，这些数据会滞留在 `squashing` 中。[#76343](https://github.com/ClickHouse/ClickHouse/pull/76343) ([Han Fei](https://github.com/hanfei1991)) 。
* 将 `system.data_skipping_indices` 中的字段 'marks' 更名为 'marks\_bytes'。[#76374](https://github.com/ClickHouse/ClickHouse/pull/76374) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复动态调整文件系统缓存大小时，在淘汰过程中处理意外错误的问题。[#76466](https://github.com/ClickHouse/ClickHouse/pull/76466) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了并行哈希中 `used_flag` 的初始化问题，该问题可能导致服务器崩溃。[#76580](https://github.com/ClickHouse/ClickHouse/pull/76580) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了在 projection 中调用 `defaultProfiles` 函数时的逻辑错误。[#76627](https://github.com/ClickHouse/ClickHouse/pull/76627) ([pufit](https://github.com/pufit)).
* Web UI 不再在浏览器中请求交互式基本身份验证。关闭了 [#76319](https://github.com/ClickHouse/ClickHouse/issues/76319)。[#76637](https://github.com/ClickHouse/ClickHouse/pull/76637) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复从分布式表中查询布尔字面量时触发的 THERE\_IS\_NO\_COLUMN 异常。[#76656](https://github.com/ClickHouse/ClickHouse/pull/76656) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 表目录内的子路径现在会以更合理的方式进行选择。[#76681](https://github.com/ClickHouse/ClickHouse/pull/76681) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了在对主键 (PK) 中包含子列的表执行 ALTER 后出现的 `Not found column in block` 错误。在 [https://github.com/ClickHouse/ClickHouse/pull/72644](https://github.com/ClickHouse/ClickHouse/pull/72644) 之后，还需要 [https://github.com/ClickHouse/ClickHouse/pull/74403。](https://github.com/ClickHouse/ClickHouse/pull/74403。) [#76686](https://github.com/ClickHouse/ClickHouse/pull/76686) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 为 NULL 短路求值添加性能测试并修复缺陷。[#76708](https://github.com/ClickHouse/ClickHouse/pull/76708) ([李扬](https://github.com/taiyang-li)) 。
* 在最终化之前先刷新输出写缓冲区。修复了在某些输出格式最终化过程中触发的 `LOGICAL_ERROR`，例如 `JSONEachRowWithProgressRowOutputFormat`。[#76726](https://github.com/ClickHouse/ClickHouse/pull/76726) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 新增了对 MongoDB 二进制 UUID 的支持 ([#74452](https://github.com/ClickHouse/ClickHouse/issues/74452)) - 修复了使用表函数时针对 MongoDB 的 WHERE 下推问题 ([#72210](https://github.com/ClickHouse/ClickHouse/issues/72210)) - 调整了 MongoDB - ClickHouse 类型映射，使 MongoDB 的二进制 UUID 只能解析为 ClickHouse 的 UUID。这应能避免今后出现歧义和意外情况。- 修复了 OID 映射，同时保持向后兼容性。[#76762](https://github.com/ClickHouse/ClickHouse/pull/76762) ([Kirill Nikiforov](https://github.com/allmazz)) 。
* 修复并行反序列化 JSON 子列前缀时的异常处理问题。[#76809](https://github.com/ClickHouse/ClickHouse/pull/76809) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `lgamma` 函数在负整数上的行为问题。[#76840](https://github.com/ClickHouse/ClickHouse/pull/76840) ([Ilya Kataev](https://github.com/IlyaKataev)) 。
* 修复了对显式定义的主键进行反向键分析时的问题。类似于 [#76654](https://github.com/ClickHouse/ClickHouse/issues/76654)。[#76846](https://github.com/ClickHouse/ClickHouse/pull/76846) ([Amos Bird](https://github.com/amosbird)) 。
* 修复 JSON 格式中 Bool 值的格式化输出问题。 [#76905](https://github.com/ClickHouse/ClickHouse/pull/76905) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在异步插入期间发生错误时，因 JSON 列回滚异常而可能导致的崩溃。[#76908](https://github.com/ClickHouse/ClickHouse/pull/76908) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 此前，`multiIf` 在规划阶段和主执行阶段可能会返回不同类型的列，导致代码从 C++ 的角度来看出现未定义行为。[#76914](https://github.com/ClickHouse/ClickHouse/pull/76914) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了 MergeTree 中常量 Nullable 键的错误序列化问题。此修复解决了 [#76939](https://github.com/ClickHouse/ClickHouse/issues/76939)。[#76985](https://github.com/ClickHouse/ClickHouse/pull/76985) ([Amos Bird](https://github.com/amosbird)) 。
* 修复 `BFloat16` 值的排序。此修复关闭了 [#75487](https://github.com/ClickHouse/ClickHouse/issues/75487)。此修复关闭了 [#75669](https://github.com/ClickHouse/ClickHouse/issues/75669)。[#77000](https://github.com/ClickHouse/ClickHouse/pull/77000) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复带有 Variant 子列的 JSON 相关问题：在 part 一致性检查中新增跳过临时子列的检查。[#72187](https://github.com/ClickHouse/ClickHouse/issues/72187)。[#77034](https://github.com/ClickHouse/ClickHouse/pull/77034) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 修复了在类型不匹配时 Values 格式中模板解析崩溃的问题。[#77071](https://github.com/ClickHouse/ClickHouse/pull/77071) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 不允许创建主键包含子列的 EmbeddedRocksDB 表。此前虽然可以创建这类表，但 SELECT 查询会失败。[#77074](https://github.com/ClickHouse/ClickHouse/pull/77074) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 distributed queries 中的非法比较问题，因为将谓词下推到远程端时没有考虑字面量类型。 [#77093](https://github.com/ClickHouse/ClickHouse/pull/77093) ([Duc Canh Le](https://github.com/canhld94)).
* 修复了在创建 Kafka 表时发生异常导致崩溃的问题。[#77121](https://github.com/ClickHouse/ClickHouse/pull/77121) ([Pavel Kruglov](https://github.com/Avogar)).
* Kafka 和 RabbitMQ 引擎现已支持 JSON 和子列。[#77122](https://github.com/ClickHouse/ClickHouse/pull/77122) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 MacOS 上异常堆栈展开的问题。[#77126](https://github.com/ClickHouse/ClickHouse/pull/77126) ([Eduard Karacharov](https://github.com/korowa)) 。
* 修复 getSubcolumn 函数中读取 'null' 子列时的问题。[#77163](https://github.com/ClickHouse/ClickHouse/pull/77163) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 bloom filter 索引在处理 Array 和不受支持的函数时的问题。[#77271](https://github.com/ClickHouse/ClickHouse/pull/77271) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 我们应当只在首次执行 CREATE 查询时检查表数量限制。[#77274](https://github.com/ClickHouse/ClickHouse/pull/77274) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 不是 bug：`SELECT toBFloat16(-0.0) == toBFloat16(0.0)` 现在会正确返回 `true` (此前返回 `false`) 。这使其行为与 `Float32` 和 `Float64` 一致。[#77290](https://github.com/ClickHouse/ClickHouse/pull/77290) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 修复了可能错误引用未初始化的 key\_index 变量的问题，这可能导致在调试构建中崩溃 (此未初始化引用不会在发布构建中引发问题，因为后续代码很可能会抛出错误) 。 ### 面向用户可见变更的文档条目。 [#77305](https://github.com/ClickHouse/ClickHouse/pull/77305) ([wxybear](https://github.com/wxybear)).
* 修复了 Bool 值分区名称的问题。该问题由 [https://github.com/ClickHouse/ClickHouse/pull/74533](https://github.com/ClickHouse/ClickHouse/pull/74533) 引入。[#77319](https://github.com/ClickHouse/ClickHouse/pull/77319) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了包含 Nullable 元素的 Tuple 与 String 之间的比较问题。例如，在此更改之前，比较 Tuple `(1, null)` 与 String `'(1,null)'` 会报错。另一个例子是比较 Tuple `(1, a)` 与 String `'(1, 2)'`，其中 `a` 是 Nullable 列。此更改解决了这些问题。[#77323](https://github.com/ClickHouse/ClickHouse/pull/77323) ([Alexey Katsman](https://github.com/alexkats)).
* 修复了 ObjectStorageQueueSource 中的崩溃问题。该问题由 [https://github.com/ClickHouse/ClickHouse/pull/76358](https://github.com/ClickHouse/ClickHouse/pull/76358) 引入。[#77325](https://github.com/ClickHouse/ClickHouse/pull/77325) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `async_insert` 与 `input` 一起使用时的问题。[#77340](https://github.com/ClickHouse/ClickHouse/pull/77340) ([Azat Khuzhin](https://github.com/azat)).
* 修复：当排序列被规划器移除时，`WITH FILL` 可能因 NOT\_FOUND\_COLUMN\_IN\_BLOCK 而失败。类似问题也与为 INTERPOLATE 表达式计算出的 DAG 不一致有关。[#77343](https://github.com/ClickHouse/ClickHouse/pull/77343) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了多个与为无效 AST 节点设置别名相关的 LOGICAL\_ERROR。 [#77445](https://github.com/ClickHouse/ClickHouse/pull/77445) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了文件系统缓存实现中 File 段写入期间的错误处理问题。[#77471](https://github.com/ClickHouse/ClickHouse/pull/77471) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 使 DatabaseIceberg 使用由 catalog 提供的正确元数据文件。关闭 [#75187](https://github.com/ClickHouse/ClickHouse/issues/75187)。[#77486](https://github.com/ClickHouse/ClickHouse/pull/77486) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 查询缓存现将 UDFs 视为非确定性函数。因此，包含 UDFs 的查询结果不再缓存。此前，用户可以定义非确定性的 UDFs，其结果会被错误地缓存 (问题 [#77553](https://github.com/ClickHouse/ClickHouse/issues/77553)) 。[#77633](https://github.com/ClickHouse/ClickHouse/pull/77633) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复 system.filesystem\_cache\_log 仅在启用 `enable_filesystem_cache_log` 设置时才生效的问题。[#77650](https://github.com/ClickHouse/ClickHouse/pull/77650) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在投影中调用 `defaultRoles` 函数时的逻辑错误。这是对 [#76627](https://github.com/ClickHouse/ClickHouse/issues/76627) 的后续修复。[#77667](https://github.com/ClickHouse/ClickHouse/pull/77667) ([pufit](https://github.com/pufit)) 。
* 现在已禁止在函数 `arrayResize` 中使用类型为 `Nullable` 的第二个参数。此前，若将 `Nullable` 用作第二个参数，可能会导致从 error 到结果错误在内的各种问题。 (问题 [#48398](https://github.com/ClickHouse/ClickHouse/issues/48398)) 。[#77724](https://github.com/ClickHouse/ClickHouse/pull/77724) ([Manish Gill](https://github.com/mgill25)) 。
* 即使操作没有生成任何待写入的块，也会定期检查合并和变更是否已被取消。[#77766](https://github.com/ClickHouse/ClickHouse/pull/77766) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).

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

* `clickhouse-odbc-bridge` 和 `clickhouse-library-bridge` 已移至单独的代码仓库：[https://github.com/ClickHouse/odbc-bridge/。\[#76225](https://github.com/ClickHouse/odbc-bridge/。\[#76225)]\([https://github.com/ClickHouse/ClickHouse/pull/76225](https://github.com/ClickHouse/ClickHouse/pull/76225)) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 Rust 交叉编译问题，并支持完全禁用 Rust。[#76921](https://github.com/ClickHouse/ClickHouse/pull/76921) ([Raúl Marín](https://github.com/Algunenano)) 。

<div id="252">
  ### ClickHouse 发行版 25.2，2025-02-27
</div>

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

* 默认完全启用 `async_load_databases` (即使对于那些未升级 `config.xml` 的安装也是如此) 。[#74772](https://github.com/ClickHouse/ClickHouse/pull/74772) ([Azat Khuzhin](https://github.com/azat)).
* 新增 `JSONCompactEachRowWithProgress` 和 `JSONCompactStringsEachRowWithProgress` 格式。这是 [#69989](https://github.com/ClickHouse/ClickHouse/issues/69989) 的延续。`JSONCompactWithNames` 和 `JSONCompactWithNamesAndTypes` 不再输出 "totals"——显然这是实现中的一个错误。[#75037](https://github.com/ClickHouse/ClickHouse/pull/75037) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 `format_alter_operations_with_parentheses` 的默认值改为 true，以消除 ALTER 命令列表的歧义 (参见 [https://github.com/ClickHouse/ClickHouse/pull/59532](https://github.com/ClickHouse/ClickHouse/pull/59532)) 。这会破坏与 24.3 之前集群的复制兼容性。如果你要升级使用旧版本的集群，请在服务器配置中关闭该设置，或先升级到 24.3。[#75302](https://github.com/ClickHouse/ClickHouse/pull/75302) ([Raúl Marín](https://github.com/Algunenano)).
* 移除了使用正则表达式过滤日志消息的功能。该实现引入了数据竞争，因此必须移除。[#75577](https://github.com/ClickHouse/ClickHouse/pull/75577) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 设置 `min_chunk_bytes_for_parallel_parsing` 现在不能再为零。这修复了：[ #71110](https://github.com/ClickHouse/ClickHouse/issues/71110)。[#75239](https://github.com/ClickHouse/ClickHouse/pull/75239) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 在缓存配置中校验设置。此前，不存在的设置会被忽略；现在会抛出错误，因此应将其移除。[#75452](https://github.com/ClickHouse/ClickHouse/pull/75452) ([Kseniia Sumarokova](https://github.com/kssenii)).

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

* 支持 `Nullable(JSON)` 类型。[#73556](https://github.com/ClickHouse/ClickHouse/pull/73556) ([Pavel Kruglov](https://github.com/Avogar)).
* 支持在 DEFAULT 和 MATERIALIZED 表达式中使用子列。[#74403](https://github.com/ClickHouse/ClickHouse/pull/74403) ([Pavel Kruglov](https://github.com/Avogar)).
* 支持使用 `output_format_parquet_write_bloom_filter` 设置写入 Parquet 布隆过滤器 (默认启用) 。[#71681](https://github.com/ClickHouse/ClickHouse/pull/71681) ([Michael Kolupaev](https://github.com/al13n321)).
* Web UI 现已支持交互式数据库导航。[#75777](https://github.com/ClickHouse/ClickHouse/pull/75777) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 允许在存储策略中混用只读和读写磁盘 (可作为多个卷或多个磁盘) 。这样可以从整个卷读取数据，同时插入操作会优先选择可写磁盘 (即 Copy-on-Write 存储策略) 。[#75862](https://github.com/ClickHouse/ClickHouse/pull/75862) ([Azat Khuzhin](https://github.com/azat)).
* 新增数据库引擎 `DatabaseBackup,`，支持从备份中即时附加表/数据库。[#75725](https://github.com/ClickHouse/ClickHouse/pull/75725) ([Maksim Kita](https://github.com/kitaisreal)).
* 在 Postgres 线协议中支持预处理语句。[#75035](https://github.com/ClickHouse/ClickHouse/pull/75035) ([scanhex12](https://github.com/scanhex12)).
* 新增无需数据库层即可 ATTACH 表的能力，这对于位于 Web、S3 及类似外部虚拟文件系统上的 MergeTree 表很有用。[#75788](https://github.com/ClickHouse/ClickHouse/pull/75788) ([Azat Khuzhin](https://github.com/azat)).
* 新增字符串比较函数 `compareSubstrings`，用于比较两个字符串的部分内容。示例：`SELECT compareSubstrings('Saxony', 'Anglo-Saxon', 0, 6, 5) AS result` 表示“从第一个字符串的偏移 0 和第二个字符串的偏移 5 开始，按字典序比较字符串 'Saxon' 和 'Anglo-Saxon' 的 6 个字节”。[#74070](https://github.com/ClickHouse/ClickHouse/pull/74070) ([lgbo](https://github.com/lgbo-ustc)).
* 新增函数 `initialQueryStartTime`。它返回当前查询的开始时间。在分布式查询期间，该值在所有分片上都相同。[#75087](https://github.com/ClickHouse/ClickHouse/pull/75087) ([Roman Lomonosov](https://github.com/lomik)).
* 为 MySQL 新增了结合命名集合使用 SSL 身份验证的支持。关闭 [#59111](https://github.com/ClickHouse/ClickHouse/issues/59111)。[#59452](https://github.com/ClickHouse/ClickHouse/pull/59452) ([Nikolay Degterinsky](https://github.com/evillique)).

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

* 新增设置 `enable_adaptive_memory_spill_scheduler`，允许同一查询中的多个 Grace JOIN 监控其合计内存占用，并自适应地将数据落盘到外部存储，以防止出现 MEMORY\_LIMIT\_EXCEEDED。 [#72728](https://github.com/ClickHouse/ClickHouse/pull/72728) ([lgbo](https://github.com/lgbo-ustc)).
* 使新的 Experimental `Kafka` 表引擎完全遵循 Keeper 的功能开关。 [#76004](https://github.com/ClickHouse/ClickHouse/pull/76004) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 恢复了 (Intel) QPL 编解码器；该编解码器因许可问题已在 v24.10 中移除。 [#76021](https://github.com/ClickHouse/ClickHouse/pull/76021) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 为 HDFS 集成新增了对 `dfs.client.use.datanode.hostname` 配置选项的支持。 [#74635](https://github.com/ClickHouse/ClickHouse/pull/74635) ([Mikhail Tiukavkin](https://github.com/freshertm)).

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

* 提升了从 S3 上的 Wide parts 读取整个 JSON 列的性能。具体做法包括：为子列前缀反序列化添加预取、缓存已反序列化的前缀，以及并行反序列化子列前缀。这使得在 `SELECT data FROM table` 这类查询中，从 S3 读取 JSON 列的速度提升约 4 倍；在 `SELECT data FROM table LIMIT 10` 这类查询中，提升约 10 倍。[#74827](https://github.com/ClickHouse/ClickHouse/pull/74827) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了当 `max_rows_in_join = max_bytes_in_join = 0` 时，`parallel_hash` 中不必要的竞争问题。[#75155](https://github.com/ClickHouse/ClickHouse/pull/75155) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了在优化器交换 join 两侧时，`ConcurrentHashJoin` 中重复预分配的问题。[#75149](https://github.com/ClickHouse/ClickHouse/pull/75149) ([Nikita Taranov](https://github.com/nickitat)).
* 在某些 join 场景下略微提升了性能：预先计算输出行数并为其预留内存。[#75376](https://github.com/ClickHouse/ClickHouse/pull/75376) ([Alexander Gololobov](https://github.com/davenger)).
* 对于 `WHERE a < b AND b < c AND c < 5` 这类查询，现在可以推导出新的比较条件 (`a < 5 AND b < 5`) ，从而提升过滤效果。[#73164](https://github.com/ClickHouse/ClickHouse/pull/73164) ([Shichao Jin](https://github.com/jsc0218)).
* Keeper 改进：为提升性能，在提交到内存存储时禁用 digest 计算。可通过 `keeper_server.digest_enabled_on_commit` 配置启用。预处理请求时仍会计算 digest。[#75490](https://github.com/ClickHouse/ClickHouse/pull/75490) ([Antonio Andelic](https://github.com/antonio2368)).
* 在可能的情况下，将过滤表达式从 JOIN ON 下推。[#75536](https://github.com/ClickHouse/ClickHouse/pull/75536) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 在 MergeTree 中延迟计算列和索引大小。[#75938](https://github.com/ClickHouse/ClickHouse/pull/75938) ([Pavel Kruglov](https://github.com/Avogar)).
* 在 `MATERIALIZE TTL` 中重新恢复对 `ttl_only_drop_parts` 的遵循；仅读取重新计算 TTL 所需的列，并通过将 parts 替换为空 parts 来删除它们。[#72751](https://github.com/ClickHouse/ClickHouse/pull/72751) ([Andrey Zvonov](https://github.com/zvonand)).
* 减小 plain\_rewritable 元数据文件的写入缓冲区大小。[#75758](https://github.com/ClickHouse/ClickHouse/pull/75758) ([Julia Kartseva](https://github.com/jkartseva)).
* 降低某些窗口函数的内存使用量。[#65647](https://github.com/ClickHouse/ClickHouse/pull/65647) ([lgbo](https://github.com/lgbo-ustc)).
* 同时评估 Parquet 布隆过滤器和最小/最大索引。这对于正确支持 `x = 3 or x > 5` (其中 data = \[1, 2, 4, 5]) 是必要的。[#71383](https://github.com/ClickHouse/ClickHouse/pull/71383) ([Arthur Passos](https://github.com/arthurpassos)).
* 传递给 `Executable` storage 的查询不再局限于单线程执行。[#70084](https://github.com/ClickHouse/ClickHouse/pull/70084) ([yawnt](https://github.com/yawnt)).
* 在 ALTER TABLE FETCH PARTITION 中并行拉取 parts (线程池大小由 `max_fetch_partition_thread_pool_size` 控制) 。[#74978](https://github.com/ClickHouse/ClickHouse/pull/74978) ([Azat Khuzhin](https://github.com/azat)).
* 允许将带有 `indexHint` 函数的谓词下推到 `PREWHERE`。[#74987](https://github.com/ClickHouse/ClickHouse/pull/74987) ([Anton Popov](https://github.com/CurtizJ)).

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

* 修复了 `LowCardinality` 列内存占用大小的计算问题。[#74688](https://github.com/ClickHouse/ClickHouse/pull/74688) ([Nikita Taranov](https://github.com/nickitat)) 。
* `processors_profile_log` 表现已采用默认配置，生存时间 (TTL) 为 30 天。[#66139](https://github.com/ClickHouse/ClickHouse/pull/66139) ([Ilya Yatsishin](https://github.com/qoega)).
* 支持在集群配置中为分片命名。[#72276](https://github.com/ClickHouse/ClickHouse/pull/72276) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 将 Prometheus remote write 响应的成功状态码从 200/OK 改为 204/NoContent。[#74170](https://github.com/ClickHouse/ClickHouse/pull/74170) ([Michael Dempsey](https://github.com/bluestealth)) 。
* 新增支持无需重启 server 即可动态重新加载 `max_remote_read_network_bandwidth_for_serve` 和 `max_remote_write_network_bandwidth_for_server`。[#74206](https://github.com/ClickHouse/ClickHouse/pull/74206) ([Kai Zhu](https://github.com/nauu)) 。
* 允许在创建备份时使用 blob 路径计算校验和。[#74729](https://github.com/ClickHouse/ClickHouse/pull/74729) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 为 `system.query_cache` 新增了一个查询 ID 列 (关闭 [#68205](https://github.com/ClickHouse/ClickHouse/issues/68205)) 。[#74982](https://github.com/ClickHouse/ClickHouse/pull/74982) ([NamHoaiNguyen](https://github.com/NamHoaiNguyen)) 。
* 现在支持使用 `KILL QUERY` 取消 `ALTER TABLE ... FREEZE ...` 查询，也支持在超时 (`max_execution_time`) 后自动取消。 [#75016](https://github.com/ClickHouse/ClickHouse/pull/75016) ([Kirill](https://github.com/kirillgarbar)).
* 新增了对将 `groupUniqArrayArrayMap` 用作 `SimpleAggregateFunction` 的支持。[#75034](https://github.com/ClickHouse/ClickHouse/pull/75034) ([Miel Donkers](https://github.com/mdonkers)) 。
* 在数据库引擎 `Iceberg` 中隐藏 catalog 凭据相关设置。已关闭 [#74559](https://github.com/ClickHouse/ClickHouse/issues/74559)。[#75080](https://github.com/ClickHouse/ClickHouse/pull/75080) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* `intExp2` / `intExp10`：明确了未定义行为：参数过小时返回 0，参数过大时返回 `18446744073709551615`，若为 `nan` 则抛出异常。[#75312](https://github.com/ClickHouse/ClickHouse/pull/75312) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在 `DatabaseIceberg` 中原生支持从 catalog 配置获取 `s3.endpoint`。解决了 [#74558](https://github.com/ClickHouse/ClickHouse/issues/74558)。[#75375](https://github.com/ClickHouse/ClickHouse/pull/75375) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 如果执行 `SYSTEM DROP REPLICA` 的用户权限不足，不要静默失败。[#75377](https://github.com/ClickHouse/ClickHouse/pull/75377) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 新增一个用于统计任一系统日志刷盘失败次数的 ProfileEvent。[#75466](https://github.com/ClickHouse/ClickHouse/pull/75466) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 增加了解密和解压时的检查及额外日志。[#75471](https://github.com/ClickHouse/ClickHouse/pull/75471) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在 `parseTimeDelta` 函数中新增了对微符号 (U+00B5) 的支持。现在，微符号 (U+00B5) 和希腊字母 μ (U+03BC) 都可被识别为微秒的有效表示，从而使 ClickHouse 的行为与 Go 的实现保持一致 ([参见 time.go](https://github.com/golang/go/blob/ad7b46ee4ac1cee5095d64b01e8cf7fcda8bee5e/src/time/time.go#L983C19-L983C20) 和 [time/format.go](https://github.com/golang/go/blob/ad7b46ee4ac1cee5095d64b01e8cf7fcda8bee5e/src/time/format.go#L1608-L1609)) 。[#75472](https://github.com/ClickHouse/ClickHouse/pull/75472) ([Vitaly Orlov](https://github.com/orloffv)) 。
* 将服务端设置 (`send_settings_to_client`) 替换为客户端设置 (`apply_settings_from_server`) 。该设置用于控制客户端代码 (例如解析 INSERT 数据和格式化查询输出) 是否使用 server 的 `users.xml` 和用户 profile 中的设置。否则，只会使用来自客户端命令行、session 和查询的设置。请注意，这仅适用于原生客户端 (不适用于 HTTP 等接口) ，且不影响查询处理的大部分环节 (这些发生在 server 端) 。[#75478](https://github.com/ClickHouse/ClickHouse/pull/75478) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 改进了语法错误的报错信息。此前，如果查询过大，而长度超出限制的标记恰好是一个很长的字符串字面量，那么用于说明原因的消息就会淹没在这个超长标记的两个示例之间。修复了包含 UTF-8 的查询在报错信息中被错误截断的问题。修复了查询片段被过度加引号的问题。此更改关闭了 [#75473](https://github.com/ClickHouse/ClickHouse/issues/75473)。[#75561](https://github.com/ClickHouse/ClickHouse/pull/75561) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为存储 `S3(Azure)Queue` 添加 profile events。[#75618](https://github.com/ClickHouse/ClickHouse/pull/75618) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为确保兼容性，禁用从服务器向客户端发送设置 (`send_settings_to_client=false`)  (此功能稍后将以客户端设置的形式重新实现，以提升易用性) 。[#75648](https://github.com/ClickHouse/ClickHouse/pull/75648) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 新增配置 `memory_worker_correct_memory_tracker`，用于根据后台线程定期读取的来自不同来源的信息，对内部 memory tracker 进行校正。[#75714](https://github.com/ClickHouse/ClickHouse/pull/75714) ([Antonio Andelic](https://github.com/antonio2368)).
* 在 `system.processes` 中新增列 `normalized_query_hash`。注意：虽然可通过 `normalizedQueryHash` 函数轻松实时计算，但此项改动是为后续变更做准备所必需的。[#75756](https://github.com/ClickHouse/ClickHouse/pull/75756) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 查询 `system.tables` 时，即使存在一个基于已不存在数据库创建的 `Merge` 表，也不会抛出异常。由于我们不允许 `Hive` 表中的 `getTotalRows` 方法执行复杂操作，因此将其移除。[#75772](https://github.com/ClickHouse/ClickHouse/pull/75772) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 以微秒精度存储备份的 start\_time/end\_time。[#75929](https://github.com/ClickHouse/ClickHouse/pull/75929) ([Aleksandr Musorin](https://github.com/AVMusorin)) 。
* 新增 `MemoryTrackingUncorrected` 指标，用于显示内部全局内存跟踪器的值，且该值未经过 RSS 修正。[#75935](https://github.com/ClickHouse/ClickHouse/pull/75935) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 允许在 `PostgreSQL` 或 `MySQL` 表函数中解析类似 `localhost:1234/handle` 的端点地址。这修复了在 [https://github.com/ClickHouse/ClickHouse/pull/52503](https://github.com/ClickHouse/ClickHouse/pull/52503) 中引入的一个回归问题。[#75944](https://github.com/ClickHouse/ClickHouse/pull/75944) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 新增了一个服务器设置 `throw_on_unknown_workload`，用于选择当查询中的 `workload` 设置为未知值时的处理方式：可以允许无限制访问 (默认) ，也可以抛出 `RESOURCE_ACCESS_DENIED` 错误。这有助于强制所有查询都使用工作负载调度。[#75999](https://github.com/ClickHouse/ClickHouse/pull/75999) ([Sergei Trifonov](https://github.com/serxa)).
* 如果没有必要，不要在 `ARRAY JOIN` 中把子列重写为 `getSubcolumn`。[#76018](https://github.com/ClickHouse/ClickHouse/pull/76018) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 加载表时遇到协调错误会进行重试。[#76020](https://github.com/ClickHouse/ClickHouse/pull/76020) ([Alexander Tokmakov](https://github.com/tavplubix)).
* 支持在 `SYSTEM FLUSH LOGS` 中单独刷新某个日志。[#76132](https://github.com/ClickHouse/ClickHouse/pull/76132) ([Raúl Marín](https://github.com/Algunenano)).
* 改进了 `/binary` server 的页面。使用 Hilbert 曲线代替 Morton 曲线。在方块中显示 512 MB 的地址空间，这样能把方块填得更满 (在之前的版本中，地址只能填满方块的一半) 。地址着色更接近库名而不是函数名。允许在该区域外再多滚动一些。[#76192](https://github.com/ClickHouse/ClickHouse/pull/76192) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 当出现 TOO\_MANY\_SIMULTANEOUS\_QUERIES 时，重试 ON CLUSTER 查询。[#76352](https://github.com/ClickHouse/ClickHouse/pull/76352) ([Patrick Galbraith](https://github.com/CaptTofu)) 。
* 新增 `CPUOverload` 异步指标，用于计算服务器的相对 CPU 不足程度。[#76404](https://github.com/ClickHouse/ClickHouse/pull/76404) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 `output_format_pretty_max_rows` 的默认值从 10000 调整为 1000。我认为这样在易用性方面更好。[#76407](https://github.com/ClickHouse/ClickHouse/pull/76407) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### 缺陷修复 (官方稳定版本中用户可见的问题)

* 修复了一个问题：如果在查询解析期间出现异常，会改用自定义格式进行格式化。在之前的版本中，异常会使用默认格式进行格式化，而不是查询中指定的格式。此修复关闭了 [#55422](https://github.com/ClickHouse/ClickHouse/issues/55422)。[#74994](https://github.com/ClickHouse/ClickHouse/pull/74994) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 SQLite 的类型映射：整数类型映射为 `int64`，浮点类型映射为 `float64`。[#73853](https://github.com/ClickHouse/ClickHouse/pull/73853) ([Joanna Hulboj](https://github.com/jh0x)).
* 修复父作用域中的标识符解析。允许在 WITH 子句中使用表达式别名。修复了 [#58994](https://github.com/ClickHouse/ClickHouse/issues/58994)。修复了 [#62946](https://github.com/ClickHouse/ClickHouse/issues/62946)。修复了 [#63239](https://github.com/ClickHouse/ClickHouse/issues/63239)。修复了 [#65233](https://github.com/ClickHouse/ClickHouse/issues/65233)。修复了 [#71659](https://github.com/ClickHouse/ClickHouse/issues/71659)。修复了 [#71828](https://github.com/ClickHouse/ClickHouse/issues/71828)。修复了 [#68749](https://github.com/ClickHouse/ClickHouse/issues/68749)。[#66143](https://github.com/ClickHouse/ClickHouse/pull/66143) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复 `negate` 函数的单调性。在之前的版本中，对于查询 `select * from a where -x = -42;`，当 `x` 为主键时，可能会返回错误结果。[#71440](https://github.com/ClickHouse/ClickHouse/pull/71440) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了 arrayIntersect 对空元组的处理问题。此修复解决了 [#72578](https://github.com/ClickHouse/ClickHouse/issues/72578)。[#72581](https://github.com/ClickHouse/ClickHouse/pull/72581) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了在前缀错误时读取 JSON 子对象的子列的问题。[#73182](https://github.com/ClickHouse/ClickHouse/pull/73182) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 为客户端与服务器之间的通信正确传递 Native format 设置。[#73924](https://github.com/ClickHouse/ClickHouse/pull/73924) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 增加了对某些存储中不受支持类型的检查。 [#74218](https://github.com/ClickHouse/ClickHouse/pull/74218) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 macOS 上通过 PostgreSQL 接口执行 `INSERT INTO SELECT` 查询时发生的崩溃 (问题 [#72938](https://github.com/ClickHouse/ClickHouse/issues/72938)) 。[#74231](https://github.com/ClickHouse/ClickHouse/pull/74231) ([Artem Yurov](https://github.com/ArtemYurov)) 。
* 修复了 Replicated 数据库中未初始化的 max\_log\_ptr。[#74336](https://github.com/ClickHouse/ClickHouse/pull/74336) ([Konstantin Morozov](https://github.com/k-morozov)) 。
* 修复插入时间间隔时崩溃的问题 (问题 [#74299](https://github.com/ClickHouse/ClickHouse/issues/74299)) 。[#74478](https://github.com/ClickHouse/ClickHouse/pull/74478) ([NamHoaiNguyen](https://github.com/NamHoaiNguyen)) 。
* 修复常量 JSON 字面量的格式化问题。此前，这可能会在将查询发送到另一台服务器时导致语法错误。[#74533](https://github.com/ClickHouse/ClickHouse/pull/74533) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在启用隐式 projections 时，使用常量分区表达式导致 Create Query 损坏的问题。此修复解决了 [#74596](https://github.com/ClickHouse/ClickHouse/issues/74596)。[#74634](https://github.com/ClickHouse/ClickHouse/pull/74634) ([Amos Bird](https://github.com/amosbird)).
* 避免在 INSERT 因异常结束后让连接处于异常状态。[#74740](https://github.com/ClickHouse/ClickHouse/pull/74740) ([Azat Khuzhin](https://github.com/azat)) 。
* 避免复用曾处于中间状态的连接。[#74749](https://github.com/ClickHouse/ClickHouse/pull/74749) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在 type name 不是大写时解析 JSON type 声明会崩溃的问题。[#74784](https://github.com/ClickHouse/ClickHouse/pull/74784) ([Pavel Kruglov](https://github.com/Avogar)) 。
* Keeper：修复了连接在建立前就已终止时出现 logical\_error 的问题。[#74844](https://github.com/ClickHouse/ClickHouse/pull/74844) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了这样一种问题：当存在使用 `AzureBlobStorage` 的表时，服务器无法启动。现在加载表时无需向 Azure 发起任何请求。[#74880](https://github.com/ClickHouse/ClickHouse/pull/74880) ([Alexey Katsman](https://github.com/alexkats)) 。
* 修复了 BACKUP 和 RESTORE 操作的 `query_log` 中缺失 `used_privileges` 和 `missing_privileges` 字段的问题。[#74887](https://github.com/ClickHouse/ClickHouse/pull/74887) ([Alexey Katsman](https://github.com/alexkats)) 。
* 如果在执行 HDFS SELECT 请求时发生 SASL 错误，则刷新 HDFS 的 krb 票据。[#74930](https://github.com/ClickHouse/ClickHouse/pull/74930) ([inv2004](https://github.com/inv2004)).
* 修复 startup\_scripts 中针对 Replicated database 的查询问题。[#74942](https://github.com/ClickHouse/ClickHouse/pull/74942) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在使用 NULL 安全比较时，JOIN ON 子句中表达式类型被设为别名时出现的问题。[#74970](https://github.com/ClickHouse/ClickHouse/pull/74970) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 当 remove 操作失败时，将分片的状态从 deleting 改回过期。[#74985](https://github.com/ClickHouse/ClickHouse/pull/74985) ([Sema Checherinda](https://github.com/CheSema)) 。
* 在早期版本中，当存在标量子查询时，我们会在数据格式初始化期间开始写入进度信息 (这是在处理子查询时累积的) ，而此时 HTTP 请求头尚未写出。这会导致 HTTP 请求头丢失，例如 X-ClickHouse-QueryId、X-ClickHouse-Format 以及 Content-Type。 [#74991](https://github.com/ClickHouse/ClickHouse/pull/74991) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在 `database_replicated_allow_replicated_engine_arguments=0` 时 `CREATE TABLE AS...` 查询的问题。[#75000](https://github.com/ClickHouse/ClickHouse/pull/75000) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了客户端在发生 INSERT 异常后连接状态异常的问题。[#75030](https://github.com/ClickHouse/ClickHouse/pull/75030) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 PSQL 复制过程中因未捕获异常导致的崩溃。[#75062](https://github.com/ClickHouse/ClickHouse/pull/75062) ([Azat Khuzhin](https://github.com/azat)) 。
* Sasl 可能导致任何 RPC 调用失败；此修复可在 krb5 ticket 过期时重试该调用。 [#75063](https://github.com/ClickHouse/ClickHouse/pull/75063) ([inv2004](https://github.com/inv2004)).
* 修复了在启用设置 `optimize_function_to_subcolumns` 时，`Array`、`Map` 和 `Nullable(..)` 列对索引 (主索引和二级索引) 的使用问题。此前，这些列上的索引可能会被忽略。[#75081](https://github.com/ClickHouse/ClickHouse/pull/75081) ([Anton Popov](https://github.com/CurtizJ)).
* 使用内部表创建 materialized views 时，请禁用 `flatten_nested`，否则将无法使用这类扁平化列。[#75085](https://github.com/ClickHouse/ClickHouse/pull/75085) ([Christoph Wurm](https://github.com/cwurm)) 。
* 修复了 forwarded\_for 字段中的某些 IPv6 地址 (如 ::ffff:1.1.1.1) 被错误解释，进而因异常导致客户端断开连接的问题。[#75133](https://github.com/ClickHouse/ClickHouse/pull/75133) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了 LowCardinality Nullable 数据类型的 nullsafe JOIN 处理问题。此前，在使用 nullsafe 比较的 JOIN ON 中，例如 `IS NOT DISTINCT FROM`、`<=>`、`a IS NULL AND b IS NULL OR a == b`，LowCardinality 列无法被正确处理。[#75143](https://github.com/ClickHouse/ClickHouse/pull/75143) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 检查在为 NumRowsCache 统计 total\_number\_of\_rows 时不会指定 key\_condition。[#75164](https://github.com/ClickHouse/ClickHouse/pull/75164) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了新 analyzer 中查询包含未使用插值时的问题。[#75173](https://github.com/ClickHouse/ClickHouse/pull/75173) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复 CTE 与 Insert 配合使用时的崩溃问题。[#75188](https://github.com/ClickHouse/ClickHouse/pull/75188) ([Shichao Jin](https://github.com/jsc0218)) 。
* Keeper 修复：在回滚日志时，避免向已损坏的更新日志中写入内容。[#75197](https://github.com/ClickHouse/ClickHouse/pull/75197) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在适当情况下将 `BFloat16` 用作超类型。已关闭：[#74404](https://github.com/ClickHouse/ClickHouse/issues/74404)。[#75236](https://github.com/ClickHouse/ClickHouse/pull/75236) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了在 JOIN ON 中使用 any\_join\_distinct\_right\_table\_keys 和 OR 时，JOIN 结果中出现意外的默认值的问题。[#75262](https://github.com/ClickHouse/ClickHouse/pull/75262) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 对 azureblobstorage 表引擎的凭据进行脱敏处理。[#75319](https://github.com/ClickHouse/ClickHouse/pull/75319) ([Garrett Thomas](https://github.com/garrettthomaskth)).
* 修复了 ClickHouse 可能会将过滤器错误地下推到 PostgreSQL、MySQL 或 SQLite 等外部数据库的问题。此修复关闭了：[#71423](https://github.com/ClickHouse/ClickHouse/issues/71423)。[#75320](https://github.com/ClickHouse/ClickHouse/pull/75320) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了 protobuf schema 缓存在以 Protobuf format 输出并并行执行查询 `SYSTEM DROP FORMAT SCHEMA CACHE` 时可能发生的崩溃。[#75357](https://github.com/ClickHouse/ClickHouse/pull/75357) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在并行副本场景下将 `HAVING` 中的过滤器下推时，可能出现的逻辑错误或未初始化内存问题。[#75363](https://github.com/ClickHouse/ClickHouse/pull/75363) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 对 `icebergS3`、`icebergAzure` 表函数和表引擎中的敏感信息进行隐藏。[#75378](https://github.com/ClickHouse/ClickHouse/pull/75378) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 函数 `TRIM` 现在可以正确处理计算得到的空白修剪字符。例如：`SELECT TRIM(LEADING concat('') FROM 'foo')` (问题 [#69922](https://github.com/ClickHouse/ClickHouse/issues/69922)) 。[#75399](https://github.com/ClickHouse/ClickHouse/pull/75399) ([Manish Gill](https://github.com/mgill25)) 。
* 修复 IOutputFormat 中的数据竞争问题。[#75448](https://github.com/ClickHouse/ClickHouse/pull/75448) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在分布式表上执行 JOIN 时使用 Array 类型的 JSON 子列可能触发的错误 `Elements ... and ... of Nested data structure ... (Array columns) have different array sizes`。[#75512](https://github.com/ClickHouse/ClickHouse/pull/75512) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 `CODEC(ZSTD, DoubleDelta)` 引起的数据损坏问题。关闭 [#70031](https://github.com/ClickHouse/ClickHouse/issues/70031)。[#75548](https://github.com/ClickHouse/ClickHouse/pull/75548) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复 allow\_feature\_tier 与兼容性 MergeTree 设置之间的交互问题。 [#75635](https://github.com/ClickHouse/ClickHouse/pull/75635) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在文件重试情况下 system.s3queue\_log 中 processed\_rows 值不正确的问题。[#75666](https://github.com/ClickHouse/ClickHouse/pull/75666) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 当 materialized view 向 URL engine 写入数据且发生连接问题时，会遵循 `materialized_views_ignore_errors` 设置。[#75679](https://github.com/ClickHouse/ClickHouse/pull/75679) ([Christoph Wurm](https://github.com/cwurm)) 。
* 修复了一个罕见的崩溃问题：在不同类型的列之间多次执行异步 `RENAME` 查询 (使用 `alter_sync = 0`) 后，从 `MergeTree` 表读取数据时可能会崩溃。[#75693](https://github.com/ClickHouse/ClickHouse/pull/75693) ([Anton Popov](https://github.com/CurtizJ)).
* 修复某些使用 `UNION ALL` 的查询中的 `Block structure mismatch in QueryPipeline stream` 错误。[#75715](https://github.com/ClickHouse/ClickHouse/pull/75715) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 在对其 PK 列执行 alter modify 时，会重建 PROJECTION。此前，对用作 PROJECTION PK 的列执行 alter modify 后，查询时可能会出现 `CANNOT_READ_ALL_DATA` 错误。[#75720](https://github.com/ClickHouse/ClickHouse/pull/75720) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `ARRAY JOIN` 在标量子查询 (使用 analyzer) 上的错误结果问题。[#75732](https://github.com/ClickHouse/ClickHouse/pull/75732) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了 `DistinctSortedStreamTransform` 中空指针解引用的问题。[#75734](https://github.com/ClickHouse/ClickHouse/pull/75734) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复 `allow_suspicious_ttl_expressions` 行为异常。[#75771](https://github.com/ClickHouse/ClickHouse/pull/75771) ([Aleksei Filatov](https://github.com/aalexfvk)) 。
* 修复了函数 `translate` 中读取未初始化内存的问题。此修复关闭了 [#75592](https://github.com/ClickHouse/ClickHouse/issues/75592)。[#75794](https://github.com/ClickHouse/ClickHouse/pull/75794) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将格式设置传递到 Native format 中的 JSON 字符串格式化。[#75832](https://github.com/ClickHouse/ClickHouse/pull/75832) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在设置变更历史中补充记录：自 v24.12 起，默认启用 parallel hash 作为 JOIN 算法。这意味着，如果配置的兼容性级别早于 v24.12，ClickHouse 将继续使用非并行哈希进行 JOIN。 [#75870](https://github.com/ClickHouse/ClickHouse/pull/75870) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了一个错误：带有隐式添加的 min-max 索引的表无法复制到新表 (问题 [#75677](https://github.com/ClickHouse/ClickHouse/issues/75677)) 。[#75877](https://github.com/ClickHouse/ClickHouse/pull/75877) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* `clickhouse-library-bridge` 允许从文件系统中打开任意库，因此只有在隔离环境中运行才是安全的。为防止它在 clickhouse-server 附近运行时产生漏洞，我们会将库的路径限制在配置中指定的位置。此漏洞由 **Arseniy Dugin** 通过 [ClickHouse Bug Bounty Program](https://github.com/ClickHouse/ClickHouse/issues/38986) 发现。[#75954](https://github.com/ClickHouse/ClickHouse/pull/75954) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 我们曾对部分元数据使用 JSON 序列化，这是个错误，因为 JSON 不支持字符串字面量中的二进制数据，包括零字节。SQL 查询可能包含二进制数据和无效的 UTF-8，因此元数据文件也必须支持这一点。与此同时，ClickHouse 的 `JSONEachRow` 及类似格式通过偏离 JSON 标准来绕过这个问题，以确保二进制数据能够无损往返。其背后的原因见：[https://github.com/ClickHouse/ClickHouse/pull/73668#issuecomment-2560501790。解决方案是让](https://github.com/ClickHouse/ClickHouse/pull/73668#issuecomment-2560501790。解决方案是让) `Poco::JSON` 库与 ClickHouse 中 JSON 格式的序列化保持一致。此更改修复了 [#73668](https://github.com/ClickHouse/ClickHouse/issues/73668)。[#75963](https://github.com/ClickHouse/ClickHouse/pull/75963) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了存储 `S3Queue` 中提交限制检查的问题。[#76104](https://github.com/ClickHouse/ClickHouse/pull/76104) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复附加带自动索引 (`add_minmax_index_for_numeric_columns`/`add_minmax_index_for_string_columns`) 的 MergeTree 表时出现的问题。[#76139](https://github.com/ClickHouse/ClickHouse/pull/76139) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了未打印作业父线程的堆栈跟踪 (`enable_job_stack_trace` 设置) 的问题。修复了 `enable_job_stack_trace` 设置未正确传递到线程，导致堆栈跟踪内容并不总是遵循该设置的问题。[#76191](https://github.com/ClickHouse/ClickHouse/pull/76191) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复了错误的权限检查：`ALTER RENAME` 之前被错误要求具备 `CREATE USER` 权限。关闭 [#74372](https://github.com/ClickHouse/ClickHouse/issues/74372)。[#76241](https://github.com/ClickHouse/ClickHouse/pull/76241) ([pufit](https://github.com/pufit)).
* 修复了在大端架构上对 FixedString 使用 reinterpretAs 时出现的问题。[#76253](https://github.com/ClickHouse/ClickHouse/pull/76253) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 S3Queue 中的逻辑错误："预期当前处理器 {} 应与 {} 相等 (存储桶 {}) "。[#76358](https://github.com/ClickHouse/ClickHouse/pull/76358) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了对 Memory 数据库执行 ALTER 时出现的死锁问题。[#76359](https://github.com/ClickHouse/ClickHouse/pull/76359) ([Azat Khuzhin](https://github.com/azat)) 。
* 如果 `WHERE` 条件中包含 `pointInPolygon` 函数，修复索引分析中的逻辑错误。[#76360](https://github.com/ClickHouse/ClickHouse/pull/76360) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复信号处理函数中可能存在的不安全调用。[#76549](https://github.com/ClickHouse/ClickHouse/pull/76549) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复 PartsSplitter 对反向键的支持问题。此修复解决了 [#73400](https://github.com/ClickHouse/ClickHouse/issues/73400)。[#73418](https://github.com/ClickHouse/ClickHouse/pull/73418) ([Amos Bird](https://github.com/amosbird)) 。

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

* 支持在 ARM 和 Intel Mac 上构建 HDFS。 [#74244](https://github.com/ClickHouse/ClickHouse/pull/74244) ([Yan Xin](https://github.com/yxheartipp)).
* 在为 Darwin 进行交叉编译时启用 ICU 和 GRPC。 [#75922](https://github.com/ClickHouse/ClickHouse/pull/75922) ([Raúl Marín](https://github.com/Algunenano)).
* 更新内嵌 LLVM 至 19 版。 [#75148](https://github.com/ClickHouse/ClickHouse/pull/75148) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 在 Docker 镜像中禁用 default 用户的网络访问。 [#75259](https://github.com/ClickHouse/ClickHouse/pull/75259) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). 将所有与 clickhouse-server 相关的操作改为函数，并且仅在 `entrypoint.sh` 中启动默认二进制文件时执行。这个拖延已久的改进最早在 [#50724](https://github.com/ClickHouse/ClickHouse/issues/50724) 中提出。为 `clickhouse-extract-from-config` 新增了 `--users` 开关，用于从 `users.xml` 中获取值。 [#75643](https://github.com/ClickHouse/ClickHouse/pull/75643) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 从二进制文件中移除了约 20MB 的无用代码。 [#76226](https://github.com/ClickHouse/ClickHouse/pull/76226) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

<div id="251">
  ### ClickHouse 发行版 25.1，2025-01-28
</div>

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

* `JSONEachRowWithProgress` 现在会在每次进度更新时写出进度信息。在之前的版本中，只有在结果的每个块之后才会显示进度，因此几乎没有实际作用。进度显示方式也已变更：不再显示零值。这关闭了 [#70800](https://github.com/ClickHouse/ClickHouse/issues/70800)。[#73834](https://github.com/ClickHouse/ClickHouse/pull/73834) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `Merge` 表现在会通过对其列取并集并推导公共类型来统一底层表的结构。这关闭了 [#64864](https://github.com/ClickHouse/ClickHouse/issues/64864)。在某些情况下，此更改可能会导致向后不兼容。例如，表之间没有公共类型，但仍可转换为第一张表的类型时，就会出现这种情况，例如 UInt64 和 Int64，或任意数值类型与 String 的组合。如果你想恢复旧行为，可将 `merge_table_max_tables_to_look_for_schema_inference` 设置为 `1`，或将 `compatibility` 设置为 `24.12` 或更早版本。[#73956](https://github.com/ClickHouse/ClickHouse/pull/73956) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Parquet output format 会将 Date 和 DateTime 列转换为 Parquet 支持的日期/时间类型，而不是将它们写成原始数值。`DateTime` 会变为 `DateTime64(3)` (之前为：`UInt32`) ；设置 `output_format_parquet_datetime_as_uint32` 可恢复旧行为。`Date` 会变为 `Date32` (之前为：`UInt16`) 。[#70950](https://github.com/ClickHouse/ClickHouse/pull/70950) ([Michael Kolupaev](https://github.com/al13n321)).
* 默认情况下，不再允许在 `ORDER BY` 和比较函数 `less/greater/equal/etc` 中使用不可比较的类型 (如 `JSON`/`Object`/`AggregateFunction`) 。[#73276](https://github.com/ClickHouse/ClickHouse/pull/73276) ([Pavel Kruglov](https://github.com/Avogar)).
* 已废弃的 `MaterializedMySQL` 数据库引擎已被移除，不再可用。[#73879](https://github.com/ClickHouse/ClickHouse/pull/73879) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `mysql` 字典源不再执行 `SHOW TABLE STATUS` 查询，因为对于 InnoDB 表以及任何较新的 MySQL 版本，这个查询都不提供任何有价值的信息。这关闭了 [#72636](https://github.com/ClickHouse/ClickHouse/issues/72636)。这一更改本身向后兼容，但仍放在此类别中，以便你能注意到它。[#73914](https://github.com/ClickHouse/ClickHouse/pull/73914) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `CHECK TABLE` 查询现在需要单独的 `CHECK` 权限。在之前的版本中，只要拥有 `SHOW TABLES` 权限就足以运行这些查询。但 `CHECK TABLE` 查询可能开销很大，而且通常适用于 `SELECT` 查询的查询复杂度限制并不适用于它。这会带来潜在的 DoS 风险。[#74471](https://github.com/ClickHouse/ClickHouse/pull/74471) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 函数 `h3ToGeo()` 现在按 `(lat, lon)` 的顺序返回结果 (这是几何函数的标准顺序) 。希望保留旧结果顺序 `(lon, lat)` 的用户，可以将设置 `h3togeo_lon_lat_result_order = true`。[#74719](https://github.com/ClickHouse/ClickHouse/pull/74719) ([Manish Gill](https://github.com/mgill25)).
* 新的 MongoDB driver 现已成为默认选项。希望继续使用旧版 driver 的用户，可以将服务器设置 `use_legacy_mongodb_integration` 设置为 true。[#73359](https://github.com/ClickHouse/ClickHouse/pull/73359) ([Robert Schulze](https://github.com/rschu1ze)).

#### 新特性

* 新增了一项功能：提交后即可在执行 `SELECT` 查询时立即应用尚未完成 (即尚未由后台进程物化) 的变更。可通过设置 `apply_mutations_on_fly` 启用该功能。[#74877](https://github.com/ClickHouse/ClickHouse/pull/74877) ([Anton Popov](https://github.com/CurtizJ)) 。
* 在 Iceberg 中为与时间相关的 transform 分区操作实现 `Iceberg` 表分区裁剪。[#72044](https://github.com/ClickHouse/ClickHouse/pull/72044) ([Daniil Ivanik](https://github.com/divanik)) 。
* 支持在 MergeTree 排序键和跳过索引中使用子列。[#72644](https://github.com/ClickHouse/ClickHouse/pull/72644) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持从 `Apache Arrow`/`Parquet`/`ORC` 读取 `HALF_FLOAT` 值 (会读入为 `Float32`) 。这修复了 [#72960](https://github.com/ClickHouse/ClickHouse/issues/72960)。请注意，IEEE-754 半精度浮点数与 `BFloat16` 并不相同。修复了 [#73835](https://github.com/ClickHouse/ClickHouse/issues/73835)。[#73836](https://github.com/ClickHouse/ClickHouse/pull/73836) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `system.trace_log` 表将新增两个列：`symbols` 和 `lines`，用于存储符号化后的堆栈跟踪。这使收集和导出性能分析信息更加方便。该功能由 `trace_log` 中的服务器配置项 `symbolize` 控制，且默认启用。[#73896](https://github.com/ClickHouse/ClickHouse/pull/73896) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增函数 `generateSerialID`，可用于在表中生成自增编号。这是 [kazalika](https://github.com/kazalika) 对 [#64310](https://github.com/ClickHouse/ClickHouse/issues/64310) 的后续工作。此项变更关闭了 [#62485](https://github.com/ClickHouse/ClickHouse/issues/62485)。[#73950](https://github.com/ClickHouse/ClickHouse/pull/73950) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 DDL 查询新增语法 `query1 PARALLEL WITH query2 PARALLEL WITH query3 ... PARALLEL WITH queryN`。这意味着子查询 `{query1, query2, ... queryN}` 可以彼此并行运行 (而且更推荐这样做) 。[#73983](https://github.com/ClickHouse/ClickHouse/pull/73983) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 为已反序列化的跳过索引粒度新增了一个内存缓存。这应当能让重复执行使用跳过索引的查询更快。新缓存的大小由服务器设置 `skipping_index_cache_size` 和 `skipping_index_cache_max_entries` 控制。该缓存最初是为了向量相似度索引而引入的，而现在它们的速度也快了很多。[#70102](https://github.com/ClickHouse/ClickHouse/pull/70102) ([Robert Schulze](https://github.com/rschu1ze)).
* 现在，内嵌 Web UI 会在查询执行期间显示进度条，并支持取消查询。它会显示记录总数以及更详细的速度信息。表格可在数据到达后立即逐步渲染。启用了 HTTP 压缩。表格渲染速度更快了。表头现已固定。现在可以选中单元格，并使用方向键在单元格之间移动。修复了所选单元格的轮廓线会使其看起来变小的问题。单元格不再在鼠标悬停时展开，而只会在选中时展开。何时停止渲染传入数据现在由客户端而非服务端决定。为数值添加了数字分组高亮。整体设计已更新，风格也更加醒目。它会检查服务器是否可达、credentials 是否正确，并显示服务器版本和运行时间。云图标在所有字体下都会显示轮廓，包括 Safari。嵌套数据类型中的大整数将获得更好的渲染效果。它将正确显示 inf/nan。将鼠标悬停在列标题上时，会显示数据类型。[#74204](https://github.com/ClickHouse/ClickHouse/pull/74204) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了为由 MergeTree 管理的列默认创建 min-max (skipping) 索引的能力，可通过设置 `add_minmax_index_for_numeric_columns` (用于数值列) 和 `add_minmax_index_for_string_columns` (用于字符串列) 来控制。目前，这两个设置均处于禁用状态，因此暂时还不会带来行为变化。[#74266](https://github.com/ClickHouse/ClickHouse/pull/74266) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 将 `script_query_number` 和 `script_line_number` 字段添加到 `system.query_log`、原生协议中的 ClientInfo 以及服务器日志中。此更改解决了 [#67542](https://github.com/ClickHouse/ClickHouse/issues/67542)。感谢 [pinsvin00](https://github.com/pinsvin00) 在更早的 [#68133](https://github.com/ClickHouse/ClickHouse/issues/68133) 中率先推动了这一功能。[#74477](https://github.com/ClickHouse/ClickHouse/pull/74477) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增了聚合函数 `sequenceMatchEvents`，用于返回模式中最长事件链内匹配事件的时间戳。[#72349](https://github.com/ClickHouse/ClickHouse/pull/72349) ([UnamedRus](https://github.com/UnamedRus)) 。
* 新增函数 `arrayNormalizedGini`。[#72823](https://github.com/ClickHouse/ClickHouse/pull/72823) ([flynn](https://github.com/ucasfl)).
* 为 `DateTime64` 增加减号运算符支持，以便可在 `DateTime64` 值之间以及 `DateTime64` 与 `DateTime` 之间进行减法运算。[#74482](https://github.com/ClickHouse/ClickHouse/pull/74482) ([Li Yin](https://github.com/liyinsg)).

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

* `BFloat16` 数据类型现已达到生产可用状态。[#73840](https://github.com/ClickHouse/ClickHouse/pull/73840) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

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

* 已优化函数 `indexHint`。现在，仅用作函数 `indexHint` 参数的列将不会从表中读取。[#74314](https://github.com/ClickHouse/ClickHouse/pull/74314) ([Anton Popov](https://github.com/CurtizJ))。如果 `indexHint` 函数是企业级数据架构中的关键一环，这项优化简直就是救命稻草。
* 对 `parallel_hash` JOIN 算法中的 `max_joined_block_size_rows` 设置进行了更精确的控制，有助于避免相比 `hash` 算法出现更高的内存消耗。[#74630](https://github.com/ClickHouse/ClickHouse/pull/74630) ([Nikita Taranov](https://github.com/nickitat)) 。
* 支持在查询计划层面对 `MergingAggregated` 步骤进行谓词下推优化。可提升 analyzer 处理某些查询时的性能。[#74073](https://github.com/ClickHouse/ClickHouse/pull/74073) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 在 `parallel_hash` JOIN 算法的探测阶段中，已不再按哈希拆分左表块。[#73089](https://github.com/ClickHouse/ClickHouse/pull/73089) ([Nikita Taranov](https://github.com/nickitat)) 。
* 优化 RowBinary 输入格式。修复 [#63805](https://github.com/ClickHouse/ClickHouse/issues/63805)。[#65059](https://github.com/ClickHouse/ClickHouse/pull/65059) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 如果启用了 `optimize_on_insert`，则将 parts 以 level 1 写入。这样一来，就可以对新写入的 parts 使用若干带 `FINAL` 的查询优化。[#73132](https://github.com/ClickHouse/ClickHouse/pull/73132) ([Anton Popov](https://github.com/CurtizJ)).
* 通过一些底层优化提升字符串反序列化速度。[#65948](https://github.com/ClickHouse/ClickHouse/pull/65948) ([Nikita Taranov](https://github.com/nickitat)) 。
* 在对记录进行相等比较时 (例如在合并过程中) ，应先从最有可能不相等的列开始比较行。[#63780](https://github.com/ClickHouse/ClickHouse/pull/63780) ([UnamedRus](https://github.com/UnamedRus)).
* 通过按键对右侧 JOIN 表重新排序，以提升 grace hash join 的性能。[#72237](https://github.com/ClickHouse/ClickHouse/pull/72237) ([kevinyhzou](https://github.com/KevinyhZou)).
* 允许 `arrayROCAUC` 和 `arrayAUCPR` 计算整条曲线的局部面积，从而能够在超大数据集上并行计算。[#72904](https://github.com/ClickHouse/ClickHouse/pull/72904) ([Emmanuel](https://github.com/emmanuelsdias)) 。
* 避免创建过多空闲线程。[#72920](https://github.com/ClickHouse/ClickHouse/pull/72920) ([Guo Wangyang](https://github.com/guowangy)) 。
* 如果表函数中仅使用花括号展开，则不要列出 blob 存储中的键。已关闭 [#73333](https://github.com/ClickHouse/ClickHouse/issues/73333)。[#73518](https://github.com/ClickHouse/ClickHouse/pull/73518) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 针对在 Nullable 参数上执行的函数进行了短路优化。[#73820](https://github.com/ClickHouse/ClickHouse/pull/73820) ([李扬](https://github.com/taiyang-li)).
* 不要对非函数列应用 `maskedExecute`，以提升短路执行的性能。[#73965](https://github.com/ClickHouse/ClickHouse/pull/73965) ([lgbo](https://github.com/lgbo-ustc)).
* 禁用 `Kafka`/`NATS`/`RabbitMQ`/`FileLog` 输入格式中请求头的自动检测，以提升性能。[#74006](https://github.com/ClickHouse/ClickHouse/pull/74006) ([Azat Khuzhin](https://github.com/azat)) 。
* 在使用 grouping sets 进行聚合后，以更高的并行度执行管道。[#74082](https://github.com/ClickHouse/ClickHouse/pull/74082) ([Nikita Taranov](https://github.com/nickitat)) 。
* 减少 `MergeTreeReadPool` 中的临界区。[#74202](https://github.com/ClickHouse/ClickHouse/pull/74202) ([Guo Wangyang](https://github.com/guowangy)) 。
* 并行副本性能改进。对于与并行副本协议无关的数据包，其在查询发起节点上的反序列化现在始终在管道线程中进行。此前，这一过程可能会在负责管道调度的线程中进行，从而导致发起节点响应变慢，并延迟管道执行。[#74398](https://github.com/ClickHouse/ClickHouse/pull/74398) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 提升 Keeper 中大型批量请求的性能。[#74849](https://github.com/ClickHouse/ClickHouse/pull/74849) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 日志包装器应按值使用，不要在堆上分配。[#74034](https://github.com/ClickHouse/ClickHouse/pull/74034) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 在后台重新建立与 MySQL 和 Postgres 字典副本的连接，从而不会拖慢对相应字典的请求。[#71101](https://github.com/ClickHouse/ClickHouse/pull/71101) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 并行副本此前会利用有关副本可用性的历史信息来优化副本选择，但在连接不可用时不会更新副本的错误计数。此 PR 会在副本不可用时更新其错误计数。[#72666](https://github.com/ClickHouse/ClickHouse/pull/72666) ([zoomxi](https://github.com/zoomxi)).
* 新增了一个 MergeTree 设置 `materialize_skip_indexes_on_merge`，用于在 merge 过程中禁止创建跳过索引。这样，你就可以显式控制跳过索引的创建时机 (通过 `ALTER TABLE [..] MATERIALIZE INDEX [...]`) 。如果跳过索引的构建开销较高 (例如向量相似度索引) ，这会很有用。[#74401](https://github.com/ClickHouse/ClickHouse/pull/74401) ([Robert Schulze](https://github.com/rschu1ze)).
* 优化了 Storage(S3/Azure)Queue 中的 Keeper 请求。[#74410](https://github.com/ClickHouse/ClickHouse/pull/74410) ([Kseniia Sumarokova](https://github.com/kssenii)) 。[#74538](https://github.com/ClickHouse/ClickHouse/pull/74538) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 默认最多可使用 `1000` 个并行副本。[#74504](https://github.com/ClickHouse/ClickHouse/pull/74504) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 改进从 S3 磁盘读取时的 HTTP 会话复用 ([#72401](https://github.com/ClickHouse/ClickHouse/issues/72401))。[#74548](https://github.com/ClickHouse/ClickHouse/pull/74548) ([Julian Maicher](https://github.com/jmaicher))。

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

* 支持在隐式 ENGINE 的 CREATE TABLE 查询中使用 SETTINGS，并支持混合使用引擎设置与查询设置。[#73120](https://github.com/ClickHouse/ClickHouse/pull/73120) ([Raúl Marín](https://github.com/Algunenano)).
* 默认启用 `use_hive_partitioning`。 [#71636](https://github.com/ClickHouse/ClickHouse/pull/71636) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 支持在不同参数的 JSON 类型之间进行 CAST 和 ALTER。[#72303](https://github.com/ClickHouse/ClickHouse/pull/72303) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持对 JSON 列值进行相等比较。[#72991](https://github.com/ClickHouse/ClickHouse/pull/72991) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 优化带有 JSON 子列的标识符格式，避免使用不必要的反引号。[#73085](https://github.com/ClickHouse/ClickHouse/pull/73085) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 交互式指标改进。修复了并行副本的指标无法完整显示的问题。指标先按最近更新时间排序，再按名称的字典序排序。不显示过时的指标。[#71631](https://github.com/ClickHouse/ClickHouse/pull/71631) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 默认以美化方式显示 JSON 输出格式。新增设置 `output_format_json_pretty_print` 用于控制此行为，并默认启用。[#72148](https://github.com/ClickHouse/ClickHouse/pull/72148) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 默认允许使用 `LowCardinality(UUID)`。这已被证明在 ClickHouse Cloud 客户中很实用。[#73826](https://github.com/ClickHouse/ClickHouse/pull/73826) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 安装期间的提示信息更完善。[#73827](https://github.com/ClickHouse/ClickHouse/pull/73827) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进 ClickHouse Cloud 密码重置提示信息。[#73831](https://github.com/ClickHouse/ClickHouse/pull/73831) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进了使用 File 表引擎且无法向文件追加写入时的错误消息。[#73832](https://github.com/ClickHouse/ClickHouse/pull/73832) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 当用户误在终端请求输出二进制格式 (如 Native、Parquet、Avro) 时，会先询问确认。此更改关闭了 [#59524](https://github.com/ClickHouse/ClickHouse/issues/59524)。[#73833](https://github.com/ClickHouse/ClickHouse/pull/73833) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在终端中高亮 Pretty 和 Vertical 格式中的尾随空格，以便显示得更清楚。这由 `output_format_pretty_highlight_trailing_spaces` 设置控制。初始实现由 [Braden Burns](https://github.com/bradenburns) 提供，参见 [#72996](https://github.com/ClickHouse/ClickHouse/issues/72996)。关闭 [#71590](https://github.com/ClickHouse/ClickHouse/issues/71590)。[#73847](https://github.com/ClickHouse/ClickHouse/pull/73847) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `clickhouse-client` 和 `clickhouse-local` 现在会在 stdin 重定向自文件时自动检测压缩格式。此更改解决了 [#70865](https://github.com/ClickHouse/ClickHouse/issues/70865)。[#73848](https://github.com/ClickHouse/ClickHouse/pull/73848) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认在 Pretty 格式中截断过长的列名。此行为由 `output_format_pretty_max_column_name_width_cut_to` 和 `output_format_pretty_max_column_name_width_min_chars_to_cut` 设置控制。这延续了 [tanmaydatta](https://github.com/tanmaydatta) 在 [#66502](https://github.com/ClickHouse/ClickHouse/issues/66502) 中开展的工作。此项还关闭了 [#65968](https://github.com/ClickHouse/ClickHouse/issues/65968)。[#73851](https://github.com/ClickHouse/ClickHouse/pull/73851) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 让 `Pretty` 格式更美观：如果距离前一个块输出的时间较短，则会合并块。这由新设置 `output_format_pretty_squash_consecutive_ms` (默认值为 50 ms) 和 `output_format_pretty_squash_max_wait_ms` (默认值为 1000 ms) 控制。延续 [#49537](https://github.com/ClickHouse/ClickHouse/issues/49537)。这解决了 [#49153](https://github.com/ClickHouse/ClickHouse/issues/49153)。[#73852](https://github.com/ClickHouse/ClickHouse/pull/73852) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增一项指标，用于统计当前正在合并的源 parts 数量。此更改关闭了 [#70809](https://github.com/ClickHouse/ClickHouse/issues/70809)。[#73868](https://github.com/ClickHouse/ClickHouse/pull/73868) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 如果输出到终端，则会在 `Vertical` 格式中高亮显示各列。可通过 `output_format_pretty_color` 设置禁用此功能。[#73898](https://github.com/ClickHouse/ClickHouse/pull/73898) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 进一步增强了 MySQL 兼容性，现在 `mysqlsh` (Oracle 提供的功能丰富的 MySQL CLI) 已经可以连接到 ClickHouse。这有助于简化测试。[#73912](https://github.com/ClickHouse/ClickHouse/pull/73912) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Pretty 格式现在可以在表单元内渲染多行字段，从而提升可读性。此功能默认启用，可通过设置 `output_format_pretty_multiline_fields` 进行控制。这延续了 [Volodyachan](https://github.com/Volodyachan) 在 [#64094](https://github.com/ClickHouse/ClickHouse/issues/64094) 中的工作。此变更关闭了 [#56912](https://github.com/ClickHouse/ClickHouse/issues/56912)。[#74032](https://github.com/ClickHouse/ClickHouse/pull/74032) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 向浏览器中的 JavaScript 暴露 X-ClickHouse HTTP 请求头，让编写应用程序更加方便。[#74180](https://github.com/ClickHouse/ClickHouse/pull/74180) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `JSONEachRowWithProgress` 格式将包含带有元数据的事件，以及总计和极值。它还包括 `rows_before_limit_at_least` 和 `rows_before_aggregation`。如果在返回部分结果后才收到异常，该格式也能正确输出异常。现在，进度信息中还包含已耗时的纳秒数。结束时还会额外发出一条最终的进度事件。查询运行期间，进度信息的输出间隔不会小于 `interactive_delay` 设置的值。[#74181](https://github.com/ClickHouse/ClickHouse/pull/74181) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Play UI 中的沙漏将会平滑地旋转。[#74182](https://github.com/ClickHouse/ClickHouse/pull/74182) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 即使 HTTP 响应已压缩，也会在数据包到达后立即发送。这使浏览器能够接收 Progress 数据包和压缩数据。[#74201](https://github.com/ClickHouse/ClickHouse/pull/74201) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 如果输出记录数大于 N = `output_format_pretty_max_rows`，将不再只显示前 N 行，而是从中间截断输出表，显示前 N/2 行和后 N/2 行。[#64200](https://github.com/ClickHouse/ClickHouse/issues/64200) 的后续。这解决了 [#59502](https://github.com/ClickHouse/ClickHouse/issues/59502)。[#73929](https://github.com/ClickHouse/ClickHouse/pull/73929) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 启用哈希 JOIN 算法时，允许采用更通用的 JOIN 规划算法。[#71926](https://github.com/ClickHouse/ClickHouse/pull/71926) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 支持在数据类型为 `DateTime64` 的列上创建 bloom\_filter 索引。[#66416](https://github.com/ClickHouse/ClickHouse/pull/66416) ([Yutong Xiao](https://github.com/YutSean)) 。
* 当同时启用 `min_age_to_force_merge_seconds` 和 `min_age_to_force_merge_on_partition_only` 时，分片合并将忽略最大字节限制。[#73656](https://github.com/ClickHouse/ClickHouse/pull/73656) ([Kai Zhu](https://github.com/nauu)) 。
* 向 OpenTelemetry span 日志表中添加了 HTTP 请求头，以增强追踪能力。[#70516](https://github.com/ClickHouse/ClickHouse/pull/70516) ([jonymohajanGmail](https://github.com/jonymohajanGmail)).
* 支持按自定义时区写入 `orc` 文件，而不再总是使用 `GMT` 时区。[#70615](https://github.com/ClickHouse/ClickHouse/pull/70615) ([kevinyhzou](https://github.com/KevinyhZou)) 。
* 跨云写入备份时会遵循 IO 调度设置。[#71093](https://github.com/ClickHouse/ClickHouse/pull/71093) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 为 `system.asynchronous_metrics` 新增 `metric` 列的别名 `name`。[#71164](https://github.com/ClickHouse/ClickHouse/pull/71164) ([megao](https://github.com/jetgm)) 。
* 由于历史原因，查询 `ALTER TABLE MOVE PARTITION TO TABLE` 之前检查的是 `SELECT` 和 `ALTER DELETE` 权限，而不是专门的 `ALTER_MOVE_PARTITION`。此 PR 改为使用这种访问类型。为保持兼容性，如果已授予 `SELECT` 和 `ALTER DELETE`，也会隐式授予此权限，但这一行为将在未来版本中移除。关闭 [#16403](https://github.com/ClickHouse/ClickHouse/issues/16403)。[#71632](https://github.com/ClickHouse/ClickHouse/pull/71632) ([pufit](https://github.com/pufit)) 。
* 尝试将排序键中的列物化时，会抛出异常，而不是允许其破坏排序顺序。[#71891](https://github.com/ClickHouse/ClickHouse/pull/71891) ([Peter Nguyen](https://github.com/petern48)).
* 在 `EXPLAIN QUERY TREE` 中隐藏敏感信息。[#72025](https://github.com/ClickHouse/ClickHouse/pull/72025) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* “原生”读取器现已支持 Parquet 整数逻辑类型。[#72105](https://github.com/ClickHouse/ClickHouse/pull/72105) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 如果默认用户需要密码，则会在浏览器中以交互方式请求输入凭据。在之前的版本中，server 返回 HTTP 403；现在返回 HTTP 401。[#72198](https://github.com/ClickHouse/ClickHouse/pull/72198) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将访问类型 `CREATE_USER`、`ALTER_USER`、`DROP_USER`、`CREATE_ROLE`、`ALTER_ROLE`、`DROP_ROLE` 从全局改为参数化。这意味着你现在可以更精细地授予访问管理相关的授权。[#72246](https://github.com/ClickHouse/ClickHouse/pull/72246) ([pufit](https://github.com/pufit)) 。
* 将 `latest_fail_error_code_name` 列添加到 `system.mutations` 中。我们需要这一列来为卡住的变更引入一项新指标，并用它构建 Cloud 中遇到的错误图表，以及可选地新增一个噪声更低的警报。[#72398](https://github.com/ClickHouse/ClickHouse/pull/72398) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 减少 `ATTACH PARTITION` 查询中的内存分配。[#72583](https://github.com/ClickHouse/ClickHouse/pull/72583) ([Konstantin Morozov](https://github.com/k-morozov)) 。
* 使 `max_bytes_before_external_sort` 限制取决于查询的总内存消耗 (此前它表示单个排序线程中排序块的字节数；现在它与 `max_bytes_before_external_group_by` 的含义相同——即整个查询中所有线程的总内存限制) 。此外，还新增了一个用于控制磁盘上块大小的设置：`min_external_sort_block_bytes`。[#72598](https://github.com/ClickHouse/ClickHouse/pull/72598) ([Azat Khuzhin](https://github.com/azat)).
* 忽略 trace collector 的内存限制。[#72606](https://github.com/ClickHouse/ClickHouse/pull/72606) ([Azat Khuzhin](https://github.com/azat)) 。
* 在 `system.server_settings` 中新增服务器设置 `dictionaries_lazy_load` 和 `wait_dictionaries_load_at_startup`。[#72664](https://github.com/ClickHouse/ClickHouse/pull/72664) ([Christoph Wurm](https://github.com/cwurm)) 。
* 将设置 `max_backup_bandwidth` 添加到可在 `BACKUP`/`RESTORE` 查询中指定的设置列表中。[#72665](https://github.com/ClickHouse/ClickHouse/pull/72665) ([Christoph Wurm](https://github.com/cwurm)) 。
* 降低 ReplicatedMergeTree 引擎中出现 replicated parts 时的日志级别，以帮助尽量减少复制集群中生成的日志量。[#72876](https://github.com/ClickHouse/ClickHouse/pull/72876) ([mor-akamai](https://github.com/morkalfon)).
* 改进了对析取中公共表达式的提取。即使并非所有析取项都有公共子表达式，也可以简化最终生成的过滤表达式。[#71537](https://github.com/ClickHouse/ClickHouse/issues/71537) 的后续工作。[#73271](https://github.com/ClickHouse/ClickHouse/pull/73271) ([Dmitry Novik](https://github.com/novikd)) 。
* 在 `S3Queue`/`AzureQueue` 存储中，现支持为创建时未指定设置的表补充设置。[#73283](https://github.com/ClickHouse/ClickHouse/pull/73283) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 引入设置 `least_greatest_legacy_null_behavior` (默认值：`false`) ，用于控制函数 `least` 和 `greatest` 处理 `NULL` 参数时，是无条件返回 `NULL` (当为 `true` 时) ，还是忽略这些参数 (当为 `false` 时) 。[#73344](https://github.com/ClickHouse/ClickHouse/pull/73344) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 在 ObjectStorageQueueMetadata 的清理线程中使用 Keeper 的批量请求。[#73357](https://github.com/ClickHouse/ClickHouse/pull/73357) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 当 ClickHouse 在 cgroup 中运行时，我们仍会收集与系统负载、进程调度、内存等相关的全系统异步指标。当 ClickHouse 是主机上唯一运行且资源消耗较高的进程时，这些指标可能会提供有价值的信号。[#73369](https://github.com/ClickHouse/ClickHouse/pull/73369) ([Nikita Taranov](https://github.com/nickitat)).
* 在 `S3Queue` 存储中，支持将 24.6 之前创建的旧版有序表迁移到带桶的新结构。[#73467](https://github.com/ClickHouse/ClickHouse/pull/73467) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 新增 `system.azure_queue`，与现有的 `system.s3queue` 类似。[#73477](https://github.com/ClickHouse/ClickHouse/pull/73477) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 函数 `parseDateTime64` (及其变体) 现在对早于 1970 年 / 晚于 2106 年的输入日期也能返回正确结果。示例：`SELECT parseDateTime64InJodaSyntax('2200-01-01 00:00:00.000', 'yyyy-MM-dd HH:mm:ss.SSS')`。[#73594](https://github.com/ClickHouse/ClickHouse/pull/73594) ([zhanglistar](https://github.com/zhanglistar)) 。
* 解决了用户反馈的一些 `clickhouse-disks` 易用性问题。关闭 [#67136](https://github.com/ClickHouse/ClickHouse/issues/67136)。[#73616](https://github.com/ClickHouse/ClickHouse/pull/73616) ([Daniil Ivanik](https://github.com/divanik)) 。
* 允许在 S3(Azure)Queue 存储中调整提交设置。 (提交设置包括：`max_processed_files_before_commit`、`max_processed_rows_before_commit`、`max_processed_bytes_before_commit`、`max_processing_time_sec_before_commit`) 。[#73635](https://github.com/ClickHouse/ClickHouse/pull/73635) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 S3(Azure)Queue 存储中，聚合各个源的进度，以便与提交限制设置进行比较。[#73641](https://github.com/ClickHouse/ClickHouse/pull/73641) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持在 `BACKUP`/`RESTORE` 查询中使用核心设置。[#73650](https://github.com/ClickHouse/ClickHouse/pull/73650) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 在 Parquet 输出时考虑 `output_format_compression_level`。[#73651](https://github.com/ClickHouse/ClickHouse/pull/73651) ([Arthur Passos](https://github.com/arthurpassos)).
* 新增支持将 Apache Arrow 的 `fixed_size_list` 读取为 `Array`，而不再将其视为不受支持的类型。[#73654](https://github.com/ClickHouse/ClickHouse/pull/73654) ([Julian Meyers](https://github.com/J-Meyers)) 。
* 新增两个备份引擎：`Memory` (将备份保留在当前用户会话内) 和 `Null` (不在任何位置保留备份) ，用于测试。[#73690](https://github.com/ClickHouse/ClickHouse/pull/73690) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* `concurrent_threads_soft_limit_num` 和 `concurrent_threads_soft_limit_num_ratio_to_cores` 可在不重启服务器的情况下更改。[#73713](https://github.com/ClickHouse/ClickHouse/pull/73713) ([Sergei Trifonov](https://github.com/serxa)) 。
* 为 `formatReadable` 函数增加了对扩展数值类型 (`Decimal`、大整数) 的支持。[#73765](https://github.com/ClickHouse/ClickHouse/pull/73765) ([Raúl Marín](https://github.com/Algunenano)) 。
* 支持 Postgres wire protocol 兼容性的 TLS。[#73812](https://github.com/ClickHouse/ClickHouse/pull/73812) ([scanhex12](https://github.com/scanhex12)) 。
* 函数 `isIPv4String` 在正确的 IPv4 地址后跟有一个零字节时会返回 true，而这种情况下本应返回 false。[#65387](https://github.com/ClickHouse/ClickHouse/issues/65387) 的后续修复。[#73946](https://github.com/ClickHouse/ClickHouse/pull/73946) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使 MySQL wire 协议中的错误代码与 MySQL 保持兼容。延续 [#56831](https://github.com/ClickHouse/ClickHouse/issues/56831)。关闭 [#50957](https://github.com/ClickHouse/ClickHouse/issues/50957)。[#73948](https://github.com/ClickHouse/ClickHouse/pull/73948) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增设置 `validate_enum_literals_in_opearators`，用于根据枚举类型校验 `IN`、`NOT IN` 等运算符中的枚举字面量；如果字面量不是有效的枚举值，则抛出异常。[#73985](https://github.com/ClickHouse/ClickHouse/pull/73985) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 在存储 `S3(Azure)Queue` 中，将所有文件 (按提交设置定义的单个批次) 在单个 Keeper 事务中提交。[#73991](https://github.com/ClickHouse/ClickHouse/pull/73991) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为可执行 UDF 和字典禁用请求头检测 (可能导致 Function 'X': wrong result, expected Y row(s), actual Y-1) 。[#73992](https://github.com/ClickHouse/ClickHouse/pull/73992) ([Azat Khuzhin](https://github.com/azat)) 。
* 为 `EXPLAIN PLAN.` 新增 `distributed` 选项。现在，`EXPLAIN distributed=1 ... ` 会将远程计划附加到 `ReadFromParallelRemote*` 步骤。[#73994](https://github.com/ClickHouse/ClickHouse/pull/73994) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修正 not/xor 在使用 Dynamic 参数时的返回类型。[#74013](https://github.com/ClickHouse/ClickHouse/pull/74013) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 允许在表创建后修改 `add_implicit_sign_column_constraint_for_collapsing_engine`。[#74014](https://github.com/ClickHouse/ClickHouse/pull/74014) ([Christoph Wurm](https://github.com/cwurm)).
* 支持在 materialized view 的 SELECT 查询中使用子列。[#74030](https://github.com/ClickHouse/ClickHouse/pull/74030) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 现在，在 `clickhouse-client` 中设置自定义提示符有三种简单方法：1. 通过命令行参数 `--prompt`；2. 在配置文件中，通过设置 `<prompt>[...]</prompt>`；3. 同样在配置文件中，通过每个连接的设置 `<connections_credentials><prompt>[...]</prompt></connection_credentials>`。 [#74168](https://github.com/ClickHouse/ClickHouse/pull/74168) ([Christoph Wurm](https://github.com/cwurm)) 。
* ClickHouse Client 现可在连接到 9440 端口时自动检测安全连接。[#74212](https://github.com/ClickHouse/ClickHouse/pull/74212) ([Christoph Wurm](https://github.com/cwurm)) 。
* 对于 http\_handlers，用户现可仅凭用户名进行身份验证 (此前还要求同时提供密码) 。[#74221](https://github.com/ClickHouse/ClickHouse/pull/74221) ([Azat Khuzhin](https://github.com/azat)) 。
* 对替代查询语言 PRQL 和 KQL 的支持已标记为 Experimental。要使用它们，请指定设置 `allow_experimental_prql_dialect = 1` 和 `allow_experimental_kusto_dialect = 1`。 [#74224](https://github.com/ClickHouse/ClickHouse/pull/74224) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 支持在更多聚合函数中返回默认的枚举类型。[#74272](https://github.com/ClickHouse/ClickHouse/pull/74272) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在 `OPTIMIZE TABLE` 中，现在可以使用关键字 `FORCE` 作为现有关键字 `FINAL` 的替代。[#74342](https://github.com/ClickHouse/ClickHouse/pull/74342) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增 `IsServerShuttingDown` 指标，用于在服务器关闭耗时过长时触发警报。[#74429](https://github.com/ClickHouse/ClickHouse/pull/74429) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 在 EXPLAIN 中加入了 Iceberg 表名。[#74485](https://github.com/ClickHouse/ClickHouse/pull/74485) ([alekseev-maksim](https://github.com/alekseev-maksim)) 。
* 在旧版 analyzer 中使用 RECURSIVE CTE 时，提供了更清晰的错误信息。[#74523](https://github.com/ClickHouse/ClickHouse/pull/74523) ([Raúl Marín](https://github.com/Algunenano)).
* 在 `system.errors` 中显示更详细的错误消息。[#74574](https://github.com/ClickHouse/ClickHouse/pull/74574) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 允许在客户端与 clickhouse-keeper 通信时使用密码。如果已为服务端和客户端正确配置 SSL，这项功能的用处并不大，但在某些场景下仍然有用。密码长度不能超过 16 个字符。它与 Keeper Auth 模型无关。[#74673](https://github.com/ClickHouse/ClickHouse/pull/74673) ([alesapin](https://github.com/alesapin)).
* 为配置重载器添加错误代码。[#74746](https://github.com/ClickHouse/ClickHouse/pull/74746) ([Garrett Thomas](https://github.com/garrettthomaskth)) 。
* 为 MySQL 和 PostgreSQL 表函数及引擎新增了对 IPv6 地址的支持。[#74796](https://github.com/ClickHouse/ClickHouse/pull/74796) ([Mikhail Koviazin](https://github.com/mkmkme)) 。
* 为 `divideDecimal` 添加短路优化。修复了 [#74280](https://github.com/ClickHouse/ClickHouse/issues/74280)。[#74843](https://github.com/ClickHouse/ClickHouse/pull/74843) ([Kevin Mingtarja](https://github.com/kevinmingtarja)) 。
* 现在可在启动脚本中指定用户。[#74894](https://github.com/ClickHouse/ClickHouse/pull/74894) ([pufit](https://github.com/pufit)) 。
* 新增对 Azure SAS 令牌的支持。[#72959](https://github.com/ClickHouse/ClickHouse/pull/72959) ([Azat Khuzhin](https://github.com/azat)) 。

<div id="bug-fix-user-visible-misbehavior-in-an-official-stable-release">
  #### 缺陷修复 (在官方稳定版本中用户可见的异常行为)
</div>

* 仅在压缩编解码器支持该功能时，才设置 Parquet 压缩级别。[#74659](https://github.com/ClickHouse/ClickHouse/pull/74659) ([Arthur Passos](https://github.com/arthurpassos)).
* 修复了一个回归问题：在修饰符中使用排序规则区域设置时会报错。例如，`SELECT arrayJoin(['kk 50', 'KK 01', ' KK 2', ' KK 3', 'kk 1', 'x9y99', 'x9y100']) item ORDER BY item ASC COLLATE 'tr-u-kn-true-ka-shifted` 现在可以正常工作了。[#73544](https://github.com/ClickHouse/ClickHouse/pull/73544) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了 keeper-client 无法创建 SEQUENTIAL 节点的问题。[#64177](https://github.com/ClickHouse/ClickHouse/pull/64177) ([Duc Canh Le](https://github.com/canhld94)) 。
* 修复 position 函数中字符计数错误的问题。[#71003](https://github.com/ClickHouse/ClickHouse/pull/71003) ([思维](https://github.com/heymind)) 。
* 由于未处理部分 `REVOKE` 的情况，访问实体的 `RESTORE` 操作会要求比实际所需更多的权限。此 PR 修复了该问题。关闭 [#71853](https://github.com/ClickHouse/ClickHouse/issues/71853)。[#71958](https://github.com/ClickHouse/ClickHouse/pull/71958) ([pufit](https://github.com/pufit)) 。
* 避免在 `ALTER TABLE REPLACE/MOVE PARTITION FROM/TO TABLE` 后发生暂停。为后台任务调度获取正确的设置。[#72024](https://github.com/ClickHouse/ClickHouse/pull/72024) ([Aleksei Filatov](https://github.com/aalexfvk)).
* 修复某些输入和输出格式 (例如 Parquet、Arrow) 中空元组的处理问题。[#72616](https://github.com/ClickHouse/ClickHouse/pull/72616) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 对通配符数据库/表的列级 GRANT SELECT/INSERT 语句现在会报错。[#72646](https://github.com/ClickHouse/ClickHouse/pull/72646) ([Johann Gan](https://github.com/johanngan)) 。
* 修复了一种情况：由于目标访问实体中存在隐式授权，用户无法执行 `REVOKE ALL ON *.*`。[#72872](https://github.com/ClickHouse/ClickHouse/pull/72872) ([pufit](https://github.com/pufit)).
* 修复 `formatDateTime` 标量函数对正时区的格式化错误。[#73091](https://github.com/ClickHouse/ClickHouse/pull/73091) ([ollidraese](https://github.com/ollidraese)) 。
* 修复了在通过 PROXYv1 建立 connection 且设置了 `auth_use_forwarded_address` 时，无法正确反映源端口的问题——此前错误地使用了 proxy 端口。新增 `currentQueryID()` 函数。[#73095](https://github.com/ClickHouse/ClickHouse/pull/73095) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 将格式设置传递到 TCPHandler 中的 NativeWriter，确保 `output_format_native_write_json_as_string` 等设置能够正确生效。[#73179](https://github.com/ClickHouse/ClickHouse/pull/73179) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 StorageObjectStorageQueue 中的崩溃。[#73274](https://github.com/ClickHouse/ClickHouse/pull/73274) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了服务器关闭期间可刷新materialized view 发生的罕见崩溃问题。[#73323](https://github.com/ClickHouse/ClickHouse/pull/73323) ([Michael Kolupaev](https://github.com/al13n321)).
* 函数 `formatDateTime` 的 `%f` 占位符现在始终会生成六位秒以下数字。这使其行为与 MySQL 的 `DATE_FORMAT` 函数保持兼容。此前的行为可通过设置 `formatdatetime_f_prints_scale_number_of_digits = 1` 恢复。[#73324](https://github.com/ClickHouse/ClickHouse/pull/73324) ([ollidraese](https://github.com/ollidraese)) 。
* 修复了从 `s3` 存储和表函数读取时，基于 `_etag` 列进行过滤的问题。[#73353](https://github.com/ClickHouse/ClickHouse/pull/73353) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在使用旧 analyzer 时，`JOIN ON` 表达式中使用 `IN (subquery)` 会触发的 `Not-ready Set is passed as the second argument for function 'in'` 错误。[#73382](https://github.com/ClickHouse/ClickHouse/pull/73382) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了 Dynamic 和 JSON 列在准备 squash 时的问题。此前在某些情况下，即使尚未达到类型/路径限制，新的类型也可能被插入到 shared variant/shared data 中。[#73388](https://github.com/ClickHouse/ClickHouse/pull/73388) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 types 二进制解码过程中检查损坏的大小值，以避免分配过多内存。[#73390](https://github.com/ClickHouse/ClickHouse/pull/73390) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在启用并行副本的情况下从单副本集群读取数据时的逻辑错误。[#73403](https://github.com/ClickHouse/ClickHouse/pull/73403) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了 ObjectStorageQueue 在 ZooKeeper 和旧版 Keeper 上的问题。[#73420](https://github.com/ClickHouse/ClickHouse/pull/73420) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 实现了一项修复，以便默认启用 Hive 分区。[#73479](https://github.com/ClickHouse/ClickHouse/pull/73479) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复创建向量相似度索引时出现的数据竞争问题。[#73517](https://github.com/ClickHouse/ClickHouse/pull/73517) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了当字典的数据源包含返回错误数据的函数时发生的段错误。[#73535](https://github.com/ClickHouse/ClickHouse/pull/73535) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复存储 S3(Azure)Queue 中插入失败后的重试问题。关闭了 [#70951](https://github.com/ClickHouse/ClickHouse/issues/70951)。[#73546](https://github.com/ClickHouse/ClickHouse/pull/73546) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了函数 `tupleElement` 中的一个错误：在某些情况下，对于元素为 `LowCardinality` 且启用了设置 `optimize_functions_to_subcolumns` 的元组，可能会出现该错误。[#73548](https://github.com/ClickHouse/ClickHouse/pull/73548) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了解析后接 range 的枚举 glob 时的错误。修复了 [#73473](https://github.com/ClickHouse/ClickHouse/issues/73473)。[#73569](https://github.com/ClickHouse/ClickHouse/pull/73569) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了在非复制表的子查询中，parallel\_replicas\_for\_non\_replicated\_merge\_tree 被忽略的问题。[#73584](https://github.com/ClickHouse/ClickHouse/pull/73584) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了任务无法调度时抛出 `std::logical&#95;error` 的问题。该问题是在压力测试中发现的。 [#73629](https://github.com/ClickHouse/ClickHouse/pull/73629) ([Alexander Gololobov](https://github.com/davenger)).
* 不要在 `EXPLAIN SYNTAX` 中解析查询，以避免因分布式查询处理阶段不正确而导致逻辑错误。修复了 [#65205](https://github.com/ClickHouse/ClickHouse/issues/65205)。[#73634](https://github.com/ClickHouse/ClickHouse/pull/73634) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复 Dynamic 列中可能存在的数据不一致问题。修复了可能引发逻辑错误 `Nested columns sizes are inconsistent with local_discriminators column size` 的问题。[#73644](https://github.com/ClickHouse/ClickHouse/pull/73644) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了包含 `FINAL` 和 `SAMPLE` 的查询中的 `NOT_FOUND_COLUMN_IN_BLOCK` 问题。修复了从 `CollapsingMergeTree` 中使用 `FINAL` 进行查询时结果不正确的问题，并启用了 `FINAL` 优化。[#73682](https://github.com/ClickHouse/ClickHouse/pull/73682) ([Anton Popov](https://github.com/CurtizJ)).
* 修复 LIMIT BY COLUMNS 中的崩溃问题。[#73686](https://github.com/ClickHouse/ClickHouse/pull/73686) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了一个问题：在强制使用普通 projection 时，如果查询与 projection 的定义完全一致，projection 仍不会被选中，从而导致报错。 [#73700](https://github.com/ClickHouse/ClickHouse/pull/73700) ([Shichao Jin](https://github.com/jsc0218)).
* 修复 Dynamic/Object 结构的反序列化错误。该错误可能导致出现 CANNOT\_READ\_ALL\_DATA 异常。[#73767](https://github.com/ClickHouse/ClickHouse/pull/73767) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 从备份恢复 parts 时，跳过 `metadata_version.txt`。[#73768](https://github.com/ClickHouse/ClickHouse/pull/73768) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了在使用 LIKE 时将值转换为枚举类型会导致段错误的问题。[#73775](https://github.com/ClickHouse/ClickHouse/pull/73775) ([zhanglistar](https://github.com/zhanglistar)) 。
* 修复了 S3 Express 存储桶无法作为磁盘使用的问题。[#73777](https://github.com/ClickHouse/ClickHouse/pull/73777) ([Sameer Tamsekar](https://github.com/stamsekar)).
* 允许在 CollapsingMergeTree 表中合并 sign 列值无效的行。[#73864](https://github.com/ClickHouse/ClickHouse/pull/73864) ([Christoph Wurm](https://github.com/cwurm)).
* 修复在存在离线副本时查询 DDL 出错的问题。[#73876](https://github.com/ClickHouse/ClickHouse/pull/73876) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了比较 `map()` 类型时偶发失败的问题，原因是可能会创建其嵌套元组未显式命名 ('keys'、'values') 的 `Map`。[#73878](https://github.com/ClickHouse/ClickHouse/pull/73878) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 在解析 GROUP BY ALL 子句时忽略窗口函数。修复了 [#73501](https://github.com/ClickHouse/ClickHouse/issues/73501)。[#73916](https://github.com/ClickHouse/ClickHouse/pull/73916) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复隐式权限问题 (此前会被当作通配符处理) 。[#73932](https://github.com/ClickHouse/ClickHouse/pull/73932) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了创建嵌套 Map 时内存占用过高的问题。[#73982](https://github.com/ClickHouse/ClickHouse/pull/73982) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了解析包含空键的嵌套 JSON 时的问题。[#73993](https://github.com/ClickHouse/ClickHouse/pull/73993) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复：如果某个别名被另一个别名引用，且按相反顺序选择，该别名可能不会被添加到投影中。 [#74033](https://github.com/ClickHouse/ClickHouse/pull/74033) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 在初始化 plain\_rewritable 磁盘期间，忽略 Azure 上的“对象不存在”错误。[#74059](https://github.com/ClickHouse/ClickHouse/pull/74059) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了 `any` 和 `anyLast` 在枚举类型及空表上的行为问题。[#74061](https://github.com/ClickHouse/ClickHouse/pull/74061) ([Joanna Hulboj](https://github.com/jh0x)).
* 修复了用户在 Kafka 表引擎中指定关键字参数时出现的问题。[#74064](https://github.com/ClickHouse/ClickHouse/pull/74064) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了修改 Storage `S3Queue` 设置时，将带有 "s3queue\_" 前缀改为不带此前缀，或反向修改时的问题。[#74075](https://github.com/ClickHouse/ClickHouse/pull/74075) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 添加设置 `allow_push_predicate_ast_for_distributed_subqueries`。这为启用 analyzer 的 distributed queries 增加了基于 AST 的谓词下推能力。这是一个临时解决方案，我们会一直使用它，直到支持带有查询计划序列化的 distributed queries。关闭了 [#66878](https://github.com/ClickHouse/ClickHouse/issues/66878) [#69472](https://github.com/ClickHouse/ClickHouse/issues/69472) [#65638](https://github.com/ClickHouse/ClickHouse/issues/65638) [#68030](https://github.com/ClickHouse/ClickHouse/issues/68030) [#73718](https://github.com/ClickHouse/ClickHouse/issues/73718)。[#74085](https://github.com/ClickHouse/ClickHouse/pull/74085) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了一个问题：在 [#73095](https://github.com/ClickHouse/ClickHouse/issues/73095) 之后，`forwarded&#95;for` 字段中可能会带有端口，导致包含端口的主机名无法被解析。[#74116](https://github.com/ClickHouse/ClickHouse/pull/74116) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了 `ALTER TABLE (DROP STATISTICS ...) (DROP STATISTICS ...)` 的格式化错误。[#74126](https://github.com/ClickHouse/ClickHouse/pull/74126) ([Han Fei](https://github.com/hanfei1991)) 。
* 问题 [#66112](https://github.com/ClickHouse/ClickHouse/issues/66112) 的修复。[#74128](https://github.com/ClickHouse/ClickHouse/pull/74128) ([Anton Ivashkin](https://github.com/ianton-ru)) 。
* 现在已无法在 `CREATE TABLE` 中将 `Loop` 用作表引擎。此前，这种组合会导致段错误。[#74137](https://github.com/ClickHouse/ClickHouse/pull/74137) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复安全漏洞，防止 postgresql 和 sqlite 表函数中出现 SQL 注入。[#74144](https://github.com/ClickHouse/ClickHouse/pull/74144) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了从启用压缩的 Memory 引擎表中读取子列时发生崩溃的问题。修复 [#74009](https://github.com/ClickHouse/ClickHouse/issues/74009)。[#74161](https://github.com/ClickHouse/ClickHouse/pull/74161) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了查询 system.detached\_tables 时出现的无限循环问题。[#74190](https://github.com/ClickHouse/ClickHouse/pull/74190) ([Konstantin Morozov](https://github.com/k-morozov)) 。
* 修复了 s3queue 在将文件设为失败状态时的逻辑错误。[#74216](https://github.com/ClickHouse/ClickHouse/pull/74216) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复从基础备份执行 `RESTORE` 时原生复制设置 (`allow_s3_native_copy`/`allow_azure_native_copy`) 的问题。[#74286](https://github.com/ClickHouse/ClickHouse/pull/74286) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了当数据库中处于 detached 状态的表数量恰好是 max\_block\_size 的倍数时出现的问题。[#74289](https://github.com/ClickHouse/ClickHouse/pull/74289) ([Konstantin Morozov](https://github.com/k-morozov)) 。
* 修复了在源端和目标端凭据不一致时，通过 ObjectStorage (即 S3) 进行复制的问题。[#74331](https://github.com/ClickHouse/ClickHouse/pull/74331) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在 GCS 上进行原生复制时，对“在 JSON API 中使用 Rewrite 方法”这一情况的检测问题。[#74338](https://github.com/ClickHouse/ClickHouse/pull/74338) ([Azat Khuzhin](https://github.com/azat)).
* 修复 `BackgroundMergesAndMutationsPoolSize` 计算不正确的问题 (其值此前是实际值的 2 倍) 。[#74509](https://github.com/ClickHouse/ClickHouse/pull/74509) ([alesapin](https://github.com/alesapin)).
* 修复了启用 Cluster Discovery 时 Keeper watches 泄漏的问题。[#74521](https://github.com/ClickHouse/ClickHouse/pull/74521) ([RinChanNOW](https://github.com/RinChanNOWWW)) 。
* 修复了 UBSan 报告的内存对齐问题 [#74512](https://github.com/ClickHouse/ClickHouse/issues/74512)。[#74534](https://github.com/ClickHouse/ClickHouse/pull/74534) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 修复了创建表时 KeeperMap 并发清理的问题。[#74568](https://github.com/ClickHouse/ClickHouse/pull/74568) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在存在 `EXCEPT` 或 `INTERSECT` 的情况下，为了保证查询结果正确，不要在子查询中移除未使用的投影列。修复了 [#73930](https://github.com/ClickHouse/ClickHouse/issues/73930)。修复了 [#66465](https://github.com/ClickHouse/ClickHouse/issues/66465)。[#74577](https://github.com/ClickHouse/ClickHouse/pull/74577) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在具有 `Tuple` 列且启用了稀疏序列化的表之间执行 `INSERT SELECT` 查询时出现的问题。[#74698](https://github.com/ClickHouse/ClickHouse/pull/74698) ([Anton Popov](https://github.com/CurtizJ)).
* 函数 `right` 在 const 负偏移量情况下无法正确工作。[#74701](https://github.com/ClickHouse/ClickHouse/pull/74701) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了 gzip 压缩数据的插入有时会因客户端侧解压缩缺陷而失败的问题。[#74707](https://github.com/ClickHouse/ClickHouse/pull/74707) ([siyuan](https://github.com/linkwk7)).
* 对带有通配符的授权执行部分撤销时，可能会移除超出预期的更多权限。关闭 [#74263](https://github.com/ClickHouse/ClickHouse/issues/74263)。[#74751](https://github.com/ClickHouse/ClickHouse/pull/74751) ([pufit](https://github.com/pufit)) 。
* Keeper 修复：修复从磁盘读取日志条目的问题。[#74785](https://github.com/ClickHouse/ClickHouse/pull/74785) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了对 SYSTEM REFRESH/START/STOP VIEW 的授权检查；现在，对特定视图执行查询时，不再要求在 `*.*` 上拥有此授权，只需拥有该视图的授权即可。[#74789](https://github.com/ClickHouse/ClickHouse/pull/74789) ([Alexander Tokmakov](https://github.com/tavplubix)).
* `hasColumnInTable` 函数未考虑别名列。现已修复，使其也能适用于别名列。[#74841](https://github.com/ClickHouse/ClickHouse/pull/74841) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了在 Azure Blob 存储中，对包含空列的表合并数据分区片段时出现的 FILE\_DOESNT\_EXIST 错误。[#74892](https://github.com/ClickHouse/ClickHouse/pull/74892) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复连接临时表时投影列名错误，关闭 [#68872](https://github.com/ClickHouse/ClickHouse/issues/68872)。[#74897](https://github.com/ClickHouse/ClickHouse/pull/74897) ([Vladimir Cherkasov](https://github.com/vdimir)) 。

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

* 通用安装脚本现在即使在 macOS 上也会提示安装。[#74339](https://github.com/ClickHouse/ClickHouse/pull/74339) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
