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

> 2026 年更新日志

# 2026 年更新日志

<div id="267">
  ### ClickHouse 版本发布 26.7，2026-07-22。 [演示文稿](https://presentations.clickhouse.com/2026-release-26.7/), [视频](https://www.youtube.com/watch?v=mKBNLaFOVDA)
</div>

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

* 默认情况下，来自用户 SQL 的 S3 访问不再解析服务器自身的云凭证 (环境变量、IMDS/IRSA、实例配置文件、AWS 配置文件、基于 `role_arn` 的 STS、GCP OAuth 元数据) ；这类请求必须使用显式凭证或 `NOSIGN`。命名集合现在默认将 `use_environment_credentials` 设为 `0`。如需恢复此前行为，可按请求设置 `use_environment_credentials = 1` (或通过 `<s3>` config 全局设置) ，并配合新的设置 `s3_allow_server_credentials_in_user_queries` (默认禁用) 。显式提供的凭证以及运维预配的 config 凭证不受影响。在 server 启动时或执行 `RESTORE` 时，如果持久化的 `S3`/`S3Queue` 表、动态 S3 disk 或 `DataLakeCatalog` 的定义会解析这类凭证，则会以匿名方式加载 (在重新提供凭证前不可访问) ，而不是中止启动；这一行为由新的 server setting `s3_load_table_anonymously_if_credentials_restricted` 控制 (默认启用) 。[#106855](https://github.com/ClickHouse/ClickHouse/pull/106855) ([Raúl Marín](https://github.com/Algunenano)).
* `**/` glob (任意层级的目录) 现在也会匹配当前目录本身。此前，glob patterns 中的 `**/` 不会作为特殊情况处理，因此 `data/**/file.txt` 不会匹配 `data/file.txt` (零级目录) 。[#97676](https://github.com/ClickHouse/ClickHouse/pull/97676) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 对于存储在对象存储上的备份——包括直接的 `S3(...)`/`AzureBlobStorage(...)` 目标端，以及底层存储为 S3 或 Azure 的 `Disk(...)` 目标端——`BACKUP` 和 `RESTORE` 现在都拒绝使用 `zip`/`zipx` 备份归档格式。Zip 需要通过 seek 读取其中央目录，而这在对象存储上会非常慢。请改用基于 tar 的格式，例如 `tar.gz`。[#101770](https://github.com/ClickHouse/ClickHouse/pull/101770) ([Yash ](https://github.com/Onyx2406)).
* `DateTime64` 的支持范围已从 `[1900-01-01, 2299-12-31]` 扩展到 `[0000-01-01, 9999-12-31]`。此前超出旧范围的值现在会被正确计算 (通过 cctz) ，而不是被截到边界值。对于精度 8 或 9，由于 ticks 以 `Int64` 存储，范围仍然较窄 (纳秒精度下最大值仍为 `2262-04-11`) 。backward compatibility：如果你之前使用过超出范围的日期时间，并依赖旧范围内那套非常特殊的饱和规则，请注意结果现在会发生变化，以获得更正确的行为。[#107907](https://github.com/ClickHouse/ClickHouse/pull/107907) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `AggregatingMergeTree` 现在会在建表时拒绝以下 schema：某列既不属于 sorting key，也不是聚合状态度量 (`AggregateFunction`/`SimpleAggregateFunction`) 。这类列在 background merges 期间会被静默折叠为任意值，从而导致对其执行 `GROUP BY` 或按其过滤的 queries 产生错误结果。设置 `allow_dimensions_outside_sorting_key = 1` 可恢复此前行为。关闭 [#751](https://github.com/ClickHouse/ClickHouse/issues/751)。[#108087](https://github.com/ClickHouse/ClickHouse/pull/108087) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 已移除基于 config 的 Workload scheduling 配置 (server config 中的 `resources` 和 `workload_classifiers` 部分) 。请改用 `CREATE RESOURCE` 和 `CREATE WORKLOAD` queries。已废弃的 config 部分会被忽略，并给出警告。[#108286](https://github.com/ClickHouse/ClickHouse/pull/108286) ([Sergei Trifonov](https://github.com/serxa)).
* ClickHouse 现在对同步插入和异步插入一律使用统一的插入去重哈希；旧版按单次插入去重的行为已被移除。服务器设置 `insert_deduplication_version` 被保留为迁移保护机制：如果其被设为旧值 (`old_separate_hashes` 或 `compatible_double_hashes`) ，服务器将拒绝启动。若要从使用旧值的版本升级，请先运行一个支持 `compatible_double_hashes` 的版本 (该版本会同时写入旧版哈希和统一哈希) 。对于复制表，请至少运行 `replicated_deduplication_window_seconds` 这么长时间 (默认为一小时；默认窗口会在该时间窗口内保留所有插入的统一哈希，这被认为足以覆盖插入重试循环) 。对于 `non_replicated_deduplication_window` > 0 的非复制表，该窗口按计数而非按时间计算，因此请至少在 `compatible_double_hashes` 下运行这么多次插入。然后在升级到此版本之前移除该设置 (或将其设为 `new_unified_hash`) 。[#108361](https://github.com/ClickHouse/ClickHouse/pull/108361) ([Sema Checherinda](https://github.com/CheSema))。如果你从未设置过 `insert_deduplication_version`，可以忽略此项。
* 已移除长期弃用的函数 `snowflakeToDateTime`、`snowflakeToDateTime64`、`dateTimeToSnowflake` 和 `dateTime64ToSnowflake`。它们早在 v24.6 就已被弃用，推荐改用 `snowflakeIDToDateTime`、`snowflakeIDToDateTime64`、`dateTimeToSnowflakeID` 和 `dateTime64ToSnowflakeID`，现在应使用后者。设置 `allow_deprecated_snowflake_conversion_functions` (此前可用于重新启用这些函数) 现已过时且不再生效。[#108711](https://github.com/ClickHouse/ClickHouse/pull/108711) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 设置 `use_legacy_to_time` 现在默认值为 `0`，因此 `toTime` 会将值转换为 `Time` 数据类型，而不是将日期时间转换为固定日期。旧行为仍可通过 `toTimeWithFixedDate` 函数或设置 `use_legacy_to_time = 1` 来使用。[#108729](https://github.com/ClickHouse/ClickHouse/pull/108729) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 朴素贝叶斯模型 (由 `naiveBayesClassifier` 使用) 现在改为配置成采用 `NAIVE_BAYES` 布局的字典，并在加载时根据按类别预聚合的 n-gram 计数表构建，而不再使用此前的服务端配置方式 (即引用已序列化 `.bin` 模型文件的 XML 配置文件) ；该旧方式已不再受支持——现有模型必须重建为字典。除了 `naiveBayesClassifier` 外，还新增了三个函数：`naiveBayesClassifierWithProb` 返回预测类别及其概率，`naiveBayesClassifierWithAllProbs` 返回每个类别及其概率，`naiveBayesNgrams` 以与字典相同的方式将文本切分为 n-gram，用于从原始带标签文本构建训练数据。此外，还进行了多项性能优化：对于一个 9.7 MiB 的 code-point trigram 语言模型，其内存占用减少约 49 倍 (从 1.84 GiB 降至 38 MiB) ，加载速度提升约 11 倍，分类速度也提升约 11 倍。[#108773](https://github.com/ClickHouse/ClickHouse/pull/108773) ([Nihal Z. Miaji](https://github.com/nihalzp))。
* `hasColumnInTable` 函数不再接受可选的 `hostname`、`username` 和 `password` 参数来检查任意远程服务器上的列；现在仅保留 `hasColumnInTable(database, table, column)` 这一形式。被移除的远程模式存在安全隐患：它允许任何用户触发到任意主机的出站连接，并将凭据泄露到查询日志中，而且不受任何权限控制。[#110881](https://github.com/ClickHouse/ClickHouse/pull/110881) ([Alexey Milovidov](https://github.com/alexey-milovidov))。

<div id="267-new-feature">
  #### 新特性
</div>

* 新增 `EXPLAIN ANALYZE`，用于分析查询性能：查询会实际执行，并以熟悉的查询计划格式展示实际执行指标。[#106586](https://github.com/ClickHouse/ClickHouse/pull/106586) ([Kirill Kopnev](https://github.com/Fgrtue)). [#110668](https://github.com/ClickHouse/ClickHouse/pull/110668) ([Kirill Kopnev](https://github.com/Fgrtue)).
* 投影定义现已支持 `WHERE` 子句。带有 `WHERE` 的投影只会物化满足谓词的行；当查询的 `WHERE` 蕴含投影的 `WHERE` 时，优化器可以基于成本使用这些投影。[#102347](https://github.com/ClickHouse/ClickHouse/pull/102347) ([S Bala Vignesh](https://github.com/SBALAVIGNESH123)).
* 新增 `skip_unavailable_shards_mode` 设置 (也可用作 `Distributed` 引擎设置) ，用于控制在启用 `skip_unavailable_shards` 时，来自远程分片的哪些异常会被静默忽略。[#79091](https://github.com/ClickHouse/ClickHouse/pull/79091) ([cjw](https://github.com/byte-sourcerer)).
* 新增 `groupFormat` 聚合函数，可使用指定的输出格式格式化每个分组中的行，并将结果作为字符串返回。[#93201](https://github.com/ClickHouse/ClickHouse/pull/93201) ([Yang Hu](https://github.com/wandersofb)).
* 新增 `AWS_MSK_IAM` 作为 `kafka_sasl_mechanism` 的支持取值，使 ClickHouse 能够通过 IAM 角色向亚马逊 MSK 进行身份验证，而无需管理 SASL/SCRAM 凭证。[#96100](https://github.com/ClickHouse/ClickHouse/pull/96100) ([kalavt](https://github.com/kalavt)).
* 新增聚合函数组合器 `-Tuple`，它会将底层聚合函数分别应用到 `Tuple` 列的每个元素上，并返回由结果组成的 `Tuple`，同时保留元素名称：对于 `t = (a, b)`，`sumTuple(t)` 返回 `(sum(a), sum(b))`。带有多个参数的聚合函数会为每个参数接收一个 `Tuple`，并按位置配对：`corrTuple((a1, a2), (b1, b2))` 返回 `(corr(a1, b1), corr(a2, b2))`。与作用于数组的 `-ForEach` 不同，这些元素可以具有不同类型，并且会保留每个元素的结果类型和名称。[#98190](https://github.com/ClickHouse/ClickHouse/pull/98190) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 文本索引现已支持 `postprocessor` 参数——即可在分词后转换每个标记的任意表达式 (例如 `lower`) 。[#98939](https://github.com/ClickHouse/ClickHouse/pull/98939) ([Jimmy Aguilar Mena](https://github.com/Ergus)). [#108606](https://github.com/ClickHouse/ClickHouse/pull/108606) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 新增 `system.stemmers` 系统表，其中列出了可为 `stem` 函数指定的所有语言。[#100611](https://github.com/ClickHouse/ClickHouse/pull/100611) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 新增对负 `LIMIT` 使用 `WITH TIES` 的支持。[#100930](https://github.com/ClickHouse/ClickHouse/pull/100930) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 新增对标准 SQL 后缀操作符 `AT TIME ZONE` 和 `AT LOCAL` 的支持，作为 `toTimeZone` 的语法糖。表达式 `expr AT TIME ZONE zone` 现在等价于 `toTimeZone(expr, zone)`，而 `expr AT LOCAL` 等价于 `toTimeZone(expr, timeZone())`。[#106092](https://github.com/ClickHouse/ClickHouse/pull/106092) ([lizepeng](https://github.com/lvzhipin03)).
* `URL` 表引擎和 `url` 表函数现在会根据 URL 协议分发到相应的后端：`file://` 由 `File` 表引擎处理，`s3://`/`gs://`/`gcs://`/`oss://` 由 `S3` 处理，`az://`/`azure://`/`abfss://`/`abfs://` 由 `AzureBlobStorage` 处理，`hdfs://` 由 `HDFS` 处理，而 `http(s)://` 仍和之前一样由 `URL` 引擎处理。`url_base` 设置会在按协议分发前应用。只有通过默认 `url_scheme_mappers` 解析出的 S3 协议会被分发；其他兼容 S3 的厂商协议 (`cos`、`obs` 等) 不会被分发，需直接使用 `s3` 引擎/函数。[#106093](https://github.com/ClickHouse/ClickHouse/pull/106093) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增 `Remote` 和 `RemoteSecure` 表引擎，它们分别是 `remote` 和 `remoteSecure` 表函数的持久化对应形式。现在除了 `CREATE TABLE ... AS remote(...)` 之外，还支持 `CREATE TABLE ... ENGINE = Remote('addresses', db, table, ...)`。[#106189](https://github.com/ClickHouse/ClickHouse/pull/106189) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增与引擎无关的 `SYSTEM STOP`、`SYSTEM START`、`SYSTEM PAUSE`、`SYSTEM CANCEL` 和 `SYSTEM REFRESH` 命令，以及它们面向整个服务器的 `... ALL BACKGROUND` 形式，用于通过统一接口控制 `Kafka`、`RabbitMQ`、`NATS`、`S3Queue`/`AzureQueue` 表以及可刷新materialized view 的后台活动。对于可刷新materialized view，这些命令是现有 `SYSTEM ... VIEW` 命令的别名。为支持在 NATS 上使用这些控制，JetStream 表现在仅会在成功 insert 后才确认消息 (至少一次；此前消息会在投递时自动确认，如果 insert 失败则可能丢失) 。新增 `nats_wait_for_flush_interval` 设置 (默认 `false`，保持此前的低延迟行为) ，可选择让一次消费周期在整个 flush 时间间隔内保持开启，而不是在队列清空后立即 flush。新增的 `nats_commit_on_select` 设置会让对 JetStream 表直接执行 `SELECT` 时消费 (确认) 其读取到的消息。[#107476](https://github.com/ClickHouse/ClickHouse/pull/107476) ([Samuel Krempaský](https://github.com/NIKTONIKTO717)).
* 新增支持：`mysql`、`postgresql` 和 `sqlite` 表函数及表引擎现在可以接收用户查询 (而非表名) ，并将其原样传递给外部数据库，写法可以是子查询 `(SELECT ...)` 或 `query('SELECT ...')`。结果表的结构会根据查询结果推断，此类表为只读。关闭 [#46758](https://github.com/ClickHouse/ClickHouse/issues/46758)。基于 [Denis Vidiaev](https://github.com/the-devid) 的初始实现 ([#79652](https://github.com/ClickHouse/ClickHouse/pull/79652)) 。[#107740](https://github.com/ClickHouse/ClickHouse/pull/107740) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* ClickHouse Web UI (Play) 新增了用于同时处理多个查询的选项卡。选项卡及其标题、参数、激活状态和小型结果快照都会在重新加载后保留 (大型结果和图像结果不会恢复) ，并与浏览器历史记录和 URL 集成，还可通过鼠标滚轮切换。[#107826](https://github.com/ClickHouse/ClickHouse/pull/107826) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 引入 `QueryRunner` 表引擎。insert 到 `QueryRunner` 表中的记录表示要由该引擎执行的查询。该引擎可用于异步查询执行、生成查询的批量执行、将查询定向到远程集群、基准测试、模糊测试，以及使用影子流量进行测试。[#107888](https://github.com/ClickHouse/ClickHouse/pull/107888) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增 `GeoJSON` 输出格式，用于写入 [GeoJSON](https://geojson.org/) `FeatureCollection` 文档，每一行生成一个 feature。唯一的 geo 类型列 (`Point`、`LineString`、`MultiLineString`、`Polygon`、`MultiPolygon`、`Ring` 或 `Geometry`) 会成为每个 feature 的 `geometry`；名为 `id` 的列会成为 feature 的 `id`；其余所有列都会成为 feature 的 `properties`。其中，如果只有一个名为 `properties` 的 object 类型列 (`JSON`、`Map` 或具名 `Tuple`) ，则会直接写入为 `properties` 对象。`Ring` 会被写成单环 `Polygon`。新的 `format_geojson_validate_geometry` 设置 (默认启用) 用于控制在读写时，是否拒绝不符合 GeoJSON 形状要求的几何对象——例如点数少于四个的 `Polygon`，或未闭合的 `Polygon` 环。此外，`GeoJSON` 输入格式现在会将 `id` 列推断为 `Nullable(String)`，而不是 `String``因此，缺少 `id`成员或显式包含`"id": null`的 feature 会被读取为`NULL`，并与空字符串 `""\` 区分开来。基于 [Mark Needham](https://github.com/mneedham) 的初始实现 ([#98124](https://github.com/ClickHouse/ClickHouse/pull/98124)) 。[#108065](https://github.com/ClickHouse/ClickHouse/pull/108065) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 新增 `dotProductTransposed` 函数 (别名 `scalarProductTransposed`) ，用于计算 `QBit` 列与参考向量之间的近似内积，补充了现有的 `L2DistanceTransposed` 和 `cosineDistanceTransposed` 函数。[#108100](https://github.com/ClickHouse/ClickHouse/pull/108100) ([Alexey Milovidov](https://github.com/alexey-milovidov))。同时新增量化转置距离函数 `cosineDistanceTransposedQuantized`、`L2DistanceTransposedQuantized` 和 `dotProductTransposedQuantized`，用于处理包含 `quantizeBFloat16ToInt8` Lloyd-Max 编码的 `QBit(Int8)`，并在运行时动态对存储的编码进行反量化。浮点参考向量表示全精度查询，并以 `Float32` 精度进行比较 (`Float64` 查询会被收窄) ；`Array(Int8)` 参考向量本身也会被反量化，从而实现对称的 quantized-vs-quantized distance。[#109405](https://github.com/ClickHouse/ClickHouse/pull/109405) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `QBit` 数据类型新增可选的 stride 参数 (`QBit(T, dimension, stride)`) ，可将不同维度分组存储到独立的数据流中，从而让 vector search 能够高效地仅读取前几个维度 (例如用于 Matryoshka embeddings) 。转置距离函数还支持可选的第四个 `used_dims` 参数，用于读取缩减后的维度数。[#108103](https://github.com/ClickHouse/ClickHouse/pull/108103) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `QBit` 数据类型新增对 `Int8` 元素类型的支持，从而可以存储量化后的 8 位整数向量，并基于其执行转置距离 vector search (`L2DistanceTransposed`、`cosineDistanceTransposed`) 。[#108105](https://github.com/ClickHouse/ClickHouse/pull/108105) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新函数 `randomHadamardTransform(vector[, seed[, output_dims]])`：对浮点向量执行确定性的随机 Hadamard transform——这是一种保持正交性和范数不变的旋转，适合在量化前对嵌入向量进行预处理；在截断时，还可作为 Johnson–Lindenstrauss / subsampled-randomized-Hadamard 随机投影。[#108227](https://github.com/ClickHouse/ClickHouse/pull/108227) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持在字典定义中使用 `dictionary_lazy_load` 设置，按字典单独配置 lazy loading，并覆盖全局的 `dictionaries_lazy_load` 服务器设置，因此某些字典可以延迟加载，而其他字典则可以预先加载。[#108314](https://github.com/ClickHouse/ClickHouse/pull/108314) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 新增内置文档搜索页面，可通过 HTTP interface 的 `/docs` 路径访问，支持对 `system.documentation` 表进行即时搜索，并渲染参考文档 (包含语法高亮、数学公式和交叉链接) 。[#108345](https://github.com/ClickHouse/ClickHouse/pull/108345) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增函数 `xxHash64Spark`，使用种子 `42` 为 `String` 和 `NULL` 输入计算与 Spark 兼容的 `xxHash64` 值，并返回 `Int64`。[#108436](https://github.com/ClickHouse/ClickHouse/pull/108436) ([Lalit Yadav](https://github.com/lalitium)) 。
* `ALTER USER`、`ALTER ROLE` 和 `ALTER SETTINGS PROFILE` 现已支持将 `SET name = value` 作为 `MODIFY SETTING name = value` 的别名。它会原地修改单个 setting，同时保留其余设置；而裸 `SETTINGS` 子句则会替换整个 settings 列表。这样可降低误清除用户其他设置的风险。[#108722](https://github.com/ClickHouse/ClickHouse/pull/108722) ([Groene AI](https://github.com/groeneai)) 。
* 支持 `ALTER TABLE ... MODIFY CONSTRAINT [IF EXISTS] name CHECK expr`，可原地修改现有约束的 expression。[#108768](https://github.com/ClickHouse/ClickHouse/pull/108768) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* Web UI：新增按列设置的 color coding 切换开关 (列标题中的 🌈 图标) ，可在条形图、热力图、categorical 和无 visualization 之间切换。所选模式会保存在 URL 和浏览器历史记录中。[#108873](https://github.com/ClickHouse/ClickHouse/pull/108873) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `Keeper` 现已能正确处理 `ZooKeeper` 的 `CreateContainer` 操作码 (19)，该功能受新的可选 `create_container` feature flag 控制 (默认禁用，与 `create_ttl` 相同) 。在整个 ensemble 完成升级后启用该功能，外部 `ZooKeeper` clients (如 Java `ZooKeeper` 3.9+) 即可在 `Keeper` 上创建容器节点，而不会再收到 `ConnectionLoss`；容器节点会报告预期的 `ephemeralOwner` 哨兵值，leader 上的后台 GC 线程也会自动删除无子节点的容器。携带 `CONTAINER` create-mode 标志但未使用操作码 19 的普通 `Create` request 仍会被拒绝 (`ZBADARGUMENTS`) ：目前没有已知的 `ZooKeeper` client 会发出这种组合。这仅涉及 server-side protocol compatibility：ClickHouse 自带的 `ZooKeeper` client (`zkutil`) 没有变化，也没有可自行创建容器节点的 API。[#108908](https://github.com/ClickHouse/ClickHouse/pull/108908) ([unintended](https://github.com/unintended)) 。
* 新增函数 `geoToUTM`、`UTMToGeo`、`geoToMGRS` 和 `MGRSToGeo`，用于在 WGS84 地理坐标与 UTM、MGRS 坐标系之间进行转换。[#108939](https://github.com/ClickHouse/ClickHouse/pull/108939) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `digits(n, offset[, length])` 函数，返回 `n` 中从 1-based `offset` 开始、长度为 `length` 的数字；如果省略 \`length\`\`，则一直返回到该数字的末尾。[#109012](https://github.com/ClickHouse/ClickHouse/pull/109012) ([Umang Agrawal](https://github.com/1000ms)) 。
* 新增 `sqr` 算术函数，用于计算一个数的平方。[#109061](https://github.com/ClickHouse/ClickHouse/pull/109061) ([Lalit Yadav](https://github.com/lalitium)) 。
* 新增函数 `dictGetRoot`，用于返回层级字典中某个键的最高层祖先 (根节点) 。它是 `dictGetHierarchy(dict_name, key)[-1]` 的便捷等价写法。[#109459](https://github.com/ClickHouse/ClickHouse/pull/109459) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `SYSTEM UNLOAD DICTIONARY` 和 `SYSTEM UNLOAD DICTIONARIES` 命令，可在不删除字典定义的情况下释放字典占用的内存。字典会在下次访问时按需重新加载。[#109639](https://github.com/ClickHouse/ClickHouse/pull/109639) ([Matheus Nerone](https://github.com/Manerone)) 。
* 新增函数 `geometryIntersectCartesian` 和 `geometryIntersectSpherical`，用于判断两个几何对象是否相交。与 `polygonsIntersectCartesian`/`polygonsIntersectSpherical` 不同，它们接受任意几何数据类型 (`Point`、`LineString`、`MultiLineString`、`Ring`、`Polygon`、`MultiPolygon`) ，包括通用的 `Geometry` 类型，且两个参数可以是不同类型。[#110062](https://github.com/ClickHouse/ClickHouse/pull/110062) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 查询参数 (`{name:Type}` 替换) 现在也可用作设置值，既可用于查询的 `SETTINGS` 子句 (如 `SELECT` 或 `INSERT`) ，也可用于独立的 `SET` 查询，例如 `SELECT ... SETTINGS max_threads = {threads:UInt64}` 和 `SET max_threads = {threads:UInt64}`。[#108760](https://github.com/ClickHouse/ClickHouse/pull/108760) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* `url` 表函数和 `URL` 表引擎的通配符展开：通过列出 HTTP 索引页 (HTML 或 plaintext 目录列表) 并提取匹配的 URL，可以展开 URL 路径中的通配符，同时对索引页大小和读取的目录数量施加限制。通过 `allow_experimental_url_wildcard_from_index_pages` 设置启用。[#95181](https://github.com/ClickHouse/ClickHouse/pull/95181) ([Yue Ni](https://github.com/niyue))。
* 文本索引现在可以存储词元位置 (`support_phrase_search` 索引参数) ，从而为 `hasPhrase` 函数启用基于直接读取的精确短语匹配。需要启用 `MergeTree` 设置 `allow_experimental_text_index_phrase_search`。[#103172](https://github.com/ClickHouse/ClickHouse/pull/103172) ([Elmi Ahmadov](https://github.com/ahmadov))。该参数最初以 `positions` 这一名称引入。[#109900](https://github.com/ClickHouse/ClickHouse/pull/109900) ([Elmi Ahmadov](https://github.com/ahmadov))。
* `Iceberg` 表现已支持通过 `OPTIMIZE TABLE ... MANIFEST` 进行 manifest 文件合并整理 (受 `allow_experimental_iceberg_compaction` 设置控制) 。解决了 [#95174](https://github.com/ClickHouse/ClickHouse/issues/95174)。[#98178](https://github.com/ClickHouse/ClickHouse/pull/98178) ([Smita Kulkarni](https://github.com/SmitaRKulkarni))。修复了 `Iceberg` 表在 manifest 分区元组与其分区规范不匹配时 `OPTIMIZE TABLE ... MANIFEST` 的问题。[#111368](https://github.com/ClickHouse/ClickHouse/pull/111368) ([Smita Kulkarni](https://github.com/SmitaRKulkarni))。
* 为实验性的 `ALP` 编解码器新增了 Real Doubles (RD) 变体，以及可选的 `ALP(AUTO|STD|RD)` 参数。现在，裸 `ALP` 会在现有的 `STD` 方案和 `RD` 之间自动选择，而不再始终使用 `STD`。[#99654](https://github.com/ClickHouse/ClickHouse/pull/99654) ([Nazarii Piontko](https://github.com/nazarii-piontko))。
* 为反序列化后的 `Paimon` 元数据文件 (manifest 列表和 manifests) 新增了内存 SLRU 缓存。通过 `use_paimon_metadata_files_cache` 设置启用后，对同一个 `Paimon` 表的重复查询将跳过从 object storage 重新下载和重新解析元数据。[#104657](https://github.com/ClickHouse/ClickHouse/pull/104657) ([XiaoBinMu](https://github.com/Binnn-MX))。
* 为可执行用户自定义函数新增了“驱动”。在 `<user_defined_executable_function_drivers_config>` 中声明的驱动可用于 `CREATE FUNCTION name ARGUMENTS (...) RETURNS T ENGINE = DriverName(...) AS '...code...'`，以便在函数创建时编译或以其他方式处理用户代码片段，并生成可运行的 executable UDF。生成的配置会存储在 `<dynamic_user_defined_executable_functions_path>` 中，而原始查询会以 `ATTACH FUNCTION` 的形式持久化，因此该函数在服务器重启后仍可保留。概念验证版 `c_function_body` 驱动可在 `executable_pool` 模式下，在沙箱化的 Docker 容器中编译并运行 C 函数体。基于 [Daniil Timižev](https://github.com/dahbka-lis) 的初始实现 ([#77128](https://github.com/ClickHouse/ClickHouse/pull/77128)) 。[#105131](https://github.com/ClickHouse/ClickHouse/pull/105131) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 当谓词能够将列精确划分为默认值和非默认值时，可直接根据 `serialization.json` 中按列统计的稀疏性信息返回 `SELECT count(*) FROM t WHERE col <op> default(col)` 的结果，无需进行任何数据扫描 (由新的实验性设置 `optimize_trivial_count_with_sparsity_filter` 控制，默认关闭) 。[#105890](https://github.com/ClickHouse/ClickHouse/pull/105890) ([Raúl Marín](https://github.com/Algunenano))。
* 发送到 `/api/v1/query` 和 `/api/v1/query_range` 的 Prometheus Query API 请求现在会记录到 `system.query_log` 中，并带有 `read_rows` 和 `read_bytes` 指标。[#106611](https://github.com/ClickHouse/ClickHouse/pull/106611) ([James Cunningham](https://github.com/JTCunning))。
* Experimental `ReaderExecutor` 读取路径 (`use_reader_executor`，默认关闭) 现在可以保持远程源连接处于打开状态，并在顺序读取之间复用，从而减少扫描时对对象存储的请求次数。[#107735](https://github.com/ClickHouse/ClickHouse/pull/107735) ([Sema Checherinda](https://github.com/CheSema))。现在它还支持读取加密文件，并提供全局加密请求头缓存，可通过 `encryption_header_cache_size` 服务器设置进行配置，并可通过 `SYSTEM DROP ENCRYPTION HEADERS CACHE` 清除。[#109702](https://github.com/ClickHouse/ClickHouse/pull/109702) ([Sema Checherinda](https://github.com/CheSema))。
* 启用 `make_distributed_plan` 后，支持在 `MergeTree` 家族表上对 `SELECT ... FINAL` 执行分布式查询计划读取。[#108148](https://github.com/ClickHouse/ClickHouse/pull/108148) ([Alexander Gololobov](https://github.com/davenger))。
* 为 `MergeTree` 查询新增基于执行计划的 Experimental 并行副本执行。[#108504](https://github.com/ClickHouse/ClickHouse/pull/108504) ([Igor Nikonov](https://github.com/devcrafter))。
* 新增 Experimental `Quantize` 向量编解码器家族，以及一种可选启用的、针对量化配套流的两阶段近似向量搜索 Rewrite。[#108565](https://github.com/ClickHouse/ClickHouse/pull/108565) ([Shankar Iyer](https://github.com/shankar-iyer))。
* 恢复了 Experimental `SZ3` 有损压缩编解码器 (带误差界限) ，适用于 `Float32`/`Float64` (及其数组) 列，最初由 [Konstantin Vedernikov](https://github.com/scanhex12) 实现 ([#83088](https://github.com/ClickHouse/ClickHouse/pull/83088)) 。它需要 `allow_experimental_codecs`。[#108788](https://github.com/ClickHouse/ClickHouse/pull/108788) ([Alexey Milovidov](https://github.com/alexey-milovidov))。修复了读取使用 `SZ3('ALGO_LORENZO_REG', ...)` 压缩的数据时的问题，此前会因 `CORRUPTED_DATA` 而失败；同时避免了在压缩非有限浮点值 (`NaN` 和无穷大) 时出现未定义行为。[#110762](https://github.com/ClickHouse/ClickHouse/pull/110762) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 新增 Experimental `ZXC` 编解码器——一种非对称 LZ 编解码器，压缩较慢但解压非常快，压缩率介于 `LZ4` 和 `ZSTD` 之间。它需要 `allow_experimental_codecs = 1`，并且 `system.compression_codecs` 会将其标记为 experimental。[#110620](https://github.com/ClickHouse/ClickHouse/pull/110620) ([Alexey Milovidov](https://github.com/alexey-milovidov))。[#111007](https://github.com/ClickHouse/ClickHouse/pull/111007) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 现在你可以通过 `onelake_bearer_token` 设置，使用预先获取的 Bearer 令牌对 OneLake 进行身份验证，而不必使用 `onelake_client_id` 和 `onelake_client_secret`。这样可以避免共享长期有效的客户端密钥。该令牌不会自动刷新，因此一旦过期，必须重新创建数据库。[#109104](https://github.com/ClickHouse/ClickHouse/pull/109104) ([Asya Shneerson](https://github.com/asya-ch))。
* AI functions 不再将 named collection 作为第一个位置参数。凭据来自 `ai_function_text_default_credentials` / `ai_function_embedding_default_credentials` 设置，或者来自可选末尾 `Map(String, String)` 参数中的 `credentials` 键；该参数还可携带可调参数 (`model`、`max_tokens`、`temperature`、`system_prompt`、`instructions`、`dimensions`) 。[#109232](https://github.com/ClickHouse/ClickHouse/pull/109232) ([George Larionov](https://github.com/george-larionov))。`aiEmbed` 函数现在将 `model` 作为必需的位置参数 (`aiEmbed(text, model[, params])`) ，而不是从 named collection 中读取它，这可确保嵌入向量结果的可复现性。[#110619](https://github.com/ClickHouse/ClickHouse/pull/110619) ([George Larionov](https://github.com/george-larionov))。
* 修复了打包到 `skp_idx.packed` 中的跳数索引的 `data_uncompressed_bytes` (通过 `packed_skip_index_max_bytes`) ：此前报告的未压缩大小实际上是压缩后大小，这也可能导致 `distributed_index_analysis` 无法启用。[#109272](https://github.com/ClickHouse/ClickHouse/pull/109272) ([Raúl Marín](https://github.com/Algunenano)).
* 为 `MergeTree` 表新增了实验性的打包数据分区片段存储：该功能会将一个分区片段的大多数文件存放在单个 `data.packed` 归档中，而不是每个流对应一个文件 (projections 和少数 service file，例如 `txn_version.txt`，仍会单独写入) 。它由 `min_bytes_for_full_part_storage`、`min_rows_for_full_part_storage` 和 `min_level_for_full_part_storage` 设置控制，默认禁用。一旦某个表写入了打包分区片段，旧版 server 将无法读取它们，因此启用该格式后将无法将 server 降级。[#108118](https://github.com/ClickHouse/ClickHouse/pull/108118) ([Raúl Marín](https://github.com/Algunenano)).
* 新增了实验性的 table function `eval`，它会将常量 expression 求值为查询字符串，并执行生成的单条 `SELECT` 查询。该功能默认禁用，可通过 `allow_experimental_eval_table_function` 设置启用。作者：[Yue Ni](https://github.com/niyue)。[#110132](https://github.com/ClickHouse/ClickHouse/pull/110132) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为实验性的 Prometheus remote-write v1 HTTP handler 新增了 `zstd` 压缩支持。[#110907](https://github.com/ClickHouse/ClickHouse/pull/110907) ([James Cunningham](https://github.com/JTCunning)).
* `DeltaLake` 表写入 (`allow_experimental_delta_lake_writes` 设置) 已提升为 Beta。[#107034](https://github.com/ClickHouse/ClickHouse/pull/107034) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 新增了 `ProfileEvents` `DistributedPlanRemoteTasks`、`DistributedPlanLocalExecution` 和 `DistributedPlanHostsUsed`，用于观测实验性 distributed query plan (`make_distributed_plan`) 的执行情况。[#107985](https://github.com/ClickHouse/ClickHouse/pull/107985) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 移除了 Keeper 中基于 RocksDB 的实验性存储 (`experimental_use_rocksdb`) 。一种更好的新型磁盘存储即将推出。[#108000](https://github.com/ClickHouse/ClickHouse/pull/108000) ([Michael Kolupaev](https://github.com/al13n321)).
* Distributed 索引分析 (由 `distributed_index_analysis` 设置控制的一项实验性功能) 现在会将大型数据分区片段名称列表作为标量发送到 remote server，而不是将其嵌入查询文本中。这避免了因 `max_ast_elements` / `max_query_size` 限制导致的潜在失败，并消除了 AST 解析开销。[#110419](https://github.com/ClickHouse/ClickHouse/pull/110419) ([Azat Khuzhin](https://github.com/azat)).
* 优化了实验性的 `timeSeries*ToGrid` 聚合函数：桶现在会同时按 step 和 window 对齐，并且当 window 远大于 step 时，最终聚合速度会快得多。聚合状态的 serialization format 发生了不兼容变更 (这些函数仍属实验性) 。[#106724](https://github.com/ClickHouse/ClickHouse/pull/106724) ([Vitaly Baranov](https://github.com/vitlibar)).
* `TimeSeries` 表的外部目标端表现在会注册为引用依赖：与 materialized view 类似，这意味着在删除引用它的 `TimeSeries` 表之前，不能先删除外部目标端表 (如果启用了 `check_referential_table_dependencies`) 。[#108388](https://github.com/ClickHouse/ClickHouse/pull/108388) ([Vitaly Baranov](https://github.com/vitlibar)).
* 新增了 PromQL 函数 `increase`。[#111023](https://github.com/ClickHouse/ClickHouse/pull/111023) ([Vitaly Baranov](https://github.com/vitlibar)).

<div id="267-performance-improvement">
  #### 性能提升
</div>

* `JOIN` 现在可以利用左侧表上的主键索引或跳过索引来裁剪粒度。由设置 `enable_join_runtime_filters_index_analysis` 控制。[#109085](https://github.com/ClickHouse/ClickHouse/pull/109085) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 现在，对可直接序列化类型向量的序列化和反序列化，会使用单次缓冲区 I/O 调用，而不再逐个处理元素。[#89842](https://github.com/ClickHouse/ClickHouse/pull/89842) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 优化逆向字典查找：常量相等谓词 (例如 `WHERE dictGet(dict, attr, key_expr) = value`) 现在会直接常量折叠为键过滤条件 (`key_expr = const`、`key_expr IN [...]` 或 `WHERE 0`) ，而不是改写为 `IN (SELECT ... FROM dictionary(...))` 子查询；同时，`dictGetKeys` 的常量路径现在也会并行执行。[#91164](https://github.com/ClickHouse/ClickHouse/pull/91164) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增设置 `merge_tree_generic_exclusion_search_max_steps`，用于限制通用排除搜索算法在分析每个数据分片的主键索引时可使用的步数。该预算会优先用于最大的剩余键范围，因此即使预算很小，也能裁剪掉大部分数据；未被完全分析的范围会整体读取，因此查询结果仍然正确，但可能会读取更多粒度。该限制是宽松生效的：最多可能超出 `merge_tree_coarse_index_granularity` 步，再加上该分片当前已划分出的每个范围各 1 步 (例如由查询条件缓存划分时) 。默认值 0 表示步数不受限制。[#92779](https://github.com/ClickHouse/ClickHouse/pull/92779) ([Michael Jarrett](https://github.com/EmeraldShift)) 。
* 现在，针对 `Distributed` 表之上视图的 `ORDER BY` 和 `LIMIT` 查询，会使用 merge-sorted-streams 优化：外层 `ORDER BY`/`LIMIT` 会下推到简单视图的内部查询中，因此每个分片都会在本地对数据排序，而协调节点只需合并预排序的流，无需执行完整排序。[#94102](https://github.com/ClickHouse/ClickHouse/pull/94102) ([matanper](https://github.com/matanper)) 。
* 默认启用 `optimize_or_like_chain`。关闭 [#87779](https://github.com/ClickHouse/ClickHouse/issues/87779)。[#94517](https://github.com/ClickHouse/ClickHouse/pull/94517) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将不带生存时间 (TTL) 的轮转非复制表 `MergeTree` 系统日志表标记为 `table_readonly`，以避免不必要的后台操作。`table_readonly` `MergeTree` 设置现在还会抑制普通 `MergeTree` 表上的所有后台工作——常规合并、TTL (`DELETE`/`MOVE`/重新压缩) 以及重新压缩合并、后台变更和后台分片移动——并且会拒绝会修改分区的命令 (针对该表的 `ATTACH`/`MOVE`/`DROP`/`DROP DETACHED`/`FETCH`/`REPLACE PARTITION` 以及 `MOVE PARTITION ... TO TABLE`) ；除此之外，它原本就会拒绝 inserts、mutations 和 `OPTIMIZE`。因此，在启用该设置时，带 TTL 的 `table_readonly` 表将不再回收其已过期数据。[#95079](https://github.com/ClickHouse/ClickHouse/pull/95079) ([Mathuranath Metivier](https://github.com/matt-metivier)) 。
* 当服务器拥有大量用户时，提升从 `system.users` 读取单条用户记录的性能。[#96699](https://github.com/ClickHouse/ClickHouse/pull/96699) ([Alistair Evans](https://github.com/alistairjevans)) 。
* 使用并行副本按序读取时，现在会采用与本地读取相同的逻辑，将表拆分为 `max_threads` 个部分，以获得更好的并行性。[#101434](https://github.com/ClickHouse/ClickHouse/pull/101434) ([Nikita Taranov](https://github.com/nickitat)) 。
* 当主键列同时也是分区键的输入列时，`MergeTree` 表在进行主键分析时会利用分区 minmax 索引边界来裁剪更多粒度。例如，对于使用 `ORDER BY (id, event_time)` 和 `PARTITION BY toYYYYMM(event_time)` 的 `MergeTree` 表，ClickHouse 会在主键索引分析期间使用 `event_time` 上的分区 minmax 索引，从而做出更准确的粒度裁剪决策。由新设置 `use_partition_minmax_for_primary_key_pruning` 控制 (默认启用) 。[#103480](https://github.com/ClickHouse/ClickHouse/pull/103480) ([UnamedRus](https://github.com/UnamedRus)).
* 为使用 Top-K 动态筛选 (`ORDER BY ... LIMIT n`) 的查询启用查询条件缓存。缓存条目会按 Top-K 执行计划参数分区，因此相同查询会复用缓存的 `WHERE` 过滤结果，而不同的 `LIMIT`、排序列或排序方向则会生成新的条目。[#104478](https://github.com/ClickHouse/ClickHouse/pull/104478) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增 `use_constant_folding_in_index_analysis` 设置 (默认禁用) 。启用后，`MergeTree` 主键、`MinMax` 以及数据跳过索引分析会针对每个分片分别将分区级常量折叠到过滤谓词中，从而提升这类过滤条件的裁剪效果：其分支依赖于分区值，例如在 `PARTITION BY a` 时的 `(a = 1 AND b >= 1) OR (a = 2 AND b > 10)`。[#104582](https://github.com/ClickHouse/ClickHouse/pull/104582) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 将 `LIMIT` 下推到按序聚合中，使得当 `GROUP BY` 键与 `ORDER BY` 键及表排序键一致时可以提前终止，从而显著减少读取的行数。[#104859](https://github.com/ClickHouse/ClickHouse/pull/104859) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 现在更新 profile events 的速度最高可提升 30 倍，方法是对全局服务器级和每用户计数器使用按 CPU 划分的原子操作。由 `user_profile_events_per_cpu` server setting 控制 (在 64 核上每个用户大约会占用 640 KiB，因此当用户数量非常大时，继续保持禁用可能更合适) 。[#105056](https://github.com/ClickHouse/ClickHouse/pull/105056) ([Azat Khuzhin](https://github.com/azat)).
* 默认启用 `allow_aggregate_partitions_independently`。当 `GROUP BY` 键适合分区键时，ClickHouse 可以对每个分区独立执行聚合，并跳过全局 merge 步骤。运行时启发式规则会在分区布局不利于该优化时自动跳过它 (例如分区过少、分区过多，或分区大小严重倾斜) 。[#105128](https://github.com/ClickHouse/ClickHouse/pull/105128) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 带重评分的向量搜索查询 (`vector_search_with_rescoring = 1`) 现在只会对向量索引返回的行计算精确距离，应用精确的行位置过滤器，而不再对同一 `MergeTree` 粒度中的相邻行进行穷举重评分。[#105591](https://github.com/ClickHouse/ClickHouse/pull/105591) ([Sergey Kuznetsov](https://github.com/skuznetsov)). [#108846](https://github.com/ClickHouse/ClickHouse/pull/108846) ([Sergey Kuznetsov](https://github.com/skuznetsov)).
* 通过一次比较整段值，而不是为每个值分别调用一次比较操作，提升 `partial_merge` join algorithm 在 `FixedString` 键上的性能。[#105737](https://github.com/ClickHouse/ClickHouse/pull/105737) ([Artem Zuikov](https://github.com/4ertus2)).
* 数据湖 catalog (Iceberg REST、Glue、Unity、Hive、Paimon) 上的 `SHOW TABLES` 和 `system.tables` 现在会将带命名空间约束的谓词下推到 catalog，从而避免扫描整个 catalog。修复 [#105022](https://github.com/ClickHouse/ClickHouse/issues/105022)。[#106029](https://github.com/ClickHouse/ClickHouse/pull/106029) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 限制每个 CPU 的未跟踪内存，以避免 overcommit 和内存不足错误 (这些限制可通过 `max_per_cpu_untracked_memory` 和 `per_cpu_untracked_memory_thread_buffer` 服务器设置进行配置) 。[#106055](https://github.com/ClickHouse/ClickHouse/pull/106055) ([Azat Khuzhin](https://github.com/azat)).
* 加速对已排序流中相同键值连续段的扫描操作——包括按顺序执行的 `DISTINCT`、按顺序执行的 `LIMIT BY`、按顺序执行的负 `LIMIT BY`，以及 `full_sorting_merge` 和 `partial_merge` join。[#106502](https://github.com/ClickHouse/ClickHouse/pull/106502) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 为 `Arrow` 和 `ArrowStream` 格式实现了原生读取器和写入器，不再依赖 Apache Arrow 库，从而避免额外的数据复制和转换。现在它已成为默认实现 (设置 `input_format_arrow_use_native_reader` 和 `output_format_arrow_use_native_writer`) ，并且无论读取还是写入都更快。[#106522](https://github.com/ClickHouse/ClickHouse/pull/106522) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在修复了 LTO 下出现的线程缓存损坏问题后，重新为 jemalloc 启用 LTO，从而提升性能。[#106898](https://github.com/ClickHouse/ClickHouse/pull/106898) ([Azat Khuzhin](https://github.com/azat)).
* 降低了内存占用并提升了 `JOIN` 性能。哈希 join 的右侧现在使用紧凑的 8 字节索引式行引用，因此对所有连接键类型，`ALL` join 的哈希表条目现在都与 `ANY` join 一样小。基于大型 `parallel_hash` join 查询的基准测试显示：在 `UInt64` 和 `String` 连接键上，对包含唯一键和重复键的 1 亿到 3 亿行表执行 `INNER` 和 `ANY` join 时，查询中位数速度提升约 12%，峰值内存占用降低约 15%，且没有任何查询变慢。`UInt64` 连接键上的 `INNER` join 收益最大 (中位数快约 21%，内存减少 38%) 。[#107189](https://github.com/ClickHouse/ClickHouse/pull/107189) ([Harikrishnan Prabakaran](https://github.com/harikrishnan94)).
* 哈希 join 现已原生支持单列非 Nullable `LowCardinality(String)` 连接键。[#107264](https://github.com/ClickHouse/ClickHouse/pull/107264) ([Nikita Taranov](https://github.com/nickitat)).
* 新增 `dpsub` join 顺序枚举算法 (对子集进行动态规划) ；与 `dpsize` 相比，它能以更低的优化开销生成最优查询计划，并支持非 inner join。[#107351](https://github.com/ClickHouse/ClickHouse/pull/107351) ([Fisnik Kastrati](https://github.com/fkastrati)).
* 通过将每个缓存文件的大小编码到文件名中 (`<offset>_<size>`) ，避免对每个文件执行一次 `stat`，从而加快启动时的文件系统缓存加载。仍然支持加载由旧版本写入的缓存文件。[#107415](https://github.com/ClickHouse/ClickHouse/pull/107415) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过避免不必要的字符串物化，提升了 `Array(LowCardinality(String))` 上 `arrayElement` 的性能，以及键或值为 `LowCardinality(String)` 的 `Map` 上 map `LIKE` 函数的性能。[#107450](https://github.com/ClickHouse/ClickHouse/pull/107450) ([Michael Jarrett](https://github.com/EmeraldShift)).
* 通过跟踪聚合状态本身的内存，而不是整个查询的内存，在内存占用较小时避免将单层 aggregation 转换为双层 aggregation。[#107490](https://github.com/ClickHouse/ClickHouse/pull/107490) ([Hechem Selmi](https://github.com/m-selmi)).
* 加快了对聚合查询的分析：聚合哈希表大小统计信息的缓存键现在基于查询计划计算，而不再构建完整的查询 AST。[#107643](https://github.com/ClickHouse/ClickHouse/pull/107643) ([Dmitry Novik](https://github.com/novikd)).
* 通过按行值而不是使用 SipHash 对每一行进行哈希来为多重集建立键，将 `INTERSECT ALL` 和 `EXCEPT ALL` (`INTERSECT` 和 `EXCEPT` 的默认模式) 的性能提升了数倍。[#107649](https://github.com/ClickHouse/ClickHouse/pull/107649) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在不持有缓存锁的情况下重建行级策略过滤器，从而提升并发执行 `CREATE ROW POLICY` 和 `DROP ROW POLICY` 时的查询可扩展性。[#107917](https://github.com/ClickHouse/ClickHouse/pull/107917) ([Azat Khuzhin](https://github.com/azat)) 。
* 通过使用 LLVM 将简单正则表达式编译为原生代码，加速 `match`、`extract`、`extractAll`、`replaceRegexpOne` 和 `replaceRegexpAll` 函数。该功能由新设置 `compile_regular_expressions` 控制 (默认启用) ；超出支持子集的模式会透明地回退到 RE2 引擎。[#108004](https://github.com/ClickHouse/ClickHouse/pull/108004) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过使用 NEON 对短偏移重叠复制进行向量化，提升了 AArch64 (ARM) 上小匹配偏移列 (例如定宽整数列) 的 ZSTD 解压速度。例如，在 AWS Graviton 4 上，`UInt64` 列的解压速度最高可提升约 2.3 倍。[#108049](https://github.com/ClickHouse/ClickHouse/pull/108049) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 对 `.gz`/HTTP/`url`/`s3` 数据以及 Parquet GZIP codec，使用 `libdeflate` 库进行 gzip/zlib/deflate 压缩和解压，进一步提升了速度 (压缩约 1.15×，且压缩率更优；解压约 1.4–1.5×) 。[#108074](https://github.com/ClickHouse/ClickHouse/pull/108074) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 提升了与主键过滤器结合使用的文本搜索查询性能。[#108114](https://github.com/ClickHouse/ClickHouse/pull/108114) ([Anton Popov](https://github.com/CurtizJ)) 。
* 利用查询首次运行期间收集的运行时统计信息来优化后续运行：`hash` join 算法可根据收集到的统计信息自动切换到 `parallel_hash`。[#108125](https://github.com/ClickHouse/ClickHouse/pull/108125) ([Hechem Selmi](https://github.com/m-selmi)) 。此外，还会利用运行时 join 统计信息中的哈希表大小来优化 JOIN 运行时过滤器的大小，由新设置 `join_runtime_filter_size_from_hash_table_stats` 控制。[#108313](https://github.com/ClickHouse/ClickHouse/pull/108313) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 提升了定长、低基数列的 LZ4 解压速度。[#108175](https://github.com/ClickHouse/ClickHouse/pull/108175) ([Nikita Taranov](https://github.com/nickitat)) 。
* 加速默认空白字符的 `trimLeft`/`trimRight`/`trimBoth` 函数 (以及它们的别名 `ltrim`/`rtrim`/`trim`) ：对于无需裁剪的连续行，会一次性按单个批次复制；而逐行扫描空格则只会对实际存在前导或尾随空格的行执行。[#108177](https://github.com/ClickHouse/ClickHouse/pull/108177) ([Groene AI](https://github.com/groeneai)) 。
* 当 pattern 为单个字符且 replacement 为单个字符时，提升 `replaceAll` 和 `replaceRegexpAll` 的性能 (例如 `replaceRegexpAll(s, ' ', '_')`) 。这类替换不再改变字符串布局，因此现在只需复制一次该列，并在原地重写匹配字节，而不再执行逐次匹配的搜索循环。[#108178](https://github.com/ClickHouse/ClickHouse/pull/108178) ([Groene AI](https://github.com/groeneai)) 。
* 使用常量 Polygon 提升 `pointInPolygon` 函数的性能。预处理后的 Polygon 缓存现在以原始常量参数作为键，因此常量 Polygon 只会在发生 cache miss 时解析一次，而不再需要对每个输入块重复解析。[#108184](https://github.com/ClickHouse/ClickHouse/pull/108184) ([Groene AI](https://github.com/groeneai)).
* 在 best-effort 模式下 (`date_time_input_format = 'best_effort'`、`cast_string_to_date_time_mode = 'best_effort'`，也是默认值) ，加快了对规范 `YYYY-MM-DD hh:mm:ss` 日期时间格式的解析速度。这恢复了此前将这些默认值从 `basic` 切换为 `best_effort` 时引入的解析性能回退。[#108187](https://github.com/ClickHouse/ClickHouse/pull/108187) ([Groene AI](https://github.com/groeneai)).
* 当该功能被禁用时 (`predicate_statistics_sample_rate = 0`，默认值) ，避免在 `MergeTree` 读取路径上维护 `system.predicate_statistics_log` 的选择性计数器。这样移除了每个 granule 上的一次原子更新，以及每次读取中的一个 `O(rows)` 过滤器 popcount 操作，从而恢复了在 AArch64 上最明显的性能回退。[#108190](https://github.com/ClickHouse/ClickHouse/pull/108190) ([Groene AI](https://github.com/groeneai)).
* 在 `precise_float_parsing = 1` 时，加快了从文本解析浮点数的速度，使其在几乎所有输入上的速度都能达到或超过默认解析器。同时将捆绑的 `fast_float` library 升级到 v8.2.10。[#108205](https://github.com/ClickHouse/ClickHouse/pull/108205) ([Raúl Marín](https://github.com/Algunenano)).
* 在 base64 编码和解码函数中使用 `simdutf` library，以提升性能。[#108333](https://github.com/ClickHouse/ClickHouse/pull/108333) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 优化高基数且开销较大的 key 上的 `DISTINCT`。[#108366](https://github.com/ClickHouse/ClickHouse/pull/108366) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 在非 Linux 构建 (macOS 和 FreeBSD) 中，jemalloc 不再主动清理 dirty pages (即每次 `free` 都执行一次 `madvise` 系统调用) ；现在它改为像 Linux 一样，使用带有限 `dirty_decay_ms` 的后台清理线程。这显著提升了频繁分配/释放内存的 workloads (例如递归 CTE，在 macOS 上的递归 CTE benchmark 中约提升 2 倍) ，而对 RSS 的影响可以忽略不计。[#108430](https://github.com/ClickHouse/ClickHouse/pull/108430) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 对于多次引用同一 `WITH` 别名或重复同一子表达式 (例如深度嵌套的 `if`/`multiIf` 链) 的表达式，在 analyzer 下加快了查询计划的构建速度，方法是在构建 actions DAG 时不再重复构建共享子表达式。[#108523](https://github.com/ClickHouse/ClickHouse/pull/108523) ([Dmitry Novik](https://github.com/novikd)).
* 即使 `ON` clause 同时包含非等值 predicates，现在也会基于等值 key 构建运行时过滤器，从而减少在同时混合等值和非等值条件的 join 中进入 hash join 的行数。`LEFT ANTI JOIN` 不受影响。[#108579](https://github.com/ClickHouse/ClickHouse/pull/108579) ([Antonio Álvarez Caballero](https://github.com/29antonioac)).
* 在整个 codebase 中全局启用 `-fno-math-errno`，让 compiler 能更好地优化数学函数。[#108628](https://github.com/ClickHouse/ClickHouse/pull/108628) ([Nikita Taranov](https://github.com/nickitat)).
* 将 aggregation 和 join hash tables 的软件 prefetch 阈值从 `4 * L2 cache size` 降低到 `L2 cache size`，这样一旦 hash table 无法再装入 L2，就会启用 prefetch。这恢复了在报告 L2 较大的平台上 (例如 L2 为 2 MiB 的 AArch64) ，针对中等大小 hash tables (约 1–8 MiB) 的 `GROUP BY` 和 `JOIN` 性能回退问题。[#108655](https://github.com/ClickHouse/ClickHouse/pull/108655) ([Groene AI](https://github.com/groeneai)).
* 提升窗口函数性能。对宽表执行包含 `SELECT *` 的窗口查询时，现在内存占用显著降低，运行速度也更快。窗口聚合 (包括 `quantile*`、`uniq*` 和 `groupArray`) 在使用 `OVER ()` 和 `OVER (ORDER BY ... RANGE ...)` 时性能更佳。`cume_dist` 函数也得到了加速，使用 `PARTITION BY` 或 `ORDER BY` 的窗口在包含大量重复值的列上现在也有更好的表现。[#108688](https://github.com/ClickHouse/ClickHouse/pull/108688) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 加快了包含大量或超长比较 `AND` 链的查询的查询分析：`optimize_and_compare_chain` 优化现在受工作预算 (新设置 `optimize_and_compare_chain_max_hash_work`) 约束，而不再对查询树中的很大一部分进行哈希计算；此外，lambda 解析在递归保护中也不再重复计算 lambda 主体的哈希值。[#108757](https://github.com/ClickHouse/ClickHouse/pull/108757) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了多线程读取 `JSON`/`Dynamic` 列时的性能回退问题：对 `input_format_binary_max_type_complexity` 设置逐值查找会导致共享查询上下文上的引用计数竞争，从而将并行读取串行化；现在该设置值会按线程缓存。[#108797](https://github.com/ClickHouse/ClickHouse/pull/108797) ([Seva Potapov](https://github.com/seva-potapov)).
* 修复了一个性能回退问题 (由 [#71781](https://github.com/ClickHouse/ClickHouse/issues/71781) 引入) ：通过 `s3` 和其他表函数从对象存储读取大量小文件时，预取会停止工作并退回为同步读取，导致读取大量微小文件时，单线程和低并发场景的速度明显变慢。[#108872](https://github.com/ClickHouse/ClickHouse/pull/108872) ([Nikita Fomichev](https://github.com/fm4v)). 现在，当对象存储读取经过文件系统缓存 (`filesystem_cache_name`) 时，也会发起初始的小对象预取，因此在启用缓存后，读取大量小文件 (例如 `S3Queue` 摄取) 不再是同步且受延迟限制的。[#109478](https://github.com/ClickHouse/ClickHouse/pull/109478) ([Nikita Fomichev](https://github.com/fm4v)).
* 将深度嵌套数组和元组字面量的解析时间从二次时间降低为线性时间。[#108892](https://github.com/ClickHouse/ClickHouse/pull/108892) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 降低了 `parallel_hash` join algorithm 中锁竞争带来的开销。[#108938](https://github.com/ClickHouse/ClickHouse/pull/108938) ([Hechem Selmi](https://github.com/m-selmi)).
* 对 `T64` 编码列的 `estimateCompressionRatio` 进行了加速：通过解析计算压缩后大小，而不是实际执行压缩。[#109054](https://github.com/ClickHouse/ClickHouse/pull/109054) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 消除了分布式查询计划在 shuffle 步骤中的一个单线程瓶颈：现在每个上游 stream 都会独立地按目标端 bucket 分发行，而不再让整条数据 stream 都汇入单个 transform。[#109206](https://github.com/ClickHouse/ClickHouse/pull/109206) ([Alexander Gololobov](https://github.com/davenger)).
* 降低了 Keeper server 空闲时的 CPU usage。[#109255](https://github.com/ClickHouse/ClickHouse/pull/109255) ([Michael Kolupaev](https://github.com/al13n321)).
* 加快了共享数据包含大量稀疏路径的 `JSON` 列的序列化与合并：在将共享数据展平为按路径划分的各列时，移除了针对所有已累积路径列的逐行扫描，并改为批量回填空缺，而不是逐个单元格插入默认值。[#109341](https://github.com/ClickHouse/ClickHouse/pull/109341) ([Groene AI](https://github.com/groeneai)).
* 降低了具有大量列的 queries 在 expression 求值时的 CPU overhead (例如，对小 `stride` 的 `QBit` 列执行 vector search 时，每个向量会展开成数百个 bit-plane sub-columns，并全部传入一次 `*DistanceTransposed` 调用) 。[#109380](https://github.com/ClickHouse/ClickHouse/pull/109380) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过同时计算成对的 sine/余弦，并消除坐标 transform 中冗余的三角函数调用，提升了 H3 Geo functions (`h3ToGeoBoundary`、`h3ToGeo`、`h3CellAreaM2`/`h3CellAreaRads2`、`geoToH3`) 的性能。结果保持不变 (逐比特完全一致) 。[#109399](https://github.com/ClickHouse/ClickHouse/pull/109399) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过将比较和符号扩展代码改为无分支实现，宽整数类型 (`Int128`、`UInt128`、`Int256`、`UInt256` 及基于它们的类型，如 `Decimal128`) 的比较 (`<`、`>`、`<=`、`>=`) 性能最高提升 7 倍；将有符号整数转换为 `Int256` 的性能也最高提升 7 倍 (在正负混合数据上) 。[#109474](https://github.com/ClickHouse/ClickHouse/pull/109474) ([Manuel](https://github.com/raimannma)).
* 优化了 `uniqCombined` (包括无键 aggregation 的情况) 和 `uniqHLL12`。[#109794](https://github.com/ClickHouse/ClickHouse/pull/109794) ([Anton Popov](https://github.com/CurtizJ)). [#109831](https://github.com/ClickHouse/ClickHouse/pull/109831) ([Anton Popov](https://github.com/CurtizJ)).
* 在不带 lambda 调用时，`arraySort` 和 `arrayReverseSort` 对数值数组 (包括 `Decimal` 和 `DateTime64`) 的处理速度可提升数倍。[#109832](https://github.com/ClickHouse/ClickHouse/pull/109832) ([Manuel](https://github.com/raimannma)).
* 通过采用算术快速路径，加速了固定偏移 time zones (如 UTC) 中 `DateTime` 和 `DateTime64` 值上的 `addDays`、`addWeeks`、`subtractDays` 和 `subtractWeeks`。[#109836](https://github.com/ClickHouse/ClickHouse/pull/109836) ([Manuel](https://github.com/raimannma)).
* 优化了 text index 的分析。[#109886](https://github.com/ClickHouse/ClickHouse/pull/109886) ([Anton Popov](https://github.com/CurtizJ)).
* 在另外两种情况下，并行化了 `parallel_hash` join algorithm 中非 joined rows 的 processing：存在残余 filter 时，以及 join keys 较小时 (单层哈希表) 的情况。[#110008](https://github.com/ClickHouse/ClickHouse/pull/110008) ([Hechem Selmi](https://github.com/m-selmi)).
* 内置 web UI 的响应 (Play UI、dashboards 和静态文件 handlers) 现在会根据 client 的 `Accept-Encoding` header 进行压缩，支持 zstd、gzip、deflate、brotli、lz4、xz、snappy 或 bzip2。例如，`/play` 页面可从约 350 KB 的 uncompressed 缩小到使用 zstd 时不足 120 KB，从而减少慢 connections 下的 load time。已压缩的响应不会被修改，并会返回 `Vary: Accept-Encoding`，以确保 CDN 和 cache 分区正确。[#110108](https://github.com/ClickHouse/ClickHouse/pull/110108) ([Sayantanu Dey](https://github.com/sayantanu-dey)).
* 在安全的情况下，可将过滤器下推到窗口函数或 `LIMIT BY` 之下：如果写在其上方的谓词 (子查询外层的 `WHERE`，或 `QUALIFY` 中的某个合取条件) 只引用窗口 `PARTITION BY` 列，或只引用 `LIMIT BY` 的键列 (对于 `LIMIT n BY` 且 `n >= 1` 并且没有 `OFFSET`) ，现在就能下推到存储层，从而启用主键和分区裁剪、跳过索引以及 projections。例如，`SELECT ... row_number() OVER (PARTITION BY key ORDER BY ts) AS rn ... QUALIFY rn = 1 AND key = 'x'` 现在不再需要读取整张表并对其执行窗口计算。[#110114](https://github.com/ClickHouse/ClickHouse/pull/110114) ([Groene AI](https://github.com/groeneai)). [#110116](https://github.com/ClickHouse/ClickHouse/pull/110116) ([Groene AI](https://github.com/groeneai)).
* 在 `join_use_nulls = 1` 时，如果一个拒绝 null 的 `WHERE` 同时引用了外连接两侧的列 (例如 `WHERE l.k = 42 AND r.k = 42`) ，现在会将该 join 转换为 `INNER` (或 `LEFT`/`RIGHT`) ，并进行主键裁剪，这与 `join_use_nulls = 0` 时一致。此前在这种情况下会跳过该转换，并完整读取两张表。[#110121](https://github.com/ClickHouse/ClickHouse/pull/110121) ([Groene AI](https://github.com/groeneai)).
* 对于只有一个非常量 `Nullable` 参数的函数，现在会让结果复用该参数的 null map，而不是新分配并合并一个。[#110151](https://github.com/ClickHouse/ClickHouse/pull/110151) ([Manuel](https://github.com/raimannma)).
* 在主键索引分析中，避免了每次超矩形检查都进行一次堆内存分配，使 mark 过滤速度根据查询形态提升 5–26%。[#110153](https://github.com/ClickHouse/ClickHouse/pull/110153) ([Manuel](https://github.com/raimannma)).
* 对数值 Array 上的函数 `arrayMin` 和 `arrayMax`，通过使用向量化归约代替逐元素比较循环，将性能提升约 1.3–1.5 倍。[#110163](https://github.com/ClickHouse/ClickHouse/pull/110163) ([Manuel](https://github.com/raimannma)).
* 对 `Delta` codec 的解压进行向量化。现在 8/16/32 位数据类型的解码速度提升了 1.5–5 倍，使 `Delta` 压缩列的扫描速度最高提升 20%。[#110189](https://github.com/ClickHouse/ClickHouse/pull/110189) ([Manuel](https://github.com/raimannma)).
* 加速了在 `Enum` 列上对常量 needle 执行的字符串搜索函数 (`like`、`position`、`match`、`countSubstrings`、`hasToken` 等) ：只搜索不同的枚举名称，再将结果映射回各行，而不是逐行搜索。[#110325](https://github.com/ClickHouse/ClickHouse/pull/110325) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过向量化批处理加速聚合函数 `groupBitOr`/`groupBitAnd`/`groupBitXor` 和方差家族 (`varPop`、`varSamp`、`stddevPop`、`stddevSamp`、`skewPop`、`skewSamp`、`kurtPop`、`kurtSamp`、`covarPop`、`covarSamp`、`corr`) ：在条件不可预测时结合 `-If` 组合器，速度最高可提升 4 倍；不使用该组合器时，方差家族最高可提升 3 倍。[#110461](https://github.com/ClickHouse/ClickHouse/pull/110461) ([Manuel](https://github.com/raimannma)).
* 加速了 text index 的分析阶段 (即选择读取哪些粒度的阶段) ：使用排除式搜索而不是遍历所有粒度，并避免为每次范围检查创建临时位图。[#110530](https://github.com/ClickHouse/ClickHouse/pull/110530) ([Anton Popov](https://github.com/CurtizJ)).
* 在自动 `PREWHERE` 优化中将 `Map` 子列的 on-disk 大小纳入考量。这修复了 [#99200](https://github.com/ClickHouse/ClickHouse/pull/99200) 引入的 `PREWHERE` 性能回退问题。属于 [#110462](https://github.com/ClickHouse/ClickHouse/issues/110462) 的一部分。[#110623](https://github.com/ClickHouse/ClickHouse/pull/110623) ([Pavel Kruglov](https://github.com/Avogar)).
* 加快从文本中解析 `UUID` 值的速度 (例如将 `JSONExtract` 解析为 `LowCardinality(UUID)`、`toUUID`、`CAST AS UUID`) ，方法是通过单次遍历同时完成十六进制数字的校验与转换，而非分两次进行。[#110625](https://github.com/ClickHouse/ClickHouse/pull/110625) ([Groene AI](https://github.com/groeneai)).
* 通过采用更快的 sorting 和 hash table 实现，显著提升了 `timeSeries*ToGrid` aggregate functions 的性能。[#110875](https://github.com/ClickHouse/ClickHouse/pull/110875) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 现在，像 `SELECT * FROM t WHERE id` 这样的查询会在 `id` 列上使用索引 skipping。关闭 [#89222](https://github.com/ClickHouse/ClickHouse/issues/89222)。[#89603](https://github.com/ClickHouse/ClickHouse/pull/89603) ([Aditya Chopra](https://github.com/adityachopra29)).
* 新增 `query_plan_merge_expression_into_join` 设置 (默认启用) ，允许在 join 重排序优化期间将 expression step 合并到 `JOIN` step 中。这使得对包裹 join 的 subquery 也能进行 join 重排序 (例如，当某个 `JOIN` 位于带有计算列的 subquery 中时) ，从而更好地优化复杂的 join tree。[#98533](https://github.com/ClickHouse/ClickHouse/pull/98533) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 优化同一 expression 上包含多个比较条件的 `AND` 链：可检测矛盾条件 (例如 `a < 3 AND a > 5` → `false`) ，并裁剪冗余条件 (例如 `a = 3 AND a < 5` → `a = 3`) 。[#99736](https://github.com/ClickHouse/ClickHouse/pull/99736) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* 被 `UNION` 查询多个分支引用的 Materialized CTEs 现在只会 materialized 一次，并在所有分支间共享。此前，每个分支都会获得各自独立的 CTE 副本，这些副本会被内联并分别求值。[#102107](https://github.com/ClickHouse/ClickHouse/pull/102107) ([Dmitry Novik](https://github.com/novikd)).
* `BackgroundSchedulePool` 中的线程现在会按需惰性创建，而不是在 server 启动时一次性全部创建。新增 server setting `background_schedule_pool_initial_size` (默认值为 `16`) 用于控制预先生成多少个工作线程；需要时，该 pool 会扩展到 `background_schedule_pool_size`。这减少了轻负载 server 上的 idle threads 数量。关闭 [#85265](https://github.com/ClickHouse/ClickHouse/issues/85265)。[#105066](https://github.com/ClickHouse/ClickHouse/pull/105066) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 对 `JSON` 类型的高级 shared data serialization，跳过不必要的 标记文件 加载。[#107051](https://github.com/ClickHouse/ClickHouse/pull/107051) ([Pavel Kruglov](https://github.com/Avogar)).
* 函数 `pointInPolygon` 的预处理常量多边形缓存现在可在查询和线程之间共享，并受新的服务器设置 `point_in_polygon_cache_size` 限制 (默认 256 MiB，`0` 表示禁用缓存，可在运行时更改) 。此前，缓存会为每个预处理后的多边形最多保留 `max_threads` 份副本，在不同多边形之间无限增长，并且直到服务器重启前都不会释放。可使用 `SYSTEM DROP POINT IN POLYGON CACHE` 清空该缓存，当前使用情况会在 `system.metrics` 中显示为 `PointInPolygonCacheBytes`、`PointInPolygonCacheCells` 和 `PointInPolygonCacheSizeLimit`。关闭了 [#106393](https://github.com/ClickHouse/ClickHouse/issues/106393)。[#107247](https://github.com/ClickHouse/ClickHouse/pull/107247) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* Keeper 在将快照序列化并写入磁盘，或在磁盘之间移动快照时，不再持有其内部快照锁，因此向其他节点传输快照以及 Raft 处理不再因本地创建快照而被阻塞。[#107595](https://github.com/ClickHouse/ClickHouse/pull/107595) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 将文件系统缓存的后台淘汰并行化 (由 `keep_free_space_ratio` 设置控制) 。新增设置 `keep_free_space_eviction_threads` 用于控制并行度，并将 `keep_free_space_remove_batch` 的默认值从 `100` 提高到 `250`。[#108147](https://github.com/ClickHouse/ClickHouse/pull/108147) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 将 Azure Blob 存储中先读后写复制可并发暂存的 parts 数量限制为 `max_inflight_parts_for_one_file` (当原生复制不可用时，backups 会使用这种方式) ，以防止并行复制大量大文件时内存占用过高。[#108232](https://github.com/ClickHouse/ClickHouse/pull/108232) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 现已在全局范围内启用全部三种文本索引缓存——此前它们仅在查询内部启用。此外，倒排列表缓存大小现已设为零，这实际上又将其禁用了，因为倒排列表体积较大，缓存成本过高。[#108274](https://github.com/ClickHouse/ClickHouse/pull/108274) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 在加载标记时新增对内存中标记的流式压缩，以减少峰值内存占用。关闭了 [#108285](https://github.com/ClickHouse/ClickHouse/issues/108285)。[#108325](https://github.com/ClickHouse/ClickHouse/pull/108325) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 新的文件系统缓存设置 `reserve_granularity` (默认 4 MiB) 会按更粗的粒度提前预留空间，从而减少文件系统缓存空间预留热点路径上的锁竞争。[#108369](https://github.com/ClickHouse/ClickHouse/pull/108369) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 减少文件系统缓存元数据 (每个 File 段 以及每个键) 的内存占用。[#108477](https://github.com/ClickHouse/ClickHouse/pull/108477) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 现在，对 `system.iceberg_history` 发起且在 `database` 和 `table` 列上带有 `WHERE` 过滤条件的查询，只会访问匹配的数据库；如果服务器上有许多不相关的远程数据库，这可以节省时间。[#108492](https://github.com/ClickHouse/ClickHouse/pull/108492) ([Den Kalantaevskii](https://github.com/Diskein)) 。
* 移除了文件系统缓存中不必要的锁操作，以减少锁竞争。[#108932](https://github.com/ClickHouse/ClickHouse/pull/108932) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 降低了 `BACKUP` 和 `RESTORE` 元数据处理的内存占用。现在，打开备份 (用于 `RESTORE`，或作为增量 `BACKUP` 的基础) 时，会以流式方式解析 `.backup` 元数据，而不是将其加载到内存中的 XML 文档树中，因此对于大型备份 (尤其是增量备份) ，可避免分配数 GB 的 DOM 树。[#109107](https://github.com/ClickHouse/ClickHouse/pull/109107) ([Julia Kartseva](https://github.com/jkartseva)) 。完成 `BACKUP` 时，也不再将所有文件的文件信息复制到临时 vector 中，这对于包含数百万文件的备份来说，此前会瞬时消耗数 GB 内存。[#109861](https://github.com/ClickHouse/ClickHouse/pull/109861) ([Julia Kartseva](https://github.com/jkartseva)) 。写入备份条目时，也不再复制当前主机的文件信息列表。[#111162](https://github.com/ClickHouse/ClickHouse/pull/111162) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 降低了聚合器的内存消耗。[#109224](https://github.com/ClickHouse/ClickHouse/pull/109224) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 现已支持通过 `File` 表引擎读取的本地 `Parquet` 文件使用查询条件缓存 (此前仅支持对象存储和数据湖) 。[#109247](https://github.com/ClickHouse/ClickHouse/pull/109247) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 文本索引头部缓存的内存占用降低了 2～2.5 倍。更多数据分区片段的头部可装入缓存 (设置 `text_index_header_cache_size`) ，从而减少文本搜索查询的磁盘读取。[#109332](https://github.com/ClickHouse/ClickHouse/pull/109332) ([Anton Popov](https://github.com/CurtizJ)) 。
* 转置向量距离函数 `L2DistanceTransposed`、`cosineDistanceTransposed` 和 `dotProductTransposed` 现在会将部分位平面读取优化应用于 `Nullable(QBit)` 列，只读取所需的位平面，而不是整列。[#109358](https://github.com/ClickHouse/ClickHouse/pull/109358) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `IS NOT DISTINCT FROM` 和 `IS TRUE` 现在会像 `=` 一样使用主键和 MinMax 索引来裁剪粒度。此前，`k IS NOT DISTINCT FROM 42` 和 `(k = 42) IS TRUE` 会扫描所有粒度。[#110006](https://github.com/ClickHouse/ClickHouse/pull/110006) ([Groene AI](https://github.com/groeneai)) 。
* 池化连接在每次使用前不再执行 ping。这去掉了此前附加到每个复用连接上的一次 `Ping`-`Pong` 往返，从而降低了分布式查询以及 `clickhouse-benchmark` 的延迟。失效的池化连接会通过零超时的 poll (这是一种不会增加往返的非阻塞检查) 来检测，并通过重新连接恢复。[#110068](https://github.com/ClickHouse/ClickHouse/pull/110068) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了通过 TLS (HTTPS、S3) 的 HTTP keep-alive 池化连接发生误重连的问题。此前，失效连接检查在套接字上使用 `poll`，会将携带未读 TLS post-handshake 记录 (会话票据或 `KeyUpdate`) 的活动安全连接误报为已关闭；现在，对普通套接字使用非阻塞 `MSG_PEEK`，对 TLS 套接字使用 `SSL_peek`/`SSL_has_pending`，这也能正确检测有序的 TLS 关闭，以及仅部分到达的 TLS 记录。[#110402](https://github.com/ClickHouse/ClickHouse/pull/110402) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 由 TopK dynamic filtering (`ORDER BY ... LIMIT k`) 加速的查询现在会更充分地利用查询条件缓存：即使对查询应用了 lazy materialization，也会填充该缓存；此外，这类查询还可以复用此前由具有相同 `WHERE` 谓词的普通查询写入的条目。[#110507](https://github.com/ClickHouse/ClickHouse/pull/110507) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 不带通配符 (`%`、`_`) 的 `LIKE`/`NOT LIKE` 模式现在会使用精确的主键范围，因此读取的粒度数与等效的 `=`/`!=` 谓词相同，不再读取更宽的前缀范围。[#107077](https://github.com/ClickHouse/ClickHouse/pull/107077) ([Groene AI](https://github.com/groeneai)).
* 修复了通过文件系统缓存读取数据时多余的 File 段锁竞争问题 (这是 26.1 中引入的一项性能回退) 。[#109577](https://github.com/ClickHouse/ClickHouse/pull/109577) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了定义在 `Tuple` 子列上的跳过索引在通过 `tupleElement(t, 'name')`、`tupleElement(t, N)` 或 `t.N` 访问字段时未被使用的问题；如果同一查询中还会读取完整的 tuple (例如 `SELECT *`) ，此前这些索引不会生效。现在，这些形式都会像具名子列访问 `t.name` 一样裁剪粒度。[#110056](https://github.com/ClickHouse/ClickHouse/pull/110056) ([Groene AI](https://github.com/groeneai)).
* 修复了 `Distributed` 表上缓慢的 `ORDER BY ... LIMIT` 查询：当 `prefer_localhost_replica` 选择本地副本时，本地分片执行计划中的预 LIMIT 已被移除，从而避免阻碍惰性物化和动态 top-K 过滤。[#110136](https://github.com/ClickHouse/ClickHouse/pull/110136) ([Michael Jarrett](https://github.com/EmeraldShift)).
* 修复了当索引定义在表达式而非裸列上时，`ILIKE` 运算符未使用文本索引的问题 (例如带有 `lower(...)` 预处理器的 `assumeNotNull(col)`) ：此前这类查询会读取所有粒度，而不是使用索引。此修复关闭了 [#110350](https://github.com/ClickHouse/ClickHouse/issues/110350)。[#110595](https://github.com/ClickHouse/ClickHouse/pull/110595) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 减少了文件系统缓存中的锁竞争：从缓存读取的查询在更新条目的 LRU priority 时，不再阻塞于优先队列锁。[#109065](https://github.com/ClickHouse/ClickHouse/pull/109065) ([Antonio Andelic](https://github.com/antonio2368)).
* 使用仅用于过滤的 `postprocessor` 表达式 (例如 `if(..., '', token)`) 的文本索引查询，现在会预先丢弃空标记，而不是逐行将其物化，从而提升性能。[#109049](https://github.com/ClickHouse/ClickHouse/pull/109049) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 减少了系统日志队列中的锁竞争，降低了繁忙集群中的查询尾延迟。[#110539](https://github.com/ClickHouse/ClickHouse/pull/110539) ([Sean Haynes](https://github.com/seandhaynes)).
* 对于 needle 非常量的子字符串搜索函数 (`position`、`countSubstrings`、`multiSearch*`、`replaceAll`、`replaceOne` 及其不区分大小写和 UTF-8 变体) ，通过在逐行执行路径上使用 SIMD 加速的字符串搜索器替代朴素实现，性能最高提升了 1.5 倍。[#110580](https://github.com/ClickHouse/ClickHouse/pull/110580) ([Raúl Marín](https://github.com/Algunenano)).
* 惰性物化现在也会应用于带有 `FINAL`、过滤器和较小 `LIMIT` 的 `ReplacingMergeTree` 查询，即使没有 `ORDER BY` 也是如此。过滤器和 `FINAL` merge 不需要的列，只会为 LIMIT 之后仍保留的行读取；因此，当这类查询选择宽列且过滤器选择性较高时，速度会快得多。由 `query_plan_optimize_lazy_materialization` 和 `query_plan_max_limit_for_lazy_materialization` 控制。[#110722](https://github.com/ClickHouse/ClickHouse/pull/110722) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 改进了在启用 deduplication 且一次 flush 被拆分到多个分区时的 async insert 性能：ClickHouse 现在会跨分区复用已计算的 deduplication 哈希，而不是为每个分区重新计算。[#111150](https://github.com/ClickHouse/ClickHouse/pull/111150) ([Valery Petrov](https://github.com/valerypetrov)).

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

* 新增设置 `input_format_csv_missing_nullable_as_empty_string` (默认禁用) 。启用后，CSV 输入中 `Nullable(String)` 列的缺失值会被读取为空 `String`，而不是 `NULL`，且不受 `input_format_csv_empty_as_default` 的影响。[#58225](https://github.com/ClickHouse/ClickHouse/pull/58225) ([kevinyhzou](https://github.com/KevinyhZou)). [#107577](https://github.com/ClickHouse/ClickHouse/pull/107577) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `toDateOrNull`、`toDateTimeOrNull` 和 `toDateTime64OrNull` 函数现在接受所有原生整数类型的整数参数 (解释方式与 `toDate`、`toDateTime` 和 `toDateTime64` 相同，并且可选传入 timezone 参数) ，如果值超出结果类型的取值范围，则返回 `NULL`。例如，`toDateTimeOrNull(1583851242, 'Asia/Shanghai')` 返回 `2020-03-10 22:40:42`，而 `toDateTimeOrNull(4294967296)` 返回 `NULL`。[#79791](https://github.com/ClickHouse/ClickHouse/pull/79791) ([Jitendra](https://github.com/jitendra1411)).
* 在 `system.grants` 表中新增 `is_wildcard` 列，用于指示某项授权是否使用通配符前缀匹配 (例如 `GRANT SELECT ON db*.*`) 。此前，在 `system.grants` 中无法区分同名的通配符授权和精确匹配授权。关闭了 [#92835](https://github.com/ClickHouse/ClickHouse/issues/92835)。[#98577](https://github.com/ClickHouse/ClickHouse/pull/98577) ([DQ](https://github.com/il9ue)).
* HTTP interface 现已支持 Snappy 压缩 (`Accept-Encoding: snappy`) ，并新增 `snappy_mode` 设置，用于在通用 `file`/`url` Snappy I/O 中选择 Hadoop Snappy block format 或 Snappy framing format。[#100752](https://github.com/ClickHouse/ClickHouse/pull/100752) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过 `analyzer_compatibility_allow_non_aggregate_in_having` 设置支持与旧版 analyzer 兼容。启用后，非聚合连接条件会从 `HAVING` 移动到 `WHERE`。[#104232](https://github.com/ClickHouse/ClickHouse/pull/104232) ([Dmitry Novik](https://github.com/novikd)).
* 新增 server setting `memory_worker_rss_speculative_reserve_ratio` (默认值为 `1.0`) ：当 RSS 在两次采样之间的增长快于全局 memory tracker 的记录速度时，它会让全局 memory tracker 在观测到的 RSS 之上额外进行推测性内存预留。这样一来，allocation 会更早触发 `MEMORY_LIMIT_EXCEEDED`，而内核 OOM-killer 抢先触发的可能性会更低。将该比率设为 `0` 可禁用此推测机制。[#104976](https://github.com/ClickHouse/ClickHouse/pull/104976) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增可选启用的 Prometheus 指标，用于反映文件系统缓存淘汰活动 (`filesystem_cache_evictions_total`、`filesystem_cache_evicted_bytes_total`、`filesystem_cache_evicted_segment_hits`、`filesystem_cache_evicted_segment_size_bytes`，以及带有 `user_id` 标签的按用户划分变体) 。这些指标会按缓存通过 `system.dimensional_metrics`、`system.histogram_metrics` 和 Prometheus endpoint 暴露。它们由缓存磁盘 config 设置 `expose_prometheus_eviction_metrics` 和 `expose_prometheus_eviction_metrics_per_user` 控制 (默认均关闭) ，并可通过 `SYSTEM RELOAD CONFIG` 在运行时切换。[#105020](https://github.com/ClickHouse/ClickHouse/pull/105020) ([Sacheendra Talluri](https://github.com/sacheendra)).
* 将 `EXPLAIN [PLAN] actions=1, compact=1, pretty=1` 设为默认值。[#105036](https://github.com/ClickHouse/ClickHouse/pull/105036) ([Kirill Kopnev](https://github.com/Fgrtue)).
* 将 `delta-kernel-rs` (`DeltaLake` integration 背后的库) 升级到 v0.23.0。[#105861](https://github.com/ClickHouse/ClickHouse/pull/105861) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 向 `clickhouse-disks` 添加了 `du` 和 `wc` 命令。它们分别用于输出给定文件或目录的总字节大小，以及列出文件的字节数、行数和单词数。[#106268](https://github.com/ClickHouse/ClickHouse/pull/106268) ([Asya Shneerson](https://github.com/asya-ch)).
* 新增了一个异步指标 `UntrackedMemory` (可在 `system.asynchronous_metrics` 中查看) ，用于报告已由线程分配但尚未计入全局内存跟踪计数器的内存：每个线程会先在本地累积小额分配，再批量上报。这有助于解释 `MemoryTracking` 与进程实际内存使用量之间的差异。`MEMORY_LIMIT_EXCEEDED` 错误消息现在也会包含未跟踪内存的数量，从而更容易理解查询或 server 为何触及其内存限制。[#106386](https://github.com/ClickHouse/ClickHouse/pull/106386) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 将 ClickStack (可观测性 UI) 升级到 2.28.0 版本。[#106406](https://github.com/ClickHouse/ClickHouse/pull/106406) ([Aaron Knudtson](https://github.com/knudtty)).
* 在 `dotProduct` 中新增了对 `BFloat16` 的支持，并通过对 SIMD 路径进行批处理提升了其性能。[#106569](https://github.com/ClickHouse/ClickHouse/pull/106569) ([Nikita Taranov](https://github.com/nickitat)).
* 使设置 `max_named_collection_num_to_throw`、`max_table_num_to_throw`、`max_replicated_table_num_to_throw`、`max_view_num_to_throw`、`max_dictionary_num_to_throw` 和 `max_database_num_to_throw` 无需重启 server 即可修改。[#106821](https://github.com/ClickHouse/ClickHouse/pull/106821) ([Maxim Orlovsky](https://github.com/UberDever)).
* `s3_storage_class_name` 设置现已支持 `REDUCED_REDUNDANCY`、`STANDARD_IA`、`ONEZONE_IA`、`GLACIER_IR` 和 `EXPRESS_ONEZONE` 这些值 (除 `STANDARD` 和 `INTELLIGENT_TIERING` 之外) 。[#107251](https://github.com/ClickHouse/ClickHouse/pull/107251) ([Aditya Kumar](https://github.com/adityaksolves)).
* 为 `MaterializedPostgreSQL` database engine 新增了创建时设置 `materialized_postgresql_use_extended_date_and_time_types`。默认情况下 (启用时) ，PostgreSQL 的 `date`/`timestamp` 列会被推断为 `Date32`/`DateTime64`；如果在 `CREATE DATABASE` 时将其设为 `0`，则会推断为更窄的 `Date`/`DateTime` 类型。该设置不适用于 `MaterializedPostgreSQL` table engine。[#107428](https://github.com/ClickHouse/ClickHouse/pull/107428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `SOME` / `ALL` Array 量词 (`expr OP SOME(array)` / `expr OP ALL(array)`) 现在还支持关键字比较 predicate `IS DISTINCT FROM` 和 `IS NOT DISTINCT FROM`，以及字符串搜索 predicate `LIKE`、`ILIKE`、`NOT LIKE`、`NOT ILIKE` 和 `REGEXP`，并会重写为 `arrayExists` / `arrayAll`。[#107454](https://github.com/ClickHouse/ClickHouse/pull/107454) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在打开 SQLite database 失败时发生的内存泄漏 (例如，当为 `sqlite` table function 或 `SQLite` database engine 提供了无法打开的 path 时) 。[#107807](https://github.com/ClickHouse/ClickHouse/pull/107807) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI (`play.html`) 中，运行快捷键提示现在会在 Mac 上显示 `Cmd+Enter`，在其他平台上显示 `Ctrl+Enter`，不再始终显示 `Ctrl/Cmd+Enter`；并且提示中的 `, +Shift to run all` 仅在存在多个查询时才会显示。[#107817](https://github.com/ClickHouse/ClickHouse/pull/107817) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#108957](https://github.com/ClickHouse/ClickHouse/pull/108957) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `Alias` 表引擎现在支持在目标表属于 `MergeTree` 家族时通过并行副本进行读取。[#107830](https://github.com/ClickHouse/ClickHouse/pull/107830) ([Kai Zhu](https://github.com/nauu)).
* 新增 `uniq_v2` 列统计信息类型——这是基于 `uniqCombined64` sketch 的 `uniq` 统计信息轻量级替代方案。[#107863](https://github.com/ClickHouse/ClickHouse/pull/107863) ([Han Fei](https://github.com/hanfei1991)). `minmax` 列统计信息类型已弃用，并将 `auto_statistics_types` 的默认值改为 `basic, uniq_v2`。[#108680](https://github.com/ClickHouse/ClickHouse/pull/108680) ([Han Fei](https://github.com/hanfei1991)).
* AI 函数 (`aiGenerate`, `aiEmbed`, `aiClassify`, `aiExtract`, `aiTranslate`) 现在会在设置了 `ai_function_max_retries` 时，对瞬时网络故障 (连接重置、TLS 连接失败、超时、地址不可达) 进行重试，与 `url` table function 的重试行为一致。此前，只有提供商侧返回的 HTTP 错误响应会被重试。[#107927](https://github.com/ClickHouse/ClickHouse/pull/107927) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 向 `MergeTree` 表执行 `INSERT` 时，现在在写入大量数据分片期间也会遵循查询取消和 `max_execution_time`，而不是在被终止后仍可能继续运行很长时间。[#107929](https://github.com/ClickHouse/ClickHouse/pull/107929) ([Michael Kolupaev](https://github.com/al13n321)).
* 在 Web UI (`play.html`) 中，现在可以通过鼠标中键点击或 Ctrl/Cmd/Shift+点击，在新的浏览器选项卡中打开 Web 终端。[#108006](https://github.com/ClickHouse/ClickHouse/pull/108006) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 客户端中的 AI SQL 生成现在只有在通过配置中的 `ai.temperature` 显式设置时才会发送 `temperature` 参数。这修复了会拒绝 `temperature` 参数的模型上的 AI SQL 生成功能。[#108014](https://github.com/ClickHouse/ClickHouse/pull/108014) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在开源构建中新增了 `system.masking_policies` 表以及 `SHOW MASKING POLICIES` 内部信息查询支持。脱敏策略本身仍然是 ClickHouse Cloud 功能，因此该表在开源构建中为空，但内部信息查询不再因报错而失败。[#108030](https://github.com/ClickHouse/ClickHouse/pull/108030) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 基于 Keeper 的 Kafka 消费者现在会在副本之间随机化获取临时分区锁的顺序，从而提升分区分布的公平性并减少锁竞争。此前，预期中的乱序实际上并未生效。[#108033](https://github.com/ClickHouse/ClickHouse/pull/108033) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 Web UI (`play.html`) 新增了自动补全功能，基于 `system.completions` 和 WASM SQL 词法分析器。[#108059](https://github.com/ClickHouse/ClickHouse/pull/108059) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 当光标位于输入末尾时，`clickhouse-client` 和 `clickhouse-local` 现在会显示即输即补全提示 (内联“幽灵”文本) ，给出最佳匹配建议。最相关的建议 (最近使用过的以及查询中已存在的标识符) 会排在最前面。使用 Up/Down (或 Ctrl-Up/Ctrl-Down) 导航；使用 Tab 或 Right 接受单个提示或当前选中的提示，使用 Enter 接受当前选中的提示；Tab 也会打开经典补全列表。由新的 `--hints` 选项控制 (默认开启；需要 `--highlight`) 。[#108070](https://github.com/ClickHouse/ClickHouse/pull/108070) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `QBit` 数据类型支持 `length` 函数——它会将向量的维度作为常量返回。[#108071](https://github.com/ClickHouse/ClickHouse/pull/108071) ([Alexey Milovidov](https://github.com/alexey-milovidov)). 支持从 `QBit` 到 `Array` 的 `CAST`，可重建原始向量——这是现有从 `Array` 到 `QBit` 转换的逆过程。[#108072](https://github.com/ClickHouse/ClickHouse/pull/108072) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 发送到 REST 数据湖目录 (例如 OneLake) 的请求现在会包含 ClickHouse `User-Agent` 标头。[#108117](https://github.com/ClickHouse/ClickHouse/pull/108117) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* `arrayFold` 现在会响应查询取消和 `max_execution_time`。此前，对超长数组执行 fold 时会完全在一次函数调用内运行，无法被中断，因此在 fold 完成之前会忽略 `KILL QUERY` 和时间限制。[#108192](https://github.com/ClickHouse/ClickHouse/pull/108192) ([Groene AI](https://github.com/groeneai)).
* `MVTEncodeGeom` 现在会在裁剪前将几何对象吸附到整数像素网格上，并使用 `wagyu` 库裁剪多边形，因此裁剪后的输出是有效的 (会修复自相交环) 且与边界对齐，与 PostGIS `ST_AsMVTGeom` 保持一致。[#108248](https://github.com/ClickHouse/ClickHouse/pull/108248) ([Saarthak Gupta](https://github.com/saarthak2002)).
* 新增按阶段统计的查询执行前 `ProfileEvents`：`QueryParseMicroseconds`、`QueryAnalysisMicroseconds`、`QueryPlanBuildMicroseconds` 和 `QueryPipelineBuildMicroseconds`。它们可显示查询执行前的时间花在何处 (解析、分析、查询计划构建、管道构建) ，并可在 `system.query_log` 和 `system.events` 中查看。[#108282](https://github.com/ClickHouse/ClickHouse/pull/108282) ([Jordi Villar](https://github.com/jrdi)).
* 现在会预先拒绝那些会导致表元数据超过 `max_query_size` 的 `ALTER TABLE` 操作，从而防止表因 DDL 分发和副本恢复等组件而变得无法加载。[#108283](https://github.com/ClickHouse/ClickHouse/pull/108283) ([Andrew Kravchuk](https://github.com/lockie)).
* 在 `system.backups` 和 `system.backup_log` 中新增了 `settings` 和 `engine_settings` 列。`settings` 会显示某次操作请求的 backup/restore 专用设置 (例如 `allow_s3_native_copy`、`deduplicate_files`、`structure_only`) ，而 `engine_settings` 会显示 backup 引擎的 reader 和 writer 实际使用的设置 (例如 `allow_native_copy` 这类 S3 请求设置；在合并端点配置后，它们可能与请求时的设置不同) 。这样就可以查看某个 `BACKUP`/`RESTORE` 操作实际是以哪些设置运行的。[#108334](https://github.com/ClickHouse/ClickHouse/pull/108334) ([Julia Kartseva](https://github.com/jkartseva)).
* 在 `system.documentation` 中新增了一个 `source` 列，用于记录定义各实体文档的源文件路径。该表现在还包含压缩编解码器、profile events、当前指标、异步指标以及系统表本身 (及其列) 的文档；设置文档现在也包含其类型和默认值。[#108346](https://github.com/ClickHouse/ClickHouse/pull/108346) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。空的设置默认值现在会渲染为 *空字符串*，而不是空的反引号。[#108708](https://github.com/ClickHouse/ClickHouse/pull/108708) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过在 `kqueue` 之上实现基于 epoll 的轮询原语，现已支持在 macOS 上从远程副本异步读取 (`async_socket_for_remote`) 。这使分布式查询在 macOS 上可以并行读取分片，而不再是串行读取。[#108403](https://github.com/ClickHouse/ClickHouse/pull/108403) ([Raúl Marín](https://github.com/Algunenano)) 。
* 二元数学函数现已支持 `BFloat16`。[#108442](https://github.com/ClickHouse/ClickHouse/pull/108442) ([Zhang Yifan](https://github.com/zhangyifan27)) 。
* `MergeTree` 现在可以读取块使用不同编解码器的压缩流。这是实现自适应编解码器选择所需的读取侧前置条件 ([#105404](https://github.com/ClickHouse/ClickHouse/issues/105404)) 。[#108592](https://github.com/ClickHouse/ClickHouse/pull/108592) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* `max_threads` 及类似设置的自动值现在会在 `system.settings` 中显示为 `auto(8)`，而不是 `'auto(8)'`；外围的单引号是长期以来固化在该值中的历史遗留制品。跨版本兼容性仍然保留：在解析从旧服务器收到的设置时，依然接受旧版带引号的形式。[#108657](https://github.com/ClickHouse/ClickHouse/pull/108657) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `/schema` Web UI 进行了多项易用性修复：按 Enter 加载 schema、滚动条适配主题、表名更易读、独立表按数据库分组时保持一致、拖动时不再选中文本，以及提供 `play` 风格的身份验证表单 (Credential Management API、通过 URL 提供凭据并去除密码，以及实时凭据校验) 。[#108724](https://github.com/ClickHouse/ClickHouse/pull/108724) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 文本索引的 lazy posting-list 应用模式不再属于 Experimental，现在无需 `allow_experimental_text_index_lazy_apply`，即可通过 `text_index_posting_list_apply_mode = 'lazy'` 选择该模式。密度阈值设置已从 `text_index_density_threshold` 更名为 `text_index_lazy_intersection_density_threshold`。[#108814](https://github.com/ClickHouse/ClickHouse/pull/108814) ([Anton Popov](https://github.com/CurtizJ)) 。
* 为 `DataLakeCatalog` 新增了 `delta_sharing` catalog 类型，用于 Databricks Delta Sharing 的 Iceberg REST 端点；这类端点的命名空间是扁平的，并且会忽略 `parent` 列表过滤器。对于这类端点，应使用它代替 `catalog_type = 'rest'`，否则 `SHOW TABLES` 可能会卡住。[#108865](https://github.com/ClickHouse/ClickHouse/pull/108865) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 为 `clickhouse-client`/`clickhouse-local` 新增了 `--echo-query-separator` 选项，可在格式化后的回显查询前输出自定义分隔符，从而更容易区分手动输入的查询和重新格式化后的回显。默认禁用。[#108888](https://github.com/ClickHouse/ClickHouse/pull/108888) ([David Meng](https://github.com/davidmenggx)) 。
* 改进了 Web UI 的数据库面板：数据库展开时，其名称旁的括号中会显示表数量。[#108891](https://github.com/ClickHouse/ClickHouse/pull/108891) ([Alexey Milovidov](https://github.com/alexey-milovidov))。展开后的数据库旁新增了刷新按钮，可重新加载其表列表。[#108958](https://github.com/ClickHouse/ClickHouse/pull/108958) ([Alexey Milovidov](https://github.com/alexey-milovidov))。重新打开该面板时，此前展开的数据库会恢复展开状态。[#108964](https://github.com/ClickHouse/ClickHouse/pull/108964) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 现在允许在 `EXPLAIN WHATIF` 中计算组合跳过索引的收益：它会显示所有现有且适用的假设索引交集对应的数据比例。[#108934](https://github.com/ClickHouse/ClickHouse/pull/108934) ([Yarik Briukhovetskyi](https://github.com/yariks5s))。
* 修复了 Web UI 中结果表的水平滚动位置在点击单元格中的链接并返回页面后被重置的问题。[#108941](https://github.com/ClickHouse/ClickHouse/pull/108941) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* `MySQL` database engine、table engine 和 table function 现在会将 MySQL 的空间列类型 (`LINESTRING`、`POLYGON`、`MULTILINESTRING`、`MULTIPOLYGON` 以及通用的 `GEOMETRY`) 映射为对应的 ClickHouse 几何类型，而不是 `String`。此行为由 `mysql_datatypes_support_level` 设置中新增加的 `geometry` 标志控制，且默认启用。`POINT` 仍始终转换为 `Point`。通用 `GEOMETRY` 列会映射到统括性的 `Geometry` 类型；如果读取的值其子类型在 ClickHouse 中没有对应类型 (`MULTIPOINT`、`GEOMETRYCOLLECTION`) ，则会在读取时抛出异常。[#108944](https://github.com/ClickHouse/ClickHouse/pull/108944) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* Web UI (`play.html`)：完整的键盘导航——支持在数据库面板和结果表中使用方向键导航，可通过键盘访问工具栏按钮、主题切换器和下载菜单，并提供可见的焦点轮廓。[#108972](https://github.com/ClickHouse/ClickHouse/pull/108972) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* HTTP 接口：当同时通过 URL parameters (`user`/`password`) 和 `Authorization` 请求头提供凭据时，现在 URL parameters 具有更高优先次序，而不是直接拒绝请求。这修复了当浏览器记住 Basic 凭据时，从 Web UI (`play.html`) 下载结果会因 `AUTHENTICATION_FAILED` (错误 516) 而失败的问题。[#108980](https://github.com/ClickHouse/ClickHouse/pull/108980) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 恢复 `show_data_lake_catalogs_in_system_tables`，作为仅控制 `DataLakeCatalog` 在 `system.tables`、`system.columns` 和 `system.completions` 中可见性的设置。新增 `show_remote_databases_in_system_tables`，默认启用，使用户可以单独隐藏这些系统表中的 `MySQL` 和 `PostgreSQL` 数据库。[#109082](https://github.com/ClickHouse/ClickHouse/pull/109082) ([Pablo Marcos](https://github.com/pamarcos))。
* 默认使用精确的 (最接近可表示值的) 浮点解析算法，并将 `precise_float_parsing` 设置应用于输入格式 (`CSV`、`TSV`、`JSON`、`VALUES`、...) 和数字字面量，而不仅仅是 `toFloat*`/`CAST`。如需恢复之前的行为——在某些情况下更快但精度较低——请设置 `precise_float_parsing = 0`。关闭 [#60146](https://github.com/ClickHouse/ClickHouse/issues/60146)。关闭 [#74647](https://github.com/ClickHouse/ClickHouse/issues/74647)。关闭 [#68914](https://github.com/ClickHouse/ClickHouse/issues/68914)。[#109086](https://github.com/ClickHouse/ClickHouse/pull/109086) ([Raúl Marín](https://github.com/Algunenano))。
* 现在，只有单个 CTE 的查询也会采用与多个 CTE 查询相同的换行和缩进格式。此前，`WITH a AS (...)` 会将 CTE 保留在与 `WITH` 同一行，而当有两个或更多 CTE 时，`WITH` 会单独占一行，且每个 CTE 都会缩进显示。[#109092](https://github.com/ClickHouse/ClickHouse/pull/109092) ([Groene AI](https://github.com/groeneai)).
* Web UI：当高亮的补全项与已输入的单词相同，或只是同一个单词但大小写不同 (例如，已输入 `hash` 时提示 `HASH`) ，按下 Right/Tab/Enter 不会再重写该单词，也不会被自动补全吞掉——按键会如预期那样移动光标或插入换行。[#109106](https://github.com/ClickHouse/ClickHouse/pull/109106) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#109384](https://github.com/ClickHouse/ClickHouse/pull/109384) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 Web UI (`play.html`) 添加了彩虹括号、配对括号、匹配标识符和数字分组高亮，与 `clickhouse-client` 保持一致。[#109108](https://github.com/ClickHouse/ClickHouse/pull/109108) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中，`Tab` 和 `Shift+Tab` 现在会将选中的行缩进或取消缩进 4 个空格。[#109110](https://github.com/ClickHouse/ClickHouse/pull/109110) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：在查询编辑器中，用红色背景高亮显示语法错误的位置。用户一旦将焦点切回编辑器，该高亮就会立即清除。[#109112](https://github.com/ClickHouse/ClickHouse/pull/109112) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `clickhouse-compressor --stat` 以及对旧 parts 的默认 codec 检测，现在会将损坏的块头报告为损坏，而不再误报为具有误导性的文件结束错误。[#109157](https://github.com/ClickHouse/ClickHouse/pull/109157) ([Raufs Dunamalijevs](https://github.com/rienath)).
* ClickHouse Keeper 现在会遵循 `os_collect_psi_metrics` 设置，并在其被禁用时跳过 PSI 指标采集。[#109179](https://github.com/ClickHouse/ClickHouse/pull/109179) ([Maxim Orlovsky](https://github.com/UberDever)).
* 在 Web UI 中，当显示查询选项卡时，连接参数 (host、user、password) 现在会隐藏在右上角的钥匙按钮中，并在需要时通过下拉菜单显示。[#109243](https://github.com/ClickHouse/ClickHouse/pull/109243) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：单值结果 (1 行 1 列，例如 `SHOW CREATE TABLE`) 现在会以完整高度显示，而不再被限制为三行。[#109245](https://github.com/ClickHouse/ClickHouse/pull/109245) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中，使用鼠标中键、按住 Shift，或使用平台的新建选项卡修饰键 (macOS 上为 Cmd，其他平台上为 Ctrl) 点击 databases 面板中的某个表时，现在会在新的 Web UI 选项卡中打开其查询。[#109246](https://github.com/ClickHouse/ClickHouse/pull/109246) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 对远程 (object storage) `Parquet` 文件的查询条件缓存，现在除了 path 之外还会按 ETag 建键，从而避免对象被原地覆盖后仍返回过期的缓存结果。[#109310](https://github.com/ClickHouse/ClickHouse/pull/109310) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中，空字符串和 NULL 在 categorical 着色模式下不再着色。[#109342](https://github.com/ClickHouse/ClickHouse/pull/109342) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：现在点击数据库面板中某个表的图标，会显示该表的列列表，包括类型图标、按压缩后大小按比例显示的大小条，以及显示压缩后大小/未压缩大小和压缩率的工具提示。[#109346](https://github.com/ClickHouse/ClickHouse/pull/109346) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：当选项卡标题被截断时，现在将鼠标悬停其上会通过工具提示显示完整标题。[#109354](https://github.com/ClickHouse/ClickHouse/pull/109354) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中，现在中键单击选项卡标题 (或按住 Ctrl/Shift/Cmd 并单击) 会复制该选项卡。[#109357](https://github.com/ClickHouse/ClickHouse/pull/109357) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：统一调整最终进度和查询统计区域的尺寸，以避免在浏览器窗口较窄时出现不自然的换行。[#109363](https://github.com/ClickHouse/ClickHouse/pull/109363) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：现在在数据库面板中选择某个数据库后，会将其用作从编辑器运行查询时的默认数据库。[#109372](https://github.com/ClickHouse/ClickHouse/pull/109372) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持将由固定大小元素组成的 `Array` 重新解释为 `String`，这与现有将 `String`/`FixedString` 重新解释为 `Array` 的功能互为逆操作。[#109383](https://github.com/ClickHouse/ClickHouse/pull/109383) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI 中，当结果最多只有一行时，不再显示按列着色的切换控件。[#109385](https://github.com/ClickHouse/ClickHouse/pull/109385) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 允许在 element type 和/或 stride 不同的 `QBit` 类型之间进行 `CAST`，只要 dimension 保持不变 (例如从 `QBit(Float32, N)` 执行 `CAST(x AS QBit(Float64, N))`) 。仅 stride 的变化是无损的；element type 的变化遵循相应的 `Array` 转换语义 (例如 `Float32` 到 `BFloat16` 可能会损失精度，而 `accurateCast` / `accurateCastOrNull` 会拒绝无法精确表示的行) 。[#109387](https://github.com/ClickHouse/ClickHouse/pull/109387) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 函数 `quantizeBFloat16ToInt8` 和 `dequantizeInt8ToBFloat16` 现在也接受 `Array` 和 `QBit` 参数，会将 Lloyd-Max codec 应用于整个向量 (返回对应 element type 的 `Array`/`QBit`) ，此外仍保留现有的 scalar 重载。[#109398](https://github.com/ClickHouse/ClickHouse/pull/109398) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：Documentation 链接现在会在 URL 中携带当前用户名。[#109419](https://github.com/ClickHouse/ClickHouse/pull/109419) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持对 `BFloat16` 数组使用 `arraySum`、`arrayAvg` 和 `arrayProduct`。[#109420](https://github.com/ClickHouse/ClickHouse/pull/109420) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `parseDateTime` / `parseDateTime64` (及其 `OrZero` / `OrNull` 变体) 中的 MySQL 风格 format 指定符 `%f` 现在接受 1 到 6 位 fractional digits，并像 MySQL 的 `STR_TO_DATE` 一样将其解释为左对齐的微秒，不再要求必须正好为 6 位。同时还修复了内置函数文档示例中 `PrettyCompact` 表对齐错位的问题。[#109421](https://github.com/ClickHouse/ClickHouse/pull/109421) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：查询选项卡现在会持久保留——切换到别处再切回时，每个选项卡都会保留其已渲染的结果 (包括图像和图表) 以及正在运行的查询，长时间运行的查询也会继续在后台执行。选项卡标题会显示对应查询的旋转指示器、进度条和完成勾选标记。[#109425](https://github.com/ClickHouse/ClickHouse/pull/109425) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：现在，当查询在部分结果已经流式传输后失败时，会正确显示错误，而不是显示客户端侧的 `SyntaxError: Unexpected end of JSON input` (或者在启用 `http_write_exception_in_output_format` 时，将失败的查询标记为成功) 。[#109430](https://github.com/ClickHouse/ClickHouse/pull/109430) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI 新增 pinned columns：现在可以从列标题固定某一列，这样在水平滚动结果表时，该列仍会保持可见 (固定在边缘) 。[#109439](https://github.com/ClickHouse/ClickHouse/pull/109439) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在高级仪表板 (`/dashboard`) 中，现在可以直接通过指标名称添加特定指标的图表，该名称与其在源代码或文档中的名称一致，这让在调试会话中添加多个指标更加方便。[#109449](https://github.com/ClickHouse/ClickHouse/pull/109449) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Web UI：修复了在连接设置下拉菜单中用鼠标选择文本并拖动到边框之外时，下拉菜单会关闭的问题。[#109451](https://github.com/ClickHouse/ClickHouse/pull/109451) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Web UI：现在将鼠标悬停在结果表列标题上时，会以工具提示显示完整的列名和类型，因此被截断的标题也能查看完整内容。[#109463](https://github.com/ClickHouse/ClickHouse/pull/109463) ([Alexey Milovidov](https://github.com/alexey-milovidov)). 修复了即使列足够宽、能够显示完整标题时，列标题仍被省略号截断的问题。[#110397](https://github.com/ClickHouse/ClickHouse/pull/110397) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 macOS 构建中支持 SSD cache 字典 (`SSD_CACHE` 布局) 和 `FileLog` 表引擎。[#109493](https://github.com/ClickHouse/ClickHouse/pull/109493) ([Raúl Marín](https://github.com/Algunenano)).
* Web UI：打开页面时，不再恢复查询为空的选项卡。[#109529](https://github.com/ClickHouse/ClickHouse/pull/109529) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 `TERM` 不包含 `256` 的终端 (例如 Ghostty、kitty、Alacritty、foot) 中，交互式 client 里输入时显示的自动补全提示难以辨认以及颜色过亮的问题：现在会无条件输出 aixterm 亮色代码，而不再回退为粗体 + 深色；后者在现代终端中会在深色背景上渲染成较暗、难以辨认的颜色。[#109622](https://github.com/ClickHouse/ClickHouse/pull/109622) ([Alasdair Brown](https://github.com/sdairs)).
* 在 macOS 构建中启用 jemalloc 的每 CPU arenas 和 allocation profiling。[#109684](https://github.com/ClickHouse/ClickHouse/pull/109684) ([Raúl Marín](https://github.com/Algunenano)).
* 允许使用 `ALTER DATABASE ... MODIFY SETTING` 修改 `OneLake` 数据湖目录数据库的某些身份验证设置。[#110019](https://github.com/ClickHouse/ClickHouse/pull/110019) ([alesapin](https://github.com/alesapin)).
* `Hive` engine 现在使用 ClickHouse 原生 `ORC` reader 读取 `ORC` 文件元数据 (min/max indexes、row counts) ，而不再使用 Apache Arrow `ORC` adapter。[#110086](https://github.com/ClickHouse/ClickHouse/pull/110086) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过将罕用混合类型对 (`Decimal` 与不同位宽整数，以及涉及 `Int128`/`UInt128`/`Int256`/`UInt256` 的组合) 的比较和算术操作改为先转换到公共类型上执行，而不是为每一种类型组合都提供专用的编译内核，二进制文件大小减少了约 10.5 MB。相同类型对、常用类型对，以及受内存带宽限制的 `plus`/`minus`/`multiply` 仍保留专用内核；结果、结果类型和异常情况均保持不变。[#110131](https://github.com/ClickHouse/ClickHouse/pull/110131) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，如果 `IN` 右侧的子查询只有一列，且该列是一个比左侧参数多一层维度的数组，那么它会被解释为由该数组元素构成的集合 (类似数组字面量或返回数组的函数) ，而不再因令人困惑的类型不匹配错误而失败。例如，`x IN (SELECT groupArray(x) FROM ...)` 现在可以正常工作。[#110169](https://github.com/ClickHouse/ClickHouse/pull/110169) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 当 SQLite 数据库被其他连接锁定时，从 `SQLite` 表引擎或 `sqlite` table function 读取将不再让一个完整的 CPU 核心忙等空转。现在，读取会在等待锁时进入空闲状态，并且仍可取消。[#110248](https://github.com/ClickHouse/ClickHouse/pull/110248) ([Groene AI](https://github.com/groeneai)).
* 将日志和异常消息中的已用时间、速率和比率值统一四舍五入到三位数字，因此像 `1.345844286 sec.` 这样的数字将不再以完整精度输出。[#110277](https://github.com/ClickHouse/ClickHouse/pull/110277) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI (Play) 中，`BFloat16` 现在会被识别为浮点数，相应列也会按浮点数方式右对齐并着色。[#110433](https://github.com/ClickHouse/ClickHouse/pull/110433) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `PostgreSQL` 表引擎和 `postgresql` table function 现已支持 `SETTINGS` 子句 (例如 `SETTINGS postgresql_connection_pool_size = 50`) ，从而与 `MySQL` engine 达成功能对齐。[#110614](https://github.com/ClickHouse/ClickHouse/pull/110614) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `SHOW CREATE TABLE` (以及 `SHOW CREATE VIEW` / `SHOW CREATE DICTIONARY`) 现在会在请求的表不存在时，像 `SELECT` 查询一样，在错误消息中提示一个名称相近的表。[#110633](https://github.com/ClickHouse/ClickHouse/pull/110633) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 默认启用 `merge_selector_enable_heuristic_to_lower_max_parts_to_merge_at_once` setting：合并选择器现在会根据分区的填充程度，自动降低单次可合并的最大 parts 数量。参见 [#91163](https://github.com/ClickHouse/ClickHouse/pull/91163)。[#110726](https://github.com/ClickHouse/ClickHouse/pull/110726) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 在 PostgreSQL 线协议中，PostgreSQL 清理命令 `RESET`、`UNLISTEN` 和 `DISCARD` 现在会作为空操作接受，而不再因语法错误而失败。这提升了与 Skunk 等驱动的兼容性，因为这些驱动会在连接建立和清理期间发送 `RESET ALL` 和 `UNLISTEN *`。[#110780](https://github.com/ClickHouse/ClickHouse/pull/110780) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 `auto_statistics_types` setting 的默认值从 `basic, uniq` 改为 `basic, uniq_v2`。[#110878](https://github.com/ClickHouse/ClickHouse/pull/110878) ([Han Fei](https://github.com/hanfei1991)).
* `randomHadamardTransform` 现在可对任意向量长度计算精确且保持原长度的变换，只要其最大奇因子不超过 64 (例如 `3584 = 512 * 7`，这在 embedding 模型中很常见) ，将此前仅支持的 `2^N`、`2^k * {12, 20}` 和 `2^k * 9` 这几类长度扩展到了更多情况。现在，对于无法精确表示的长度，执行完整变换会抛出异常，而不再静默通过零填充扩展为更长的向量；可传入 `output_dims` 来计算任意长度的截断投影。[#111006](https://github.com/ClickHouse/ClickHouse/pull/111006) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在并发删除并重建 `Replicated` database 时，对其执行 backup 过程中出现的 `LOGICAL_ERROR` 异常；这类 backup 现在会明确失败，并返回 `CANNOT_GET_REPLICATED_DATABASE_SNAPSHOT`。[#100651](https://github.com/ClickHouse/ClickHouse/pull/100651) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，当 zip archive 无法解包时，会显示实际的底层 error (例如 archive 从 S3 读取，而读取缓冲区拒绝 seek 时) 。此前，实际 error 会被通用消息 `Couldn't unpack zip archive: Code = -100` / `Couldn't open zip archive` 掩盖。[#105103](https://github.com/ClickHouse/ClickHouse/pull/105103) ([Groene AI](https://github.com/groeneai)).
* 修复了 server 重启后 (或执行 `DETACH DATABASE`/`ATTACH DATABASE` 后) 一个令人困惑的 "Maybe you meant X?" 提示：drop 一个已经被 drop 的表时，可能会把刚被 drop 的名称建议为备选项。[#106238](https://github.com/ClickHouse/ClickHouse/pull/106238) ([Groene AI](https://github.com/groeneai)).
* 修复了后台表 drop queue 中的一个 logical error (`Logical error: 'removed'`，会导致 debug 构建中的 server 中止) 。该问题会在多个 `CREATE OR REPLACE TABLE` 查询重复使用同一个显式 UUID 时触发，从而使 queue 中出现多个共享该 UUID 的已 drop 表。[#107031](https://github.com/ClickHouse/ClickHouse/pull/107031) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `Inconsistent AST formatting` logical error：当带别名的 lambda 在表达式列表中位于非首位，并被用作访问运算符 (tuple 元素 `.N` 或数组元素 `[]`) 的操作数时，可能会在 debug 和 sanitizer 构建中导致 server 中止，例如 `SELECT 1, ((p0, p1) -> p0 AS a7).4[3] FROM t`。[#107092](https://github.com/ClickHouse/ClickHouse/pull/107092) ([Groene AI](https://github.com/groeneai)).
* 现在，嵌套在另一个 distributed query 中的 cluster 表函数 (`urlCluster`、`fileCluster`、`s3Cluster` 等) ，例如 `clusterAllReplicas(..., urlCluster(...))`，会被拒绝并返回 `BAD_ARGUMENTS` error，而不再以 logical error (`Distributed task iterator is not initialized`) 失败。[#107107](https://github.com/ClickHouse/ClickHouse/pull/107107) ([Groene AI](https://github.com/groeneai)).
* 当 `OPTIMIZE ... DRY RUN` 因查询 timeout (设置了 `max_execution_time` 且 `timeout_overflow_mode = 'break'`) 而中断时，现在会返回 `TIMEOUT_EXCEEDED`，而不是返回与 `rows_sources` 相关的 logical error (该错误会导致 debug/sanitizer 构建中的 server 中止) 。[#107114](https://github.com/ClickHouse/ClickHouse/pull/107114) ([Groene AI](https://github.com/groeneai)).
* 不再在 macOS 上于 `ZooKeeper` 会话 finalize 期间记录无害的 `Net Exception: Socket is not connected` error。`clickhouse keeper-client` 退出时也不再向 stderr 打印这一虚假错误。[#107438](https://github.com/ClickHouse/ClickHouse/pull/107438) ([Groene AI](https://github.com/groeneai)).
* 修复了可刷新materialized view 在 `refresh_retries` 设置为极大值 (接近 `Int64` 最大值) 时，重试失败 refresh 过程中出现的有符号整数 overflow。该 overflow 可能会导致启用 undefined behavior sanitizer 的构建中的 server 中止。[#108005](https://github.com/ClickHouse/ClickHouse/pull/108005) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (在 debug/sanitizer 构建中会导致 server 中止) ：当 `JOIN` 使用 NULL 安全比较运算符 (`<=>` / `IS NOT DISTINCT FROM`) ，且其中一个键是标量 subquery (例如 `... JOIN t2 ON (SELECT x FROM t1) <=> t2.k`) ，并使用旧版 analyzer (`enable_analyzer = 0`) 时会触发该问题。现在，这类查询会返回常规的 `NOT_FOUND_COLUMN_IN_BLOCK` error，而不是 logical error。[#108123](https://github.com/ClickHouse/ClickHouse/pull/108123) ([Groene AI](https://github.com/groeneai)).
* 选择 `_distance` 列的 vector search 查询现在会返回恰当的 error，而不会再因 logical error 失败。[#108423](https://github.com/ClickHouse/ClickHouse/pull/108423) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了一个可能出现的 `std::future_error` (`The associated promise has been destructed prior to the associated state becoming ready`) ：当最终的异步 S3/Azure 分片上传完成任务调度失败时 (例如线程池耗尽) ，该问题可能暴露出来，并在 debug 和 sanitizer 构建中导致 server 中止。现在会改为报告真实的 scheduling error。[#108730](https://github.com/ClickHouse/ClickHouse/pull/108730) ([Groene AI](https://github.com/groeneai)).
* 避免了在编译超大的 regular expression 时产生过量的 server log output 和过长的 error message (例如 `LIKE` 或 `match` pattern 中包含数十万个 wildcards) ；现在，这类 pattern 会以清晰的 `CANNOT_COMPILE_REGEXP` error 失败。[#108821](https://github.com/ClickHouse/ClickHouse/pull/108821) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了对超出范围的 protocol packet type 进行字符串化时的 undefined behaviour (例如在不同步或经模糊测试的 connection 中，`Unexpected packet from server` / `Received ... packet` error message 里会出现该问题) 。[#108885](https://github.com/ClickHouse/ClickHouse/pull/108885) ([Groene AI](https://github.com/groeneai)).
* 修复了当表 expression 被用作 `IN` operator 的左 argument 时出现的一个令人困惑的内部 error (`Method getResultType is not supported for TABLE query tree node`) ；现在这类查询会产生清晰的 error message。[#109412](https://github.com/ClickHouse/ClickHouse/pull/109412) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了读取 Iceberg table 时的一个问题：如果 metadata file 的版本号全为数字但超出 32 位整数范围 (例如 `v99999999999999999999.metadata.json`) ，此前会报出晦涩的 `std::out_of_range` (`STD_EXCEPTION`) ，而不是清晰的 `BAD_ARGUMENTS` error。[#109619](https://github.com/ClickHouse/ClickHouse/pull/109619) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能出现的 `Logical error: 'ReadBuffer is canceled. Can't read from it.'`：当基于行的 input format (例如 `TSV`/`CSV`) 解析输入失败，且底层读取已被取消时 (例如 HTTP chunk 格式错误或 body 被截断) ，就可能触发该问题。现在构建 verbose parse 诊断信息时不再从已取消的 buffer 中读取。[#109708](https://github.com/ClickHouse/ClickHouse/pull/109708) ([Groene AI](https://github.com/groeneai)).
* 现在，使用 `arrayJoin` (或其 `unnest` 别名) 的 ROW POLICY filter expressions 会被直接拒绝，并返回清晰的 error；此前这类 policies 会在 query time 触发 `column->size() == num_rows` logical error。[#109753](https://github.com/ClickHouse/ClickHouse/pull/109753) ([Raúl Marín](https://github.com/Algunenano)). [#109973](https://github.com/ClickHouse/ClickHouse/pull/109973) ([Raúl Marín](https://github.com/Algunenano)).
* 现在，读取 schema 中包含不受支持的 Nested type (例如 `ROW` 字段) 的 Paimon table 时，会报告清晰的 `BAD_ARGUMENTS` error，并指出不受支持的类型；而不再返回没有任何消息、error code 为 0 的裸 `DB::Exception. (OK)`。[#109762](https://github.com/ClickHouse/ClickHouse/pull/109762) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (`std::length_error`) ：当查询启用实验性设置 `make_distributed_plan = 1`，且使用非常大的 `distributed_plan_default_reader_bucket_count` 或 `distributed_plan_default_shuffle_join_bucket_count` 时，会触发该错误。现在这类值会被拒绝，并返回 `INVALID_SETTING_VALUE`。[#109770](https://github.com/ClickHouse/ClickHouse/pull/109770) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (`query tree node does not have valid source node`) ：当递归 CTE 将外层作用域中的标识符解析为关联列时 (使用 `allow_experimental_correlated_subqueries = 1`) ，会触发该错误。现在这类查询会返回明确的 `UNSUPPORTED_METHOD` 错误。[#109863](https://github.com/ClickHouse/ClickHouse/pull/109863) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ORDER BY ... WITH FILL` 在 `Int64`/`UInt64` 列上跨过非常大的 gap 时出现的有符号整数溢出问题 (例如，步长为 2，跨越接近 2^63 的 gap) 。此前该溢出在 sanitizers 下属于 undefined behavior，在发布构建中则会静默回绕。[#109937](https://github.com/ClickHouse/ClickHouse/pull/109937) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `Bad cast from type DB::FunctionNode to DB::ConstantNode` logical error (在 debug/sanitizer 构建中会导致 server 中止) ：当针对 `Distributed` 表运行 `SELECT ... ORDER BY ... WITH FILL`，且 `optimize_const_name_size` 较小时会触发该错误。[#109938](https://github.com/ClickHouse/ClickHouse/pull/109938) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `Invalid number of rows in Chunk` logical error：当 `INTERPOLATE` 目标是 `WITH FILL` 列的别名，且使用旧版 analyzer (`enable_analyzer = 0`) 时会触发该错误。现在这类查询会被拒绝，并返回明确的 `INVALID_WITH_FILL_EXPRESSION` 错误。[#110103](https://github.com/ClickHouse/ClickHouse/pull/110103) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 logical error (在 debug/sanitizer 构建中会导致 server 中止) ：当 `indexHint`/`ignore`/`isZeroOrNull` 函数接收到类型解析为 `Nothing` 的参数时会触发，例如在 `indexHint(assumeNotNull(materialize(NULL)))` 这类表达式中。[#110192](https://github.com/ClickHouse/ClickHouse/pull/110192) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能出现的 logical error：`Too large size (...) passed to allocator`。当读取缓冲区大小设置 (如 `max_read_buffer_size` 或 `max_read_buffer_size_local_fs`) 被设置为超出范围的值时，可能会触发该错误。现在，设置合理性检查会将这类值限制为 256 MiB；此外，对于 `INSERT ... FROM INFILE` 的使用位置也会额外进行限制，因为它会在 `clickhouse-client` 内部读取文件，而该场景下设置合理性检查不生效。[#110207](https://github.com/ClickHouse/ClickHouse/pull/110207) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `CHECK TABLE` 现在会报告 projection part 在加载 metadata 失败时的实际损坏情况，而不是给出误导性的 `Columns doesn't match ... Expected: 0 columns` 错误。[#110262](https://github.com/ClickHouse/ClickHouse/pull/110262) ([Raúl Marín](https://github.com/Algunenano)).
* 现在，当从 PostgreSQL source 读取的值 (例如来自 `postgresql` table function 或 `PostgreSQL` table engine) 无法解析为声明的列类型时所产生的类型不匹配 (例如将 `text` 列声明为 `Int32`) ，会被报告为正规的查询错误；此前它会在 debug 和 sanitizer 构建中导致 server 中止。[#110264](https://github.com/ClickHouse/ClickHouse/pull/110264) ([Groene AI](https://github.com/groeneai)).
* 现已支持 macOS 上的 query profiler、memory profiler、trace profiler，以及 `system.trace_log` 的符号化。[#109825](https://github.com/ClickHouse/ClickHouse/pull/109825) ([Raúl Marín](https://github.com/Algunenano)).
* 将 `chdig` 更新到 [v26.7.1](https://github.com/azat/chdig/releases/tag/v26.7.1)：支持用于共享的压缩堆栈跟踪、查询模式、独立 Arena 内存、Perfetto 改进以及兼容性修复。[#110938](https://github.com/ClickHouse/ClickHouse/pull/110938) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在无符号键除以有符号常量时，对 `intDiv` 单调性的错误推断；该问题可能导致对跨越结果类型有符号边界的 `IN`/`NOT IN` 谓词无法进行主键索引裁剪。Debug 构建还会触发 `LOGICAL_ERROR` `Invalid binary search result in MergeTreeSetIndex`。[#107586](https://github.com/ClickHouse/ClickHouse/pull/107586) ([Groene AI](https://github.com/groeneai)).
* 新增 `allow_lossy_numeric_supertype` 设置 (默认禁用) 。启用后，当 `if`、`multiIf`、`coalesce`、`ifNull`、`array` 和 `map` 用于不存在无损公共类型的数值参数 (例如 `Decimal` 和 `Float64`，或 `Int64` 和 `Float64`) 时，会解析为 `Float64` 而不是 `Variant`，从而可用于 `sum`、`avg`、`min` 和 `max` 等聚合函数。相关聚合函数的错误消息现在也会直接提及该设置名称。关闭了 [#106707](https://github.com/ClickHouse/ClickHouse/issues/106707)。[#107236](https://github.com/ClickHouse/ClickHouse/pull/107236) ([Groene AI](https://github.com/groeneai)).
* 在表加载前启动 Prometheus 端点 (用于仅收集指标的配置) 和异步指标采集，以便在可能较长的元数据加载阶段也能看到指标。[#108402](https://github.com/ClickHouse/ClickHouse/pull/108402) ([Christoph Wurm](https://github.com/cwurm)).

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

* 修复了在包含大量去重块的表上，`TRUNCATE TABLE` 和 `DROP PARTITION` 可能失败的问题，因为在单个 ZooKeeper request 中删除这些块时，可能会超过默认 1 MB 的 `jute.maxbuffer` 限制。[#105991](https://github.com/ClickHouse/ClickHouse/pull/105991) ([Clayton McClure](https://github.com/cmcclure-twilio))。只有在使用 Apache ZooKeeper (不推荐) 而不是 ClickHouse Keeper 时，才会受到此问题影响。
* 修复了在 `MergeTree` 系列表上的变更 `WHERE` 子句中使用限定列名 (`database.table.column`) 的问题，例如 `DELETE FROM` 和 `ALTER TABLE ... UPDATE/DELETE`；此前此类查询会因缺少列而报错失败。关闭 [#71760](https://github.com/ClickHouse/ClickHouse/issues/71760)。[#109491](https://github.com/ClickHouse/ClickHouse/pull/109491) ([Mikhail Artemenko](https://github.com/Michicosun))。
* 修复了 PromQL 查询的查询结果缓存问题。`promql` 方言绕过了非确定性函数检查，可能会返回锚定在 `now()` 的过期结果；而 Prometheus HTTP API (`/api/v1/query`、`/api/v1/query_range`) 此前则完全不会存储任何缓存条目。[#110887](https://github.com/ClickHouse/ClickHouse/pull/110887) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov))。
* 修复了当 `TZ` 环境变量为空时，server 无法启动的问题。关闭 [#68920](https://github.com/ClickHouse/ClickHouse/issues/68920)。[#68921](https://github.com/ClickHouse/ClickHouse/pull/68921) ([Ardenwick](https://github.com/ardenwick))。
* 修复了当 `Backup` database engine 引用的备份变为 unavailable 时 (例如文件被删除，或底层存储不可访问) ，server 无法启动的问题。现在会在不加载任何表的情况下加载该 database，而不会阻止整个 server 启动。[#83188](https://github.com/ClickHouse/ClickHouse/pull/83188) ([Vitaly Orlov](https://github.com/orloffv))。
* 在对使用 `Distributed` engine 的表执行后台 insert 时，如果向远程分片发送数据时因重复报错而产生延迟，这些延迟现在会在错误解决后降低。此前，延迟只会不断累积，且不会重置。[#87378](https://github.com/ClickHouse/ClickHouse/pull/87378) ([Andrei Kochemirovskii](https://github.com/Blackmorse))。
* 修复了在启动时扫描 `Distributed` async-insert 队列时发现损坏文件的情况下，`system.distribution_queue` 中的 `broken_data_files` 和 `BrokenDistributedFilesToInsert` 指标始终报告 `0` 的问题。[#92124](https://github.com/ClickHouse/ClickHouse/pull/92124) ([KG.Xu](https://github.com/squalfof))。
* 修复了磁盘写满错误后的日志恢复问题。此前，当日志所在磁盘写满时，ClickHouse 会进入失败状态，并持续向 syslog 刷出大量错误消息 (可能高达每小时 100+ GB) ；即使释放了磁盘空间，也始终无法恢复。现在，一旦磁盘空间恢复可用，日志系统就会自动恢复，无需重启 server。[#93127](https://github.com/ClickHouse/ClickHouse/pull/93127) ([jaehanbyun](https://github.com/jaehanbyun))。
* 在禁用 `vended_credentials` 时，将静态 S3 credentials 转发给 Unity `DataLakeCatalog` 表读取，以防止匿名访问对象存储失败。[#96910](https://github.com/ClickHouse/ClickHouse/pull/96910) ([kgeg401](https://github.com/kgeg401))。
* 修复了 `DeltaLake` 表引擎中 schema parsing 代码的崩溃问题。[#97112](https://github.com/ClickHouse/ClickHouse/pull/97112) ([Kseniia Sumarokova](https://github.com/kssenii))。
* 修复了一个安全问题：未经身份验证的 TCP 客户端可通过 interserver port 探测表是否存在以及复制状态。[#99854](https://github.com/ClickHouse/ClickHouse/pull/99854) ([Shaohua Wang](https://github.com/tiandiwonder))。
* 修复了在 `DESCRIBE TABLE` 中，子查询后跟别名时出现的语法错误。修复 [#100031](https://github.com/ClickHouse/ClickHouse/issues/100031)。[#100205](https://github.com/ClickHouse/ClickHouse/pull/100205) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了在关联子查询中，当 `ROLLUP`/`CUBE` 与 `group_by_use_nulls` 一起使用导致外部列变为 `Nullable` 时出现的异常。[#100365](https://github.com/ClickHouse/ClickHouse/pull/100365) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了当已回滚的事务性 `MergeTree` 分片与已提交的分片相交时，表启动期间发生的服务器中止 (在 sanitizer 构建中) 以及静默数据丢失问题。[#100992](https://github.com/ClickHouse/ClickHouse/pull/100992) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复了 `indexOfAssumeSorted` 在 `MergeTree` 表的 `Array(LowCardinality(String))` 列上返回错误结果的问题。[#101771](https://github.com/ClickHouse/ClickHouse/pull/101771) ([Yash ](https://github.com/Onyx2406)) 。
* 修复了当表的排序键将 `Date` 列包裹在 `toDateTime` 中 (例如 `ORDER BY toDateTime(date_column)`) ，且查询使用类似 `WHERE date_column >= '...'` 的条件对原始列进行过滤时，主键剪枝不正确的问题。对于超出 `DateTime` 范围 (`2106-02-07` 之后) 的 `Date` 值，`toDateTime(Date)` 会发生溢出，因此存储的键不再单调；ClickHouse 不再对这种键/谓词组合使用主键剪枝，因为这样做可能会丢弃包含匹配行的 granule。关闭 [#101744](https://github.com/ClickHouse/ClickHouse/issues/101744)。[#101814](https://github.com/ClickHouse/ClickHouse/pull/101814) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了 `intDivOrNull`、`moduloOrNull` 和 `positiveModuloOrNull` 在除法导致浮点异常 (除以零或 `INT_MIN / -1`) 时返回 `0` 而不是 `NULL`，以及 `intDivOrNull` 和 `intDivOrZero` 抛出异常而不是返回 `NULL` / `0` 的问题，这也包括有符号/无符号混合参数的情况。[#101976](https://github.com/ClickHouse/ClickHouse/pull/101976) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了在某些边缘情况下读取 `Iceberg` 或 `DeltaLake` 表时出现的 `LOGICAL_ERROR` 异常，例如并发更新 `Iceberg` 元数据，或通过 `merge` 表函数读取 `DeltaLake` 表时。[#102033](https://github.com/ClickHouse/ClickHouse/pull/102033) ([Groene AI](https://github.com/groeneai)) 。
* 修复了出站 HTTP 请求 (例如 `aiGenerate` 函数、`url` 表函数、S3) 在主机同时公布 IPv4 和 IPv6 地址、但只有一种地址族可路由时，因 `No route to host` 而失败的问题。现在，HTTP 连接池会在第一个解析出的地址因网络错误失败时回退到下一个已解析地址，而不是在第一次请求时就直接返回该错误。[#103786](https://github.com/ClickHouse/ClickHouse/pull/103786) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在 `RESTORE` 包含具有循环依赖项的表的备份时，服务器发生中止的问题。[#103824](https://github.com/ClickHouse/ClickHouse/pull/103824) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 对 Arrow `time32`/`time64` 列的模式推断 (例如 `SELECT * FROM file(..., 'Arrow')`) 现在会推断为 `Time64` 而不是 `DateTime64`；任何下游依赖旧推断类型的内容，在升级后都会看到这一新类型。此外，`Time`/`Time64` 值现在也可以导出到 Arrow，并会根据 precision 选择合适的 Apache Arrow 时间类型。修复 [#104038](https://github.com/ClickHouse/ClickHouse/issues/104038)。[#104316](https://github.com/ClickHouse/ClickHouse/pull/104316) ([/bin/cat](https://github.com/Maoyao233)) 。
* 修复了 `MergeTree` 中 `ALTER TABLE ... RENAME COLUMN` 与并发执行的 `OPTIMIZE TABLE ... FINAL` (或任何后台 merge) 之间的竞争条件；该问题可能会在无提示的情况下将重命名列的数据替换为默认值。[#104822](https://github.com/ClickHouse/ClickHouse/pull/104822) ([Groene AI](https://github.com/groeneai)).
* 修复了以下情况下的 `Block structure mismatch` logical error：在 `Atomic` database 中执行过 `DETACH DATABASE`/`ATTACH DATABASE` 且 `lazy_load_tables = 1` 之后，如果 `ALTER TABLE ... RENAME COLUMN` 尚在进行中时并发执行 `INSERT`，就可能触发该错误。[#104852](https://github.com/ClickHouse/ClickHouse/pull/104852) ([Groene AI](https://github.com/groeneai)).
* 修复了 `groupConcat` 在混用参数式和双参数写法时的问题，例如 `groupConcat(',', 2)(x, '/')`：此前行数限制参数会被悄然忽略，导致返回所有行而不是请求的数量；现在第二个参数中的分隔符会正确覆盖该参数。[#104882](https://github.com/ClickHouse/ClickHouse/pull/104882) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 `KILL QUERY`/`KILL MUTATION`/`KILL PART_MOVE_TO_SHARD`/`KILL TRANSACTION` 抛出的 `LOGICAL_ERROR` (`Expected one block from input stream`) ：当其 `WHERE` clause 包含逐行执行的 subquery，或当 `max_block_size` 小到使针对相关 `system.*` 表的内部 `SELECT` 产生多个块时，就会触发该错误。[#104927](https://github.com/ClickHouse/ClickHouse/pull/104927) ([Groene AI](https://github.com/groeneai)).
* 修复了从较小时间间隔单位转换为较大时间间隔单位时，`CAST` 返回错误结果的问题 (例如，`CAST(toIntervalSecond(60) AS IntervalMinute)` 会返回 `0` 而不是 `1`) 。关闭 [#104986](https://github.com/ClickHouse/ClickHouse/issues/104986)。[#105058](https://github.com/ClickHouse/ClickHouse/pull/105058) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了使用按序读取管道 (`optimize_read_in_order = 1` 且 `read_in_order_use_virtual_row_per_block = 1`) 运行的 `LIMIT ... WITH TIES` 查询中的一个 logical error (`Assertion 'row < chunk.getNumRows()' failed`) 。[#105102](https://github.com/ClickHouse/ClickHouse/pull/105102) ([Groene AI](https://github.com/groeneai)).
* 修复了可刷新materialized view (`MATERIALIZED VIEW ... REFRESH ...`) 中的泄漏问题：通过 `EXCHANGE TABLES` 在 refresh 时旋转出的临时内部表，如果大于 `max_table_size_to_drop` 就无法被 drop，因此之后每次 refresh 都会再创建一个新的临时内部表，导致该视图的数据 directory 持续增长，直至磁盘耗尽。现在，refresh 任务内部的 drop 会绕过 `max_table_size_to_drop` 和 `max_partition_size_to_drop`；但这些安全保护仍适用于用户对该视图本身执行的 `DROP TABLE`。关闭 [#104900](https://github.com/ClickHouse/ClickHouse/issues/104900)。[#105106](https://github.com/ClickHouse/ClickHouse/pull/105106) ([Groene AI](https://github.com/groeneai)).
* 修复了一个异常的 `DATA_TYPE_CANNOT_BE_USED_IN_KEY` 错误：对于 sorting key 未发生变化的 `ALTER` 查询 (修改 settings、注释、codecs、添加非键列等) ，如果 `MergeTree` 表的 sorting key 中包含 `SimpleAggregateFunction` (或其他仅在 `allow_suspicious_primary_key = 1` 时允许的类型) ，此前也可能报错。[#105111](https://github.com/ClickHouse/ClickHouse/pull/105111) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 use-after-free 问题：当 `Replicated` database 正在被 drop 或 detach 时，查询 `system.clusters` 中的副本状态列 (如 `is_active`、`unsynced_after_recovery`、`recovery_time`) 可能触发该问题。此外，这条代码路径中原本被吞掉的无害 Keeper Exception (受影响的 database 会被视为暂时 unavailable 并跳过) 现在会以 `Information` 级别而非 `Error` 级别记入日志，因此在默认 `send_logs_level = 'warning'` 下不再发送给客户端。[#105149](https://github.com/ClickHouse/ClickHouse/pull/105149) ([Groene AI](https://github.com/groeneai)).
* 修复了一个问题：在 `clickhouse-local --ignore-error` 中执行多条语句时，每次出现词法错误或括号不匹配错误，错误消息都会回显其后的每条语句。[#105480](https://github.com/ClickHouse/ClickHouse/pull/105480) ([Groene AI](https://github.com/groeneai)).
* 修复了一个罕见的 server crash：在可刷新materialized view 被 drop 或 replace 的同时，其 refresh 调度也在并发进行时，可能发生崩溃。[#105588](https://github.com/ClickHouse/ClickHouse/pull/105588) ([Groene AI](https://github.com/groeneai)).
* 对于数据 file format 不是 `Parquet` 的 `Iceberg` 表，`ALTER TABLE ... DELETE` 和 `ALTER TABLE ... UPDATE` 现在会明确返回 `NOT_IMPLEMENTED` error，而不再导致 server crash 或悄悄破坏表。[#105893](https://github.com/ClickHouse/ClickHouse/pull/105893) ([Groene AI](https://github.com/groeneai)).
* 修复了一个问题：某些以 `EXCEPT` 或 `INTERSECT` 定义、且操作数为 `UNION` 链的视图，在 `DETACH`/`ATTACH` 或 server 重启后会返回错误结果。此前，格式说明符遗漏了 `INTERSECT`/`EXCEPT` 下 `UNION` 子项外层所需的括号，导致存储的 SQL 在重新解析时使用了相反的优先次序。[#105935](https://github.com/ClickHouse/ClickHouse/pull/105935) ([Groene AI](https://github.com/groeneai)).
* 修复了 format 自动检测时将 `JSON` data 误判为 `TSKV` 的问题。关闭 [#100797](https://github.com/ClickHouse/ClickHouse/issues/100797)。[#106009](https://github.com/ClickHouse/ClickHouse/pull/106009) ([Pavel Kruglov](https://github.com/Avogar)).
* 禁止直接在 `JSON` columns 上创建 `minmax` 跳过索引——如果之后插入混合类型数组，可能会因 `NO_COMMON_TYPE` exception 导致 insert 失败。请改为在带类型的 subcolumns 上创建索引 (例如 `INDEX idx json.field TYPE minmax`) 。[#106094](https://github.com/ClickHouse/ClickHouse/pull/106094) ([linhaojie](https://github.com/linhaojie)).
* 修复了一个逻辑错误 (`Parsed partition value ... doesn't match partition value for an existing part with the same partition ID`) ：在分区键类型为 `Time` 的表上执行 `OPTIMIZE TABLE ... PARTITION ...` 以及其他需要解析分区值的 queries 时，可能会抛出该错误。[#106202](https://github.com/ClickHouse/ClickHouse/pull/106202) ([Groene AI](https://github.com/groeneai)).
* 修复了一个问题：轻量级删除在未留下 projection part 的情况下，数据分区片段会被错误标记为 projection 已损坏——这可能发生在 projection 重建后输出行为零，或 projection 被丢弃 (`lightweight_mutation_projection_mode = 'rebuild'`/`'drop'`) 时。此前，这种损坏状态会禁用针对该分片查询的 projection optimization。[#106273](https://github.com/ClickHouse/ClickHouse/pull/106273) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `plain` object storage disk (如 `s3_plain`) 上的 `removeDirectory` 问题：它此前会像递归删除一样，删除非空 directory 中的所有文件；现在删除非空 directory 会返回 `CANNOT_RMDIR`，而递归删除则会显式处理其中的内容。[#106281](https://github.com/ClickHouse/ClickHouse/pull/106281) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 修复了一个逻辑错误 (`Part ... doesn't exist`) ：在从 Keeper 硬件错误中恢复 quorum `INSERT` 时，如果 quorum 同时被标记为失败，可能导致 server 中止。[#106424](https://github.com/ClickHouse/ClickHouse/pull/106424) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在应用行策略时因列名重复而触发的 `LOGICAL_ERROR` 异常。[#106438](https://github.com/ClickHouse/ClickHouse/pull/106438) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了 `CREATE OR REPLACE TABLE` 和 `REPLACE TABLE` 在现有目标超过 `max_table_size_to_drop` 时，会在磁盘上遗留 `_tmp_replace_*` 表，并将原表替换为空表的问题。现在会在交换前先执行大小检查，因此一旦违反限制，就会干净地中止，并在错误中显示用户可见的表名。[#106782](https://github.com/ClickHouse/ClickHouse/pull/106782) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `JSON_QUERY`/`JSON_VALUE`/`JSON_EXISTS` 对 `Dynamic` 参数返回 `Dynamic` 而非 `String`/`UInt8` 的问题。关闭 [#106461](https://github.com/ClickHouse/ClickHouse/issues/106461)。[#106877](https://github.com/ClickHouse/ClickHouse/pull/106877) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在启用 `query_plan_optimize_lazy_final` 时，对带有文本索引过滤器的 `ReplacingMergeTree` 表使用 `FINAL` 查询会返回错误结果的问题。惰性 `FINAL` 优化构建出的读取步骤未能复现从文本索引进行的直接读取，因此过滤器丢弃了所有匹配行。[#106894](https://github.com/ClickHouse/ClickHouse/pull/106894) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 将 `query_masking_rules` 应用于附加到异常的消息，这样在配置了脱敏规则时，`jdbc`/`odbc` table function 报错中 `(in file/uri ...)` 后缀里的 URL 编码 credentials 就不会泄露。[#106916](https://github.com/ClickHouse/ClickHouse/pull/106916) ([Gaurav Dubey](https://github.com/gaurav0107)) 。
* 修复了对于分区键中包含 `LowCardinality(Nullable(...))` 列的表，在任何 parts 重新加载时 (server 重启、`DETACH`/`ATTACH`) ，parts 都会被标记为损坏并分离的问题。自 26.5 起，当此类列的最小值和最大值均为 `NULL` 时，不会写入每个 part 的 minmax 索引文件，但 part 一致性检查仍要求该文件存在。受影响版本写入的 parts 缺少 minmax 索引文件，仍需手动重新附加。关闭 [#106837](https://github.com/ClickHouse/ClickHouse/issues/106837)。[#106945](https://github.com/ClickHouse/ClickHouse/pull/106945) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 修复了当非等值 `JOIN ... ON` predicate 引用了 `Nothing` 类型的列 (例如由 `ARRAY JOIN []` 生成的列) 时出现的 `LOGICAL_ERROR` (`Unexpected expression in JOIN ON section. Expected boolean (UInt8), got 'Nothing'`) 。[#106981](https://github.com/ClickHouse/ClickHouse/pull/106981) ([Groene AI](https://github.com/groeneai)) 。
* 修复了一个罕见的 `LOGICAL_ERROR` (`Attempt to release query context that does not exist`) ，以及在通过使用 `enable_filesystem_query_cache_limit = 1` 创建的文件系统缓存 disk 读取 `MergeTree` 表时伴随发生的 server 崩溃。[#107028](https://github.com/ClickHouse/ClickHouse/pull/107028) ([Groene AI](https://github.com/groeneai)) 。
* 修复了将空分片移动到 `plain_rewritable` disk 时发生的 server 崩溃问题 (例如，对由 `remove_empty_parts = 0` 保留的空分片执行 `ALTER TABLE ... MOVE PARTITION ... TO DISK`) 。[#107040](https://github.com/ClickHouse/ClickHouse/pull/107040) ([Groene AI](https://github.com/groeneai)) 。
* 修复了在启用 `optimize_read_in_order` 和 `read_in_order_use_virtual_row` 时，对 `UNION ALL` 执行 `ORDER BY` 查询会出现行顺序错误的问题。关闭 [#106879](https://github.com/ClickHouse/ClickHouse/issues/106879)。[#107053](https://github.com/ClickHouse/ClickHouse/pull/107053) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了 `geohashesInBox` 函数中的一个 `LOGICAL_ERROR` (`Unsupported argument types`) ：当其坐标参数混用了常量值和非常量值，或某个坐标为 `BFloat16` 时会触发该错误。现在，混合 const/non-const 的 `Float32` 参数已可正常工作，而 `BFloat16` 参数会被明确报错并拒绝。[#107063](https://github.com/ClickHouse/ClickHouse/pull/107063) ([Groene AI](https://github.com/groeneai))。
* 修复了在相同键上，对带有 `WITH CUBE`、`WITH ROLLUP` 或 `GROUPING SETS` 的 `GROUP BY` 执行 `SELECT DISTINCT` 时返回错误结果 (重复行) 的问题。`query_plan_remove_redundant_distinct` 优化在这些情况下不再移除 `DISTINCT`，因为这些分组修饰符会生成额外的行，其中键列会被填充为默认值，从而可能与真实的分组值冲突。[#107072](https://github.com/ClickHouse/ClickHouse/pull/107072) ([Groene AI](https://github.com/groeneai))。
* 修复了 `OUTER JOIN` 中的错误结果问题：当 `WHERE` 过滤条件是包含常量项的合取时 (例如 `p AND 1`，或 `WHERE p QUALIFY NULL`，其中 `QUALIFY NULL` 会被合并到 `WHERE` 中) 。该常量合取项可能会被下推到 join 的非保留侧，并从 join 后的过滤条件中移除，导致 join 产生侧表列为默认值的不匹配行，而这些行又会被错误地通过过滤。[#107084](https://github.com/ClickHouse/ClickHouse/pull/107084) ([Groene AI](https://github.com/groeneai))。
* 修复了配置了 `<lifetime>` 的 `executable_pool` 用户自定义函数无法获取底层脚本变更的问题。此前，只有 `SYSTEM RELOAD FUNCTIONS` 才会重新读取已编辑的脚本；周期性的 `<lifetime>` 重载仍会继续执行旧版本。[#107087](https://github.com/ClickHouse/ClickHouse/pull/107087) ([Groene AI](https://github.com/groeneai))。
* 修复了在 `correlated_subqueries_default_join_kind = 'left'` 时，对于源中将同一列标识符投影两次 (例如 `SELECT number, *`) 的关联标量子查询出现的 `LOGICAL_ERROR` 异常 (`Cannot find input column ... on its position in inputs of expression actions DAG`) 。[#107112](https://github.com/ClickHouse/ClickHouse/pull/107112) ([Groene AI](https://github.com/groeneai))。
* 修复了服务器全局 trace collector 上的一个数据竞争问题，该问题发生在工作线程启动其 profiler 与服务器关闭之间。[#107307](https://github.com/ClickHouse/ClickHouse/pull/107307) ([Groene AI](https://github.com/groeneai))。
* 增量备份不再将 `S3` 凭据存储在 `.backup` 元数据文件的 `<base_backup>` 定位符中。对于使用 `use_same_s3_credentials_for_base_backup = 1` 创建的备份，或显式基础备份凭据与该备份定位符匹配的备份，现在会存储一个非敏感标记，并且恢复时无需额外的恢复期设置；对于使用不同的显式基础备份凭据或额外基础身份验证参数创建的备份，请在 `RESTORE` 中通过 `base_backup` setting 传入它们。由旧版本创建且带有嵌入式凭据的备份仍然可以恢复。[#107357](https://github.com/ClickHouse/ClickHouse/pull/107357) ([Pablo Marcos](https://github.com/pamarcos))。
* 修复了在启用 `output_format_csv_serialize_tuple_into_separate_columns` (默认启用) 时，`CSVWithNames` 和 `CSVWithNamesAndTypes` 的表头列数少于数据列数的问题。现在，表头 (以及类型行) 会将 `Tuple` 列展平为带点号名称的叶子字段 (例如 `t.a`、`t.b`) ，因此表头列数与数据保持一致。新增 setting `output_format_csv_header_serialize_tuple_into_separate_columns` (默认值为 `1`) 用于控制此行为，并可设置为 `0` 以恢复之前的单名称表头。[#107371](https://github.com/ClickHouse/ClickHouse/pull/107371) ([Groene AI](https://github.com/groeneai))。
* 修复了读取 `Iceberg` v3 表时的问题：当其 `Parquet` 数据文件包含保留的行血缘列 (例如 `_row_id`) 时，原生 `Parquet` 读取器不再因不属于表 schema 的保留字段 ID 而抛出 `ICEBERG_SPECIFICATION_VIOLATION`。[#107377](https://github.com/ClickHouse/ClickHouse/pull/107377) ([Greg Maher](https://github.com/gregakinman))。
* 修复了一个罕见问题：服务器在关闭期间会异常中止 (`std::future_error`: `The associated promise has been destructed prior to the associated state becoming ready`) ，原因是某个已调度任务在执行前就从线程池队列中被丢弃。[#107383](https://github.com/ClickHouse/ClickHouse/pull/107383) ([Groene AI](https://github.com/groeneai)).
* 修复了 `MaterializedPostgreSQL` 表引擎和数据库引擎，使其支持从非默认 PostgreSQL schema (`materialized_postgresql_schema`) 复制单个表或整个数据库，包括同一数据库中多个 schema 下存在同名表的情况 (此前它们会共享同一个 publication 和 replication slot，从而相互干扰) 。[#107425](https://github.com/ClickHouse/ClickHouse/pull/107425) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `MaterializedPostgreSQL` 的一个问题：如果服务器停机期间某个已复制表的结构发生变化，整个数据库的复制会停止 (报错为 `LOGICAL_ERROR: Columns number mismatch`) 。现在只会跳过受影响的表，并且可通过 `DETACH`/`ATTACH` 恢复。[#107427](https://github.com/ClickHouse/ClickHouse/pull/107427) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `MaterializedPostgreSQL` 数据库的 `BACKUP` 不再因 `Table ... were created or changed its definition during scanning` 而永久卡住，现在还会真正备份表数据 (委托给底层的 `ReplacingMergeTree`) ，并且可将其恢复为独立的 `ReplacingMergeTree`。[#107433](https://github.com/ClickHouse/ClickHouse/pull/107433) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个回归问题：设置 `compatibility = '26.6'` (这会隐式启用 `hive` partition strategy) 时，S3/object storage 表路径中的 `{_partition_id}` 会被静默接受，而不是抛出 `BAD_ARGUMENTS`。[#107437](https://github.com/ClickHouse/ClickHouse/pull/107437) ([Lefteris](https://github.com/LefterisXefteris)).
* 修复了捆绑的 `mongo-c-driver` 中的内存泄漏问题：从 MongoDB 读取时 (例如通过 MongoDB 字典或 `mongodb` 表函数) ，如果发生了可重试的读取错误，随后重试时服务器选择又失败，就可能触发该问题。[#107448](https://github.com/ClickHouse/ClickHouse/pull/107448) ([Groene AI](https://github.com/groeneai)).
* 修复了向 `Iceberg` 表插入数据时的异常：当该表的 metadata 由 external engine 创建，且省略了可选的 `snapshots`、`metadata-log` 或 `snapshot-log` 数组时，插入会失败。现在这类插入已可正常成功。[#107473](https://github.com/ClickHouse/ClickHouse/pull/107473) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `DELETE FROM` (轻量级删除) 除了 `ALTER DELETE` 之外还要求 `ALTER UPDATE` 权限的问题。现在，仅授予 `ALTER DELETE` 的用户也可以按文档所述执行 `DELETE FROM`。[#107491](https://github.com/ClickHouse/ClickHouse/pull/107491) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了读取 Hive 分区文件时出现 `NOT_FOUND_COLUMN_IN_BLOCK` 的问题：当 `use_hive_partitioning = 1`，且 `WHERE`/`PREWHERE` 子句过滤的是一个真实 (非虚拟) 列，同时又选择了一个 Hive 分区列时，就会触发该问题。[#107505](https://github.com/ClickHouse/ClickHouse/pull/107505) ([Groene AI](https://github.com/groeneai)).
* 修复了旧版 analyzer (`enable_analyzer = 0`) 读取某个子查询的部分列时出现的 `LOGICAL_ERROR` (`Different order of columns in UNION subquery`) 问题：该子查询的 `UNION` 子项是 `INTERSECT`/`EXCEPT` 集合操作。[#107511](https://github.com/ClickHouse/ClickHouse/pull/107511) ([Groene AI](https://github.com/groeneai)).
* 修复了将 `Arrow`/`ORC` 数据插入 `LowCardinality(Nullable(...))` 列时，`NULL` 值会被静默转换为空字符串的问题。这是 26.5 中引入的一个回归。[#107532](https://github.com/ClickHouse/ClickHouse/pull/107532) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复了一个逻辑错误 (`Stream ... variant_discr ... is not found`) ：在合并或读取因对包含 `Dynamic` 列的表执行变更而生成的 `MergeTree` 分片时，可能会触发该错误。[#107562](https://github.com/ClickHouse/ClickHouse/pull/107562) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了主键分析期间的一个逻辑错误 (`WhichDataType(const_type).isArray()`) ：当 `pointInPolygon` 使用 `Variant` 或 `Dynamic` 等包装类型的常量多边形参数调用时，会触发该错误 (例如，`pointInPolygon((x, y), if(c, [(0, 0), ...], NULL))`) 。[#107589](https://github.com/ClickHouse/ClickHouse/pull/107589) ([Groene AI](https://github.com/groeneai)).
* 修复了 `FileLog` 引擎中的一个逻辑错误 (`Last stored last_written_position in meta file ... is bigger than current last_written_pos`) ：当被监视的文件被删除后重新创建，并复用了同一个 inode 时，可能会触发该错误。[#107617](https://github.com/ClickHouse/ClickHouse/pull/107617) ([Groene AI](https://github.com/groeneai)).
* 修复了 ZooKeeper 客户端处理请求期间一个罕见的 server 中止问题 (`std::future_error`: `The associated promise has been destructed prior to the associated state becoming ready`) ：当异步 Keeper request 在发送过程中被丢弃时可能发生，例如在内存压力下。[#107647](https://github.com/ClickHouse/ClickHouse/pull/107647) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ReplicatedMergeTree` 表的 `RESTORE`，使备份中的重复内容分片能够被保留，而不是被静默去重。[#107652](https://github.com/ClickHouse/ClickHouse/pull/107652) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了运行时 join 过滤器在 `JSON` 列上产生错误结果的问题。关闭 [#107646](https://github.com/ClickHouse/ClickHouse/issues/107646)。[#107663](https://github.com/ClickHouse/ClickHouse/pull/107663) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了分布式查询在选择共享公共子表达式的 `ALIAS` 列时返回错误结果的问题：列可能错位，返回的值也可能落在错误的列下。[#107675](https://github.com/ClickHouse/ClickHouse/pull/107675) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 现在，以 `normalized_query_hash` 为键的配额会像查询计数计数器一样，按每个查询模式统计所有资源 (`read_rows`, `read_bytes`, `result_rows`, `result_bytes`, `execution_time`, `written_bytes`, `errors`) ，而不是将它们统一记入一个按用户共享的桶中。[#107681](https://github.com/ClickHouse/ClickHouse/pull/107681) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个 `Block structure mismatch in UnionStep stream` 逻辑错误 (在 debug/sanitizer 构建中会导致 server 中止，在发布构建中表现为 `Code: 49`) ：当 `UNION`/`INTERSECT`/`EXCEPT` 的同级分支仅 `WHERE` 谓词不同，且其中一个分支的谓词被常量折叠为 `Const` 列时，就会触发该错误。[#107719](https://github.com/ClickHouse/ClickHouse/pull/107719) ([Groene AI](https://github.com/groeneai)).
* 修复了由于对嵌套在 `Variant` 和 `Dynamic` 列中的 `LowCardinality` 剥离处理不一致而导致的逻辑错误 (`Bad cast`) ，例如在 `concat`、`format` 和主键分析中。关闭 [#107598](https://github.com/ClickHouse/ClickHouse/issues/107598)。[#107773](https://github.com/ClickHouse/ClickHouse/pull/107773) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了并行副本在集群包含不活跃副本时严重的工作分配倾斜问题 (例如自动扩缩容后遗留的陈旧条目) 。这些副本现在不会再被读取协调器计入，因此工作会在在线副本之间均衡分配，而不是堆积在单个副本上。[#107805](https://github.com/ClickHouse/ClickHouse/pull/107805) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `Not-ready Set is passed as the second argument` Exception：在构建 `IN` 子查询集合时，如果主键分析静默失败 (例如带有 `overflow_mode = 'break'` 的子查询超时) ，就可能触发该异常，并使该集合在查询管道中始终无法构建。[#107924](https://github.com/ClickHouse/ClickHouse/pull/107924) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了谓词下推 (`enable_optimize_predicate_expression`，旧版 analyzer) 中的服务器崩溃问题，该问题会在 `JOIN ... ON` 条件中包含 `UNION` 子查询时发生。[#107930](https://github.com/ClickHouse/ClickHouse/pull/107930) ([Groene AI](https://github.com/groeneai)).
* 修复了在读取 S3 或兼容 S3 (例如 GCS) object 的过程中，如果该 object 被原地覆盖，会出现误报的 `CHECKSUM_DOESNT_MATCH` 和 `Parquet` 读取错误 (某些 formats 还会静默返回错误结果) 的问题。现在，这类读取会以明确且可重试的错误失败，而不会返回由两个 object 版本拼接而成的数据；此行为由新设置 `s3_validate_etag_on_read` 控制 (默认启用) 。[#107934](https://github.com/ClickHouse/ClickHouse/pull/107934) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了以下问题：对于带有 `set` 数据跳过索引的表，如果 ROW POLICY 使用恒为真的条件并结合对非索引列的检查进行过滤，`SELECT` 可能会因 `NOT_FOUND_COLUMN_IN_BLOCK` 而失败。[#107971](https://github.com/ClickHouse/ClickHouse/pull/107971) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 executable 用户自定义函数的命令参数解析问题，不再接受名称为空或无效的占位符作为参数。[#107983](https://github.com/ClickHouse/ClickHouse/pull/107983) ([Goutam Adwant](https://github.com/goutamadwant)).
* 修复了 `Map` subcolumn 与 `PREWHERE` 搭配使用时的性能回退问题。关闭 [#107912](https://github.com/ClickHouse/ClickHouse/issues/107912)。由 [#99200](https://github.com/ClickHouse/ClickHouse/pull/99200) 引入。[#107988](https://github.com/ClickHouse/ClickHouse/pull/107988) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了从格式错误的 `Native` 块中读取 `Variant` 列时可能发生的越界写入问题，其判别值引用了不存在的 variant 索引。[#107991](https://github.com/ClickHouse/ClickHouse/pull/107991) ([uwezkhan](https://github.com/uwezkhan)).
* 修复了因错误的主键和分区裁剪而导致查询结果错误的问题：当 `toStartOfDay`、`toStartOfISOYear`、`toDaysSinceYearZero`、`toRelativeSecondNum`、`toRelativeMinuteNum`、`toRelativeHourNum`、`toRelativeWeekNum`、`toRelativeDayNum`、`toMonthNumSinceEpoch` 或 `toYearNumSinceEpoch` 应用于包含超出函数可表示范围日期的 `Date32` 键列时 (尤其是 `1970-01-01` 之前的日期) ，就会出现该问题。这些函数会向主索引声明自己是单调的，但此前在这类 argument 上会发生回绕，因此索引可能会裁剪掉实际包含匹配行的粒度；现在，它们会在结果类型的边界处饱和，并在整个 `Date32` 范围内保持单调。[#108018](https://github.com/ClickHouse/ClickHouse/pull/108018) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了元素为 `Dynamic`/`Variant` 的 `Tuple` 在使用 `accurateCastOrNull` 时的问题：真实的源 `NULL` 之前会被视为转换失败。对于 `Nullable` 目标元素，源 `NULL` 现在会保留为元素 `NULL` (与普通 `Tuple(Nullable(...))` 源的行为一致) ；对于非 `Nullable` 目标元素，源 `NULL` 现在会将整个 `Tuple` 置为 `NULL`，而不是产生元素默认值；解析/溢出失败仍会将整个 `Tuple` 置为 `NULL`。[#108023](https://github.com/ClickHouse/ClickHouse/pull/108023) ([Groene AI](https://github.com/groeneai))。同时还修复了在使用 `accurateCastOrNull` 或 `accurateCastOrDefault` 将嵌套在 `Tuple` 内的 `Dynamic` 或 `Variant` 列转换为非 `Nullable` 元素类型时出现的逻辑错误。[#108061](https://github.com/ClickHouse/ClickHouse/pull/108061) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `numericIndexedVectorPointwiseMultiply` 在与全 1 向量相乘且 BSI (bit-sliced index) 配置不同时返回空结果的问题。[#108027](https://github.com/ClickHouse/ClickHouse/pull/108027) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `toTime64` 和 `CAST(... AS Time64)` 在 `saturate` 和 `ignore` 溢出模式下，未将超出范围的值钳制到 `Time64` 范围内的问题，这可能导致显示相同但比较结果不同的值。[#108028](https://github.com/ClickHouse/ClickHouse/pull/108028) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `getClientHTTPHeader` 现在会被正确视为非确定性，因此其结果不再被查询结果缓存错误复用。[#108029](https://github.com/ClickHouse/ClickHouse/pull/108029) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `clickhouse-client --port 9440` 现在会再次自动启用安全 (TLS) 连接；此前一次重构导致端口不再传递给安全连接检查，从而破坏了这一行为。[#108032](https://github.com/ClickHouse/ClickHouse/pull/108032) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 只读表的数据分区片段在刷新过程中出现暂时性错误时，不再会导致后台刷新任务永久停止。[#108034](https://github.com/ClickHouse/ClickHouse/pull/108034) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `system.warnings` 中 memory/CPU/变更 过载告警滞后一个异步指标周期 (且在第一个周期中缺失) 的问题。[#108035](https://github.com/ClickHouse/ClickHouse/pull/108035) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `mongodb` 表函数现在接受以命名参数传递的 `oid_columns` (例如 `oid_columns='_id'`) ，而不再以 `BAD_ARGUMENTS` 拒绝它。[#108039](https://github.com/ClickHouse/ClickHouse/pull/108039) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了这样一种情况下的 `Bad cast from type DB::ColumnNullable to DB::ColumnVector<...>` 异常 (逻辑错误) ：限定星号 (`t.*`) 选中了 `JOIN USING` 键，且该 JOIN 嵌套在 `PASTE`/`CROSS`/逗号 JOIN 或外层 `ON` JOIN 之下，同时 `join_use_nulls = 0`。[#108043](https://github.com/ClickHouse/ClickHouse/pull/108043) ([Groene AI](https://github.com/groeneai)).
* 修复了正则表达式“全部匹配”函数 `extractAll`, `extractAllGroupsVertical`, `extractAllGroupsHorizontal`, `countMatches` 和 `splitByRegexp` 中对零宽断言 (`\b`, `^`, `$`) 处理不正确的问题。例如，`extractAll('new york is the greatest', '\b(\w)')` 现在会正确返回每个单词的首字母，而不是每个字母。[#108047](https://github.com/ClickHouse/ClickHouse/pull/108047) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 `Atomic` 数据库中执行 `CREATE TABLE ... AS SELECT` 时，如果查询失败会遗留空表的问题——例如用户无权访问子查询中引用的某个表时。此前重试会报表已存在，而不是返回原始错误。现在会先通过临时表创建，只有在数据完全填充后才会对外可见。[#108048](https://github.com/ClickHouse/ClickHouse/pull/108048) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在允许对使用 `DateTime64`、`Decimal` 或浮点范围的 `range_hashed` 或 `complex_key_range_hashed` 字典，传入与 `dictGet`/`dictHas` 匹配的参数进行查询。此前此类查询会因 `must be convertible to Int64` 而失败，并且 `Decimal`/`DateTime64` 范围中的开放区间会错误返回默认值。[#108052](https://github.com/ClickHouse/ClickHouse/pull/108052) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了加载带复合键的字典时出现的异常 (`CANNOT_PARSE_TEXT`) ：当键列不是字典定义中的前几列，且使用带显式查询的本地 `ClickHouse` 数据源时，会触发该问题。现在源列会按名称而不是按位置与字典结构匹配。[#108053](https://github.com/ClickHouse/ClickHouse/pull/108053) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `values` table function 在使用无法被较窄浮点列精确表示的十进制字面量时会因 `ARGUMENT_OUT_OF_BOUND` 失败的问题 (例如在 `Float32` 列中使用 `0.1`) ，如 `SELECT * FROM values('x Float32', 0.1)`。现在这类值会被接受，并转换为最接近的可表示值，与 `CAST` 和 `INSERT ... VALUES` 的行为一致。[#108055](https://github.com/ClickHouse/ClickHouse/pull/108055) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在某个表上执行 `SELECT count()` (或其他简单查询) 时出现 `LOGICAL_ERROR` (`No available columns`) 的问题：当用户仅被授予该表某个 `ALIAS` 列的 `SELECT` 权限时会触发该问题。[#108056](https://github.com/ClickHouse/ClickHouse/pull/108056) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `mapFilter`、`mapSort` (及其变体) 和 `mapConcat` 会从 `Map` 的键类型和值类型中丢失 `LowCardinality` 的问题。此前，对 `Map(LowCardinality(String), String)` 列执行 `mapFilter` 会返回 `Map(String, String)`，这可能破坏通过 `CREATE TABLE ... AS SELECT` 创建的表的元数据，并导致 `CHECK TABLE` 失败。[#108057](https://github.com/ClickHouse/ClickHouse/pull/108057) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在文本索引上使用 `hasToken` 且分词器不是 `splitByNonAlpha` 时结果不正确的问题。[#108066](https://github.com/ClickHouse/ClickHouse/pull/108066) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了这样一种卡死问题：当多个在 XML 中定义的 MySQL 字典通过 `share_connection` 共享同一个连接池时，执行 `SYSTEM RELOAD DICTIONARIES` (以及 `RELOAD DICTIONARY`) 会卡住。现在，这类连接池会遵循配置中的 `connection_pool_size` 和 `connection_wait_timeout` (默认为 5 秒) ，与通过命名集合定义的字典保持一致。[#108083](https://github.com/ClickHouse/ClickHouse/pull/108083) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，仅对字典拥有 `SHOW DICTIONARIES` 权限的用户也可以使用 `EXISTS <dictionary>` (此前还要求 `SHOW TABLES`) 。[#108084](https://github.com/ClickHouse/ClickHouse/pull/108084) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `CREATE TABLE dst AS src SETTINGS ...` (以及带有 `ORDER BY`/`PARTITION BY` 但未显式指定 `ENGINE` 的类似写法) 会静默丢失源表 engine、存储子句 (如表 `TTL` 和键) 以及 settings 的问题。现在，engine 和未被覆盖的存储子句会继承自源表，指定的 settings 则会在源表 settings 的基础上叠加合并。 [#108085](https://github.com/ClickHouse/ClickHouse/pull/108085) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了向 `MergeTree` 表执行 `INSERT` 时，在 Windows 支持的 filesystem (WSL、CIFS/SMB、Docker Desktop bind mount) 上因分片写入器在分片目录重命名过程中未关闭文件描述符，导致出现 `filesystem error: in rename: Permission denied` 的问题。 [#108089](https://github.com/ClickHouse/ClickHouse/pull/108089) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了查询不带 `WHERE` 子句的 `Hive` 表时发生崩溃 (空指针解引用) 的问题，例如 `SELECT * FROM hive_table`。 [#108094](https://github.com/ClickHouse/ClickHouse/pull/108094) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了以下场景中的 `LOGICAL_ERROR` ("Unexpected return type from if") ：先执行条件为非常量或 false 的 `ALTER UPDATE col = ... WHERE <cond>`，再执行 `ALTER MODIFY COLUMN col <new type>`，之后在 `apply_mutations_on_fly = 1` 下读取该列时会报错。 [#108128](https://github.com/ClickHouse/ClickHouse/pull/108128) ([Groene AI](https://github.com/groeneai)).
* 修复了 `toStartOfInterval` 和 `dateTrunc` 在输入精度高于时间间隔单位时，返回的是四舍五入后的值，而不是其所在时间间隔起始值的问题。例如，`toStartOfInterval(toDateTime64('2023-10-09 10:11:12.000999', 6), INTERVAL 1 millisecond)` 之前返回 `10:11:12.001`，而不是 `10:11:12.000`。带显式 origin 的重载版本也受此影响。关闭 [#103535](https://github.com/ClickHouse/ClickHouse/issues/103535)。 [#108186](https://github.com/ClickHouse/ClickHouse/pull/108186) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 隐藏 `system.query_views_log` 中 `view_query` 列里的敏感信息。 [#108214](https://github.com/ClickHouse/ClickHouse/pull/108214) ([Valerii Mordovskii](https://github.com/Fidelaggio)).
* 修复了附加了旧版 `hypothesis` 跳过索引 (该索引类型已移除，仅为兼容 `ATTACH` 而保留) 的 `MergeTree` 表出现卡住的问题。此前，对此类表执行 lightweight `DELETE`、`OPTIMIZE`、普通 `INSERT` 或带过滤条件的 `SELECT` 时，都会因 `ILLEGAL_INDEX` ("Index of type 'hypothesis' is no longer supported") 而失败，并且 `DELETE` 变更会无限重试。现在，这个失效索引会被视为惰性的：在 merge/变更 过程中会原样保留，在 insert 和查询计划时会被跳过，并且仍可通过 `ALTER TABLE ... DROP INDEX` 删除。 [#108217](https://github.com/ClickHouse/ClickHouse/pull/108217) ([Groene AI](https://github.com/groeneai)).
* 修复了 setting `type_json_allow_duplicated_key_with_literal_and_nested_object` 在 `JSON` 中对类型化路径不起作用的问题。 [#108218](https://github.com/ClickHouse/ClickHouse/pull/108218) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在带有普通/聚合 projection 的 `MergeTree` 表上使用 `make_distributed_plan = 1` 执行查询时出现的 `LOGICAL_ERROR` (`Different list of shards in child plans`) 问题。 [#108256](https://github.com/ClickHouse/ClickHouse/pull/108256) ([Groene AI](https://github.com/groeneai)).
* 修复了 `replaceRegexpOne` 和 `replaceRegexpAll`，使 `.` 默认可匹配换行符，与其他 regular expression 函数保持一致。 [#108265](https://github.com/ClickHouse/ClickHouse/pull/108265) ([linjiayu1025-collab](https://github.com/linjiayu1025-collab)).
* 修复了通过 `accurateCastOrNull` 将 `Array(Dynamic)` 或 `Array(Variant)` 转换为 `QBit` 时的逻辑错误，例如 `accurateCastOrNull(CAST(range(114), 'Array(Dynamic)'), 'QBit(Float32, 114)')`。[#108288](https://github.com/ClickHouse/ClickHouse/pull/108288) ([Groene AI](https://github.com/groeneai)) 。
* `AggregateFunction` 状态列现在也会遵循 `index_granularity_bytes`。此前，这类列会忽略粒度的字节上限 (例如 `AggregatingMergeTree` 表中的 `uniqExact` 状态以及聚合 projections) ，从而生成远大于配置上限的粒度，并增加读取放大和查询时的内存占用。[#108297](https://github.com/ClickHouse/ClickHouse/pull/108297) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 lightweight `UPDATE`/`DELETE` 条件会被求值两次的问题，这可能导致非确定性条件出现错误行为，也会让确定性条件产生额外开销。关闭了 [#86032](https://github.com/ClickHouse/ClickHouse/issues/86032)。[#108323](https://github.com/ClickHouse/ClickHouse/pull/108323) ([ofeliacode](https://github.com/ofeliacode)) 。
* 修复了预定义 HTTP 处理程序中的一个异常：当某个 `headers_regexp` 正则表达式允许请求头为空值，而该请求头又未出现在请求中时，就会触发此异常。[#108324](https://github.com/ClickHouse/ClickHouse/pull/108324) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了 `arrayPartialSort` 在 limit argument 为非常量时的问题。[#108327](https://github.com/ClickHouse/ClickHouse/pull/108327) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了已取消或被 `KILL` 的 `INSERT` 在构建跳过索引时仍会长时间继续运行的问题 (例如高基数列上无界的 `set(0)` 索引) 。现在查询取消后，索引构建会及时停止。[#108351](https://github.com/ClickHouse/ClickHouse/pull/108351) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复了对 `primes` 表函数执行 `SELECT` 时无法响应取消的问题：当 `step` (或 `limit`) 较大时，查询在 `KILL QUERY` 或超时后仍可能继续运行很长时间。现在会及时停止。[#108353](https://github.com/ClickHouse/ClickHouse/pull/108353) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复了解析名称中包含子串 `INT` 的数据类型名称时的问题 (例如在数据类型位置上使用类似函数的名称 `quantileInterpolatedWeighted`) 。此前，这类名称会被误认为是 MySQL 整数类型，其第一个 `(...)` 参数组还会被静默吞掉并作为显示宽度修饰符处理，从而可能破坏查询格式化后的 round-trip。[#108354](https://github.com/ClickHouse/ClickHouse/pull/108354) ([Groene AI](https://github.com/groeneai)) 。
* 修复了一处不一致：格式错误的 `ARRAY JOIN` 后面如果跟着逗号和带括号的表列表，之前会被误解析为交叉连接，而不是直接拒绝。[#108365](https://github.com/ClickHouse/ClickHouse/pull/108365) ([Raúl Marín](https://github.com/Algunenano)) 。
* 当 `format_display_secrets_in_show_and_select` 被禁用 (默认值) 时，在 `EXPLAIN actions`、`EXPLAIN header` 和 `EXPLAIN PIPELINE` 的输出中隐藏 `encrypt`、`decrypt` 和 `HMAC` 等函数的 secret argument。[#108386](https://github.com/ClickHouse/ClickHouse/pull/108386) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了带 `TO` target 的可刷新materialized view 执行 `CREATE OR REPLACE` 时的问题：此前会被错误地拒绝，因为目标表已经归属正在被替换的视图。[#108392](https://github.com/ClickHouse/ClickHouse/pull/108392) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了一个服务端崩溃问题 (`Received signal 4`，非法指令) ：格式错误或不同步的原生 TCP 协议流可能触发该问题。现在，在解析之前会先校验客户端提供的初始地址是否为数字形式的 `host:port`，而不是让非数字端口传入存在陷阱的 `getservbyname` libc 函数。 [#108410](https://github.com/ClickHouse/ClickHouse/pull/108410) ([Groene AI](https://github.com/groeneai)).
* 修复了关闭过程中发生的一个服务端崩溃问题：当关闭数据库时抛出异常 (例如某个表的 flush 遇到 ZooKeeper 超时) 就可能触发该问题。现在不会再跳过后续关闭流程，因此系统日志会在服务端退出前完成 flush，并等待其线程结束。 [#108417](https://github.com/ClickHouse/ClickHouse/pull/108417) ([Groene AI](https://github.com/groeneai)).
* 修复了正则表达式函数 (`match`、`extract`、`extractAll`、`replaceRegexpOne`、`replaceRegexpAll` 等) 在模式中包含 NUL (`\0`) 字节时静默返回错误结果的问题。现在 NUL 会被视为普通字面量字节，与 RE2 保持一致。 [#108427](https://github.com/ClickHouse/ClickHouse/pull/108427) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `clickhouse-local` 在未配置 `http_options_response` 时，对 HTTP `OPTIONS` 请求返回空响应的问题；这会导致 Web UI (`/play`) 将连接显示为已断开，即使查询实际上可以正常工作。 [#108428](https://github.com/ClickHouse/ClickHouse/pull/108428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了以下场景下的 `LOGICAL_ERROR` (`"Invalid action query tree node ..."`) 异常：分布式查询同时对结构相同的重复 `ALIAS` 列进行去重，并引用带有 `key = value` 命名集合参数的 table function (例如 `oss(s3_conn, filename = '...')`) 。 [#108435](https://github.com/ClickHouse/ClickHouse/pull/108435) ([Groene AI](https://github.com/groeneai)).
* 修复了一个服务端崩溃问题 (`LOGICAL_ERROR: 'Unexpected exception in refresh scheduling'`) ：当 `Replicated` 数据库中的协调式可刷新materialized view 挂载到不支持 `MULTI_READ` feature flag 的 Keeper 上时 (例如 Keeper 降级后) ，服务端在启动时可能发生该问题。现在该视图会被优雅停止，而不是直接中止服务端。 [#108441](https://github.com/ClickHouse/ClickHouse/pull/108441) ([Groene AI](https://github.com/groeneai)).
* 修复了在并行副本下从 `MergeTree` 表中选择虚拟列时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误 (例如 `Column _part not found`) ，包括在 `asterisk_include_virtual_columns = 1` 时通过 `SELECT *` 进行选择的场景。 [#108451](https://github.com/ClickHouse/ClickHouse/pull/108451) ([Groene AI](https://github.com/groeneai)).
* `SYSTEM RESET DDL WORKER` 现在需要新的 `SYSTEM RESET DDL WORKER` 权限。此前，任何已通过身份验证的用户 (包括 `readonly` 用户) 都可以执行它，并反复重置 DDL worker 状态，从而阻塞 `ON CLUSTER` DDL。 [#108460](https://github.com/ClickHouse/ClickHouse/pull/108460) ([Groene AI](https://github.com/groeneai)).
* 现已将 `catboostEvaluate` 的模型路径限制为 `user_files` 目录，与 `file` table function 和字典源一致。此前，该函数接受任意文件系统路径，且不进行范围检查，这使得用户可以探测 `user_files` 之外的文件是否存在，并触发对这些文件的读取。现在模型必须位于 `user_files` 内。 [#108463](https://github.com/ClickHouse/ClickHouse/pull/108463) ([Groene AI](https://github.com/groeneai)).
* `hasColumnInTable` 函数现在要求对目标表具有 `SHOW COLUMNS` 权限，这与 `DESCRIBE` 和 `SHOW CREATE TABLE` 所需的授权一致。此前，任何用户都可以调用 `hasColumnInTable` 来探测列名，并在没有任何访问检查的情况下测试表和数据库是否存在。 [#108464](https://github.com/ClickHouse/ClickHouse/pull/108464) ([Groene AI](https://github.com/groeneai)).
* 修复了在为 `mannWhitneyUTest`、`rankCorr`、`largestTriangleThreeBuckets`、`quantileGK`、`sequenceMatch`/`sequenceCount` 和 `groupArrayIntersect` 反序列化恶意构造的 aggregate function states 时出现的过度内存分配问题。格式错误的状态可能会声明一个巨大的元素数量，导致 server 仅凭几个字节的输入就尝试分配数十 GB 内存；现在这类状态会被以 `TOO_LARGE_ARRAY_SIZE` 拒绝。[#108465](https://github.com/ClickHouse/ClickHouse/pull/108465) ([Groene AI](https://github.com/groeneai)).
* 现会根据 `remote_url_allow_hosts` (`RemoteHostFilter`) 校验 S3 `301 Moved Permanently` 响应的重定向目标。此前，AWS SDK 在处理 301 时，会跟随响应中由攻击者提供的端点 (`Location` 请求头或 `<Endpoint>` 元素) ，却不会执行 host 检查，因此恶意或已被攻陷的兼容 S3 server 可以将 ClickHouse 重定向到任意 host (SSRF) 。307 重定向路径原本就会执行此检查；现在两条路径的行为已保持一致。[#108466](https://github.com/ClickHouse/ClickHouse/pull/108466) ([Groene AI](https://github.com/groeneai)).
* 修复了凭据泄露问题：`DataLakeCatalog` database engine 的旧版 `storage_aws_access_key_id`、`storage_aws_secret_access_key`、`storage_catalog_credential` 和 `storage_auth_header` settings 之前会以 plaintext 形式显示在 `system.databases.engine_full` 和 `SHOW CREATE DATABASE` 中。现在它们会被脱敏为 `[HIDDEN]`。[#108470](https://github.com/ClickHouse/ClickHouse/pull/108470) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ssl_certificate` 用户识别逻辑，使单个 `*` 通配符只匹配恰好一个名称组件 (RFC 6125 6.4.3) 。此前，`CN` 或 `DNS:` SAN subject 中的通配符 (例如 `*.corp.example.com`) 也会匹配多级标签名称，例如 `evil.deep.corp.example.com`，从而让持有更深层 subdomain 证书的用户能够以该通配符用户身份通过认证。`URI:` SAN 的匹配行为保持不变。[#108472](https://github.com/ClickHouse/ClickHouse/pull/108472) ([Groene AI](https://github.com/groeneai)).
* 修复了 MySQL wire 协议中的 SQL 注入问题：通过 MySQL interface (端口 9004) 发送的 `SHOW TABLE STATUS LIKE` argument 和 `SET <mysql_setting>` 值，现在会先解析并重新加引号，而不是直接原样拼接到重写后的查询中。同时还修复了通过 MySQL interface 执行 `KILL QUERY <id>` 时会静默忽略多位 connection id 的问题。[#108474](https://github.com/ClickHouse/ClickHouse/pull/108474) ([Groene AI](https://github.com/groeneai)).
* 通过 HTTP 查询字符串参数传递的敏感值 (例如 `param_*` 查询参数绑定，如 `param_secret_key`/`param_aws_secret_access_key`、`password` parameter，或 S3 风格的 `signature` parameter) 将不再原样写入 `system.text_log` 或 OpenTelemetry spans。`Request URI` 日志行现在会对名称看起来敏感的 parameter 值进行脱敏，将其替换为 `[HIDDEN]`。[#108475](https://github.com/ClickHouse/ClickHouse/pull/108475) ([Groene AI](https://github.com/groeneai)).
* 在对 `url` table function 和 `URL` storage engine 执行 schema inference 时，现会强制应用 `http_forbid_headers` configuration。此前，在推断 schema 时 (例如使用 `Regexp` format 或 `DESCRIBE`) ，被禁止的请求头仍然会通过网络发送，其 response body 还可能在 parse 错误中被回显，从而泄露 secret。现在，在推断路径上进行任何网络访问之前就会先检查请求头过滤器，这与 `urlCluster` 的现有行为保持一致。[#108476](https://github.com/ClickHouse/ClickHouse/pull/108476) ([Groene AI](https://github.com/groeneai)).
* 修复了将 `SELECT ... SAMPLE ...` 与 query condition cache (setting `use_query_condition_cache`，默认启用) 一起使用时会得到错误结果的问题。[#108488](https://github.com/ClickHouse/ClickHouse/pull/108488) ([Groene AI](https://github.com/groeneai)).
* 修复了当 `max_parser_depth` 设为较大值时，由深度嵌套的表达式 (如 `[[[ ... ]]]` 或 `array(array( ... ))`) 导致的服务器崩溃 (栈溢出) 问题。[#108493](https://github.com/ClickHouse/ClickHouse/pull/108493) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `RabbitMQ` 表引擎在 broker 因错过心跳且未发送 TCP RST 而关闭 AMQP 连接时，在 `DROP TABLE` 或服务器关闭期间无限期卡住的问题。现在所有阻塞式事件循环调用都设有 30 秒超时，因此关闭流程始终能够完成。[#108497](https://github.com/ClickHouse/ClickHouse/pull/108497) ([Aly Ayman](https://github.com/alyelmorsy-dataengineer)).
* 作为内部查询一部分执行的次级查询现在会被记录为内部查询。[#108506](https://github.com/ClickHouse/ClickHouse/pull/108506) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* `ArrowFlight` 表引擎和 `arrowFlight` 表函数现在会遵循 `<remote_url_allow_hosts>` 允许列表。此前不会校验连接的 host 和 port，因此查询可能访问不在允许列表中的 hosts。[#108507](https://github.com/ClickHouse/ClickHouse/pull/108507) ([Groene AI](https://github.com/groeneai)).
* MySQL wire 协议命令 `COM_FIELD_LIST` (`mysql_list_fields`) 和 `COM_INIT_DB` (`USE database`) 现在会执行与其 SQL 等价命令 (`SHOW COLUMNS`/`DESCRIBE` 和 `USE`) 相同的访问控制。此前，它们可能泄露用户仅拥有部分列权限的表的列名，并且可在没有 `SHOW DATABASES` 权限的情况下切换当前数据库。[#108508](https://github.com/ClickHouse/ClickHouse/pull/108508) ([Groene AI](https://github.com/groeneai)).
* 现在会以不区分大小写的方式匹配 `http_forbid_headers`。HTTP 请求头名称不区分大小写，因此禁止 `Authorization` 现在也会阻止 `authorization`、`AUTHORIZATION` 以及其他大小写变体。已配置的 `header_regexp` 模式现在也会以不区分大小写的方式匹配，无需显式使用 `(?i)` 标志。[#108509](https://github.com/ClickHouse/ClickHouse/pull/108509) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能导致服务器崩溃 (段错误) 的问题：当 distributed query 将尚未物化的 `MATERIALIZED` CTE 作为外部表引用，且远程源以惰性方式创建时，就可能发生该问题。[#108547](https://github.com/ClickHouse/ClickHouse/pull/108547) ([Groene AI](https://github.com/groeneai)).
* 修复了查询条件缓存 (`use_query_condition_cache = 1`) 在为执行了不同跳过索引集合的查询复用由跳过索引得出的 mark 排除结果时导致结果错误的问题，例如使用 `use_skip_indexes = 0`、`ignore_data_skipping_indices` 或不同的 `use_skip_indexes_for_disjunctions` 模式时。现在，这类由跳过索引派生的缓存条目会按实际执行的跳过索引集合进行键控。[#108548](https://github.com/ClickHouse/ClickHouse/pull/108548) ([Groene AI](https://github.com/groeneai)).
* 修复了 `changeYear`、`changeMonth`、`changeDay`、`changeHour`、`changeMinute` 和 `changeSecond` 在使用 `DateTime64` argument 时的多个 bug：结果列会以硬编码的默认标度 3 创建，而不是使用 argument 的标度；当结果传给 `arrayPushBack`/`arrayPushFront`/`arrayConcat` 时，这会导致 `LOGICAL_ERROR` (`writeSlice expects same column types`) ；纳秒精度 (标度 9) 输入会抛出 `DECIMAL_OVERFLOW`；以及早于纪元的亚秒输入会返回错误的日历秒。同时还修复了 `timeSlots` 处理 `DateTime64` 时，在其声明的 return type 中忽略可选 `Size` argument 的标度，以及对 `Size` 中最大标度返回错误 timestamps 的问题。[#108551](https://github.com/ClickHouse/ClickHouse/pull/108551) ([Groene AI](https://github.com/groeneai)). [#108681](https://github.com/ClickHouse/ClickHouse/pull/108681) ([Takumi Hara](https://github.com/takumihara)). [#108994](https://github.com/ClickHouse/ClickHouse/pull/108994) ([Groene AI](https://github.com/groeneai)).
* 修复了在启用 `enable_identifier_resolve_cache` (默认开启) 时，若复合谓词在 `GROUP BY` 中使用了别名并再次被引用，会触发 `NOT_FOUND_COLUMN_IN_BLOCK` 错误的问题。[#108553](https://github.com/ClickHouse/ClickHouse/pull/108553) ([Groene AI](https://github.com/groeneai)).
* 修复了对 `STREAM` 读取执行 `DISTINCT` 时出现的逻辑错误 (`Equal values are not contiguous within the range assumed to be sorted`)  (`SELECT DISTINCT ... FROM table STREAM`) 。读取顺序优化不再应用于 `STREAM` 读取，因为它产生的行按提交顺序排列，而不是按排序键顺序排列。[#108568](https://github.com/ClickHouse/ClickHouse/pull/108568) ([Groene AI](https://github.com/groeneai)).
* 修复了两种情况下，投影返回的是列类型的默认值 (例如 `0`) ，而不是声明的 `DEFAULT` 值 (例如 `-1`) ：一是读取在投影创建后通过 `ALTER TABLE ... ADD COLUMN ... DEFAULT` 新增的列时 (从 base table 读取原本就是正确的) ；二是在 Wide part 上该列的 `TTL` 过期后。[#108569](https://github.com/ClickHouse/ClickHouse/pull/108569) ([Shaohua Wang](https://github.com/tiandiwonder)). [#109013](https://github.com/ClickHouse/ClickHouse/pull/109013) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了向 S3 上传 (例如备份) 时，如果在瞬时读取错误后重试，可能出现 `ReadBuffer is canceled. Can't read from it.` 错误的问题。[#108573](https://github.com/ClickHouse/ClickHouse/pull/108573) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ATTACH PARTITION ... FROM` 会拒绝主键等价但声明方式不同的表的问题 (一个显式声明了 `PRIMARY KEY`，另一个则由 `ORDER BY` 隐式推导) 。[#108590](https://github.com/ClickHouse/ClickHouse/pull/108590) ([Jordi Orihuela](https://github.com/jordiori)).
* 修复了在多个文本索引处于部分 materialized 状态时，从文本索引直接读取会失败的问题。修复了 [#108530](https://github.com/ClickHouse/ClickHouse/issues/108530)。[#108607](https://github.com/ClickHouse/ClickHouse/pull/108607) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了一处元数据泄露问题：`DESCRIBE loop('db', 'table')` 和 `DESCRIBE loop(<inner table function>)` 会绕过 `SHOW COLUMNS` / 源访问检查，使无权限用户也能读取表的列 schema。[#108624](https://github.com/ClickHouse/ClickHouse/pull/108624) ([Groene AI](https://github.com/groeneai)).
* 修复了 `S3Queue` 和 `AzureQueue` 表引擎中的 `_etag` 虚拟列：该列虽已声明，但从未被填充，因此 `SELECT _etag` 一直返回空字符串。现在它会像 `S3` engine 和 `s3` table function 一样，返回对象的 ETag。[#108625](https://github.com/ClickHouse/ClickHouse/pull/108625) ([Groene AI](https://github.com/groeneai)).
* 修复了读取 `Arrow`、`ArrowStream` 以及基于 Arrow 的 `ORC` 文件时的问题：如果其中的 timestamp 列将固定数值 UTC 偏移 (例如 `+05:30`、`-08:00`、`00:00`) 或非 IANA 标记 `fixed` 作为 timezone，此前会报 `Cannot load time zone ...` (`BAD_ARGUMENTS`) 错误。[#108633](https://github.com/ClickHouse/ClickHouse/pull/108633) ([Groene AI](https://github.com/groeneai)).
* 修复了在将 `join_algorithm = 'full_sorting_merge'` 用于 `SEMI`/`ANTI` join 时出现的异常 (`LOGICAL_ERROR: Join is supported only for pipelines with one output port` 或 `NOT_IMPLEMENTED: MergeJoinAlgorithm is not implemented for strictness Semi`) ，包括对相关 `EXISTS` subquery 去关联后生成的 join。现在，`full_sorting_merge` 会拒绝它无法执行的 strictness/kind 组合，因此规划器会回退到其他已启用的算法，或报告该 join 无法执行。[#108658](https://github.com/ClickHouse/ClickHouse/pull/108658) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用 `positions = 1` 为包含大量不同短 token 的数据构建 text index 时出现的 heap buffer overflow。[#108659](https://github.com/ClickHouse/ClickHouse/pull/108659) ([Groene AI](https://github.com/groeneai)).
* 现在，当从 S3 读取或向 S3 写入数据的查询在某个 S3 请求仍在进行中时被取消 (例如通过 `KILL QUERY`) ，系统会将其报告为已取消，而不是误导性的网络/S3 错误。特别是，向 S3 执行 backup 或从 S3 执行 restore 被取消后，现在会在 `system.backups` 中报告为 `BACKUP_CANCELLED`/`RESTORE_CANCELLED`。[#108673](https://github.com/ClickHouse/ClickHouse/pull/108673) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了一个启动失败问题：由旧版本 (25.12 或更早) 创建且带有格式错误 `auth_header` 的 `DataLakeCatalog` database，在升级到 26.2 或更高版本后无法 attached，导致 server 无法启动。现在仅在 `CREATE` 时验证 `auth_header`；而在 `ATTACH` 时，catalog 改为在首次使用时才延迟构建，而不是在启动期间构建，因此单个配置错误或无法访问的 catalog database 不会再阻塞 server 启动。[#108674](https://github.com/ClickHouse/ClickHouse/pull/108674) ([Groene AI](https://github.com/groeneai)).
* 修复了在合并期间出现的逻辑错误 (`Sort order of blocks violated`) 以及错误读取问题；该问题发生在将 `Nullable(Tuple(...))` 列中的非 Nullable `LowCardinality` 元素用作 subcolumn 时 (例如作为排序键) 。[#108679](https://github.com/ClickHouse/ClickHouse/pull/108679) ([Groene AI](https://github.com/groeneai)).
* 修复了当 `SYSTEM FLUSH DISTRIBUTED` 与对同一个 `Distributed` 表执行 `DROP TABLE` 并发运行时，可能发生的崩溃 (use-after-free) 。[#108684](https://github.com/ClickHouse/ClickHouse/pull/108684) ([Groene AI](https://github.com/groeneai)).
* 修复了 Azure account key 的 Base64 解码崩溃问题；当 key 不是有效的 Base64 时，可通过 `azureBlobStorage` (以及相关的 Azure table functions 和 storages) 触发：字节 `>= 0x80` 会导致越界读取，任意无效字节都会引发 undefined behaviour。现在无效 key 会被明确拒绝。[#108716](https://github.com/ClickHouse/ClickHouse/pull/108716) ([Groene AI](https://github.com/groeneai)).
* 修复了以下情况下出现的 `NUMBER_OF_COLUMNS_DOESNT_MATCH` 错误：对 `Distributed` 表的 subquery 读取两个或更多展开为相同 expression 的 `ALIAS` 列 (例如 `a1 String ALIAS toString(x), a2 String ALIAS toString(x)`) ，且该 subquery 作为外层查询的输入，例如 `SELECT count() FROM (SELECT a1, a2 FROM dist GROUP BY a1, a2)`。[#108725](https://github.com/ClickHouse/ClickHouse/pull/108725) ([Groene AI](https://github.com/groeneai)).
* 修复了 `CREATE OR REPLACE MATERIALIZED VIEW ... POPULATE` 会导致新视图未订阅其 source table 的问题，从而静默丢弃 replace 之后插入的每一行。[#108728](https://github.com/ClickHouse/ClickHouse/pull/108728) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个异常 (`Cannot find sharding key column`，并且在 debug 和 sanitizer build 中会导致 server 中止) ，该问题发生在 `Distributed` 表的 sharding key 是一个会被 analyzer 做常量折叠的 expression 时，例如 `if(1, toInt32(id), toInt32(id) + 1)`，并且设置了 `optimize_skip_unused_shards = 1`。[#108737](https://github.com/ClickHouse/ClickHouse/pull/108737) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `GROUPING SETS`/`ROLLUP`/`CUBE` 中将 `group_by_use_nulls` 与 `LowCardinality` 常量 grouping key 一起使用时，出现的逻辑错误 (`Bad cast from type DB::ColumnNullable to DB::ColumnString`) 以及可能产生错误结果的问题。[#108771](https://github.com/ClickHouse/ClickHouse/pull/108771) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了这样一个问题：当键中的 `LowCardinality(FixedString)` (或 `LowCardinality(Nullable(FixedString))`) 键列被函数包裹时，分区和主键裁剪会被静默禁用，例如 `PARTITION BY sipHash64(k) % N` 配合 `WHERE k = 'literal'`。此前，这类查询会扫描所有分区，而不是将其裁剪掉。[#108777](https://github.com/ClickHouse/ClickHouse/pull/108777) ([Groene AI](https://github.com/groeneai)).
* 修复了一个逻辑错误 (在 debug 和 sanitizer 构建中会导致服务器中止) ：当通过 `Alias` 表执行 `INSERT ... SELECT`，或向 `TimeSeries` 表插入数据时，如果在没有异常的情况下被取消，例如使用 `timeout_overflow_mode = 'break'`，就会触发该问题。[#108783](https://github.com/ClickHouse/ClickHouse/pull/108783) ([Groene AI](https://github.com/groeneai)). [#108796](https://github.com/ClickHouse/ClickHouse/pull/108796) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了一个 `Bad cast from type DB::ColumnSparse to DB::ColumnString` 逻辑错误 (在 debug 和 sanitizer 构建中会导致服务器中止) ：当 `groupConcat` 应用于某个 `Tuple`，且其中的 `String` 元素以稀疏方式存储时，就会触发该问题。[#108790](https://github.com/ClickHouse/ClickHouse/pull/108790) ([Groene AI](https://github.com/groeneai)).
* 修复了 `mapFilter`、`mapSort`、`mapReverseSort`、`mapPartialSort` 和 `mapConcat` 中的 `TYPE_MISMATCH` 问题：当 `Map` 值中包含带有 `LowCardinality` 的嵌套 `Map` 时会出现该问题，例如 `mapFilter((k, v) -> 1, map('a'::LowCardinality(String), map('x'::LowCardinality(String), 'y')))`。[#108798](https://github.com/ClickHouse/ClickHouse/pull/108798) ([Groene AI](https://github.com/groeneai)).
* 修复了 `insert_quorum = 'auto'` 的一个问题：当存活的副本少于多数时，系统不会提前拒绝插入。现在，这类插入会立即以 `TOO_FEW_LIVE_REPLICAS` 失败，而不是先写入本地分片，之后再因 `UNKNOWN_STATUS_OF_INSERT` 超时。[#108800](https://github.com/ClickHouse/ClickHouse/pull/108800) ([Gagan Dhakrey](https://github.com/gagandhakrey)).
* 修复了一个 bug：`JOIN` 的 `WITH TOTALS` 行可能会包含默认值 (例如 `0`) ，而不是来自 join 一侧常量子查询的常量值。该错误结果只会在某些 JOIN 顺序下，或启用 `query_plan_join_swap_table` 设置时出现。[#108807](https://github.com/ClickHouse/ClickHouse/pull/108807) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了一个可能发生的 segmentation fault (空指针解引用) ：当服务器关闭与 `S3Queue`/`AzureQueue` 表关闭并发进行时，可能会触发该问题。[#108810](https://github.com/ClickHouse/ClickHouse/pull/108810) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了一个启动中止问题 (`Cannot allocate ThreadStack`、`EINVAL`) ：在 glibc 构建中运行于具有较大 signal-stack 大小的 CPU 上时 (例如搭配支持 AMX 的内核的 Intel Sapphire Rapids / Granite Rapids) ，如果 signal alt-stack 的大小没有向上舍入到页大小的整数倍，就可能触发该问题。[#108813](https://github.com/ClickHouse/ClickHouse/pull/108813) ([Groene AI](https://github.com/groeneai)).
* 修复了分布式查询偶尔会以 `UNEXPECTED_PACKET_FROM_SERVER` (`expected TablesStatusResponse, got ProfileInfo`) 失败的问题：当连接池复用了一个因先前已取消的查询而处于不同步状态的连接时，就会发生该问题。[#108854](https://github.com/ClickHouse/ClickHouse/pull/108854) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个 logical error (在 release 构建中表现为异常，在 debug 和 sanitizer 构建中表现为 server 中止) ：该问题可能出现在分布式表上，对带有多个 `LowCardinality` 参数的函数进行调用时，例如将 `concatAssumeInjective((SELECT toLowCardinality('p')), s)` 与 `remote` table function 一起用作 `GROUP BY` 键。相关报错信息为 `Default functions implementation for LowCardinality is supported only with a single LowCardinality argument` 或 `Expected the argument ... to have N rows, but it has M`。[#108871](https://github.com/ClickHouse/ClickHouse/pull/108871) ([Groene AI](https://github.com/groeneai)).
* 修复了 `reinterpret(x, 'Decimal128(scale)')` (以及目标为 `Decimal32`/`Decimal64`/`Decimal256`/`DateTime64` 的情况) 的问题：当 source 和 target 具有相同的物理 type 时，生成的结果列其内部标度使用的是 source 的标度，而不是请求的 target 标度。值本身是正确的，但列表对象在结构上与其声明的 type 不一致。[#108878](https://github.com/ClickHouse/ClickHouse/pull/108878) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (`New empty part is about to materialize but the directory already exist`) ：在 debug 和 sanitizer 构建中，当对 `MergeTree` 表执行 `DROP`/`DETACH`/`MOVE`/`REPLACE PARTITION`，且此前同类操作曾被中断 (例如事务回滚或崩溃) 并遗留了过期的 `tmp_empty_<part>` directory 时，可能导致 server 中止。现在会回收该过期 directory，而不是直接失败。[#108879](https://github.com/ClickHouse/ClickHouse/pull/108879) ([Groene AI](https://github.com/groeneai)).
* 修复了 ClickHouse Keeper 在 `Create2` 响应的 `Stat` 中错误返回 `dataLength = 0` 的问题，以及 ClickHouse ZooKeeper 客户端未反序列化 `Create2` 响应中 `Stat` 的问题。[#108909](https://github.com/ClickHouse/ClickHouse/pull/108909) ([unintended](https://github.com/unintended)).
* 修复了 `clickhouse-local` 拒绝接受紧邻 `=` 写出的空选项值的问题 (例如 `--format_csv_null_representation=''`) ；现在其行为与 `--format_csv_null_representation ""` 和 `SET format_csv_null_representation = ''` 一致。[#108910](https://github.com/ClickHouse/ClickHouse/pull/108910) ([Vismay](https://github.com/vismaytiwari)).
* 修复了一个 `LOGICAL_ERROR` (`Inconsistent AST formatting`) ：在格式化同时包含命名和未命名元素的 `Tuple` Data type 时 (例如 `Tuple(a UInt8, UInt16)`) ，会导致 server 在 debug 和 sanitizer 构建中中止。[#108915](https://github.com/ClickHouse/ClickHouse/pull/108915) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用 `GROUPING SETS`、`ROLLUP` 或 `CUBE` 且 `max_threads > 1` 时，合并 `uniqExact` aggregate states 会发生 segmentation fault 的问题。[#108928](https://github.com/ClickHouse/ClickHouse/pull/108928) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在启用 lazy 列复制 (`enable_lazy_columns_replication`) 时，如果某个 `INSERT` 因批处理中途出错而回滚 (例如在 `Buffer` 表、异步插入，或 `Kafka`/`RabbitMQ`/`FileLog` 引擎中) ，可能导致结果错误或越界 reads 的问题。[#108935](https://github.com/ClickHouse/ClickHouse/pull/108935) ([Groene AI](https://github.com/groeneai)).
* `join_any_take_last_row` 现在会被所有受支持的基于哈希的 join 路径正确应用，包括使用自动落盘的 join。[#108936](https://github.com/ClickHouse/ClickHouse/pull/108936) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了 analyzer 中的一个 bug：`JOIN` 中某个表上的 `FINAL` (例如 `FROM t1 FINAL JOIN t2`) 会被错误地应用到其他参与 join 的表上，从而可能导致此类查询变慢。[#108979](https://github.com/ClickHouse/ClickHouse/pull/108979) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了一个 `LOGICAL_ERROR` (“Cannot find `__grouping_set` column in header of MergingAggregatedTransform with grouping sets” 或 “Chunk info was not set for chunk in MergingAggregatedTransform”) ：在禁用 analyzer 的情况下，对于 `UNION ALL`/`INTERSECT`/`EXCEPT` 查询，如果一个分支在并行副本下使用 `GROUP BY GROUPING SETS`，另一个分支使用 `FINAL`，就可能触发该问题。[#109003](https://github.com/ClickHouse/ClickHouse/pull/109003) ([Groene AI](https://github.com/groeneai)).
* 修复了自动并行副本规划器中的一个 `LOGICAL_ERROR`，该问题可能在启用 `automatic_parallel_replicas_mode` 且 `parallel_replicas_min_number_of_rows_per_replica` 大于 0 时出现。[#109011](https://github.com/ClickHouse/ClickHouse/pull/109011) ([Groene AI](https://github.com/groeneai)).
* 修复了 `MsgPack` format 在 schema inference 期间过度分配内存的问题：对于损坏的输入，如果其 array/map/string/binary 请求头声明了极大的元素数量，将不再触发单次数 GB 的内存分配，而是会被判定为格式错误的输入并拒绝。这修复了 release 构建中的内存耗尽问题 (以及 sanitizer 下的 `allocation-size-too-big` 中止) 。[#109019](https://github.com/ClickHouse/ClickHouse/pull/109019) ([Groene AI](https://github.com/groeneai)).
* 修复了在服务器端解析的 `DateTime`/`DateTime64` 字符串字面量中，`use_client_time_zone` 被忽略的问题 (异步 `INSERT`、`SELECT` 字面量) 。现在，当启用 `use_client_time_zone` 时，客户端会将其本地时区通过 `session_timezone` 传递过去，因此服务器端的解析结果将与同步 `INSERT` 路径保持一致。[#109051](https://github.com/ClickHouse/ClickHouse/pull/109051) ([Groene AI](https://github.com/groeneai)).
* 修复了在启用 `query_plan_optimize_lazy_final`，且 `WHERE` 过滤条件部分下推到 `PREWHERE` (通过 `optimize_move_to_prewhere_if_final`) 时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误。[#109073](https://github.com/ClickHouse/ClickHouse/pull/109073) ([Groene AI](https://github.com/groeneai)).
* 修复了在查询中使用限定星号 (如 `b.*`) 时的一个错误：当 `b` 是表 (或子查询/CTE) 的别名，且其名称与另一张表中的某个非复合列同名时，就会触发该问题。此类查询现在不再失败，并且会正确选择 `b` 的所有列。[#109078](https://github.com/ClickHouse/ClickHouse/pull/109078) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了 `JoinStep` 中的 `Block structure mismatch` 逻辑错误 (在 debug 和 sanitizer 构建中会导致 server 中止) ：当相关子查询被去相关并转换为 join，且源关系中同一个列名出现多次时，就可能触发该问题，例如在 `correlated_subqueries_default_join_kind = 'right'` 的情况下：`WITH t AS (SELECT number, * FROM numbers(3)) SELECT *, (SELECT t.number WHERE t.number >= 0) FROM t`。[#109114](https://github.com/ClickHouse/ClickHouse/pull/109114) ([Groene AI](https://github.com/groeneai)).
* 修复了一个卡住问题：通过文件系统缓存读取的查询在被 `KILL QUERY` 取消后，仍可能一直等待一个正在进行的下载；同时，如果某个可刷新materialized view 的刷新过程正卡在这样的等待中，删除该 view 或对其执行 `SYSTEM STOP VIEW` 也会被阻塞。[#109116](https://github.com/ClickHouse/ClickHouse/pull/109116) ([Murphy](https://github.com/murphy-4o)).
* 修复了向带有 materialized views 的表执行 insert 时，`parallel_view_processing` setting 被忽略的问题——自 25.10 起，无论该 setting 如何，views 都会始终并行运行。[#109170](https://github.com/ClickHouse/ClickHouse/pull/109170) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了解析器中的一个不一致问题：`INSERT` 的列列表接受写作 `t.* LIKE '<pattern>'` / `t.* ILIKE '<pattern>'` 的限定列匹配器，却拒绝其规范形式 `t.COLUMNS('<regexp>')`，从而破坏了查询 format 的往返一致性 (并会在 debug 和 sanitizer 构建中导致 server 中止) 。[#109176](https://github.com/ClickHouse/ClickHouse/pull/109176) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ProfileEvents` 增量非单调的问题：在 socket 超时或 AIO 失败时，`NetworkReceiveBytes` 和 `AIOWriteBytes` 计数器可能会按负值递增 (回绕成一个巨大的值) ，并且 `MemoryOvercommitWaitTimeMicroseconds` 使用了非单调时钟计时。[#109180](https://github.com/ClickHouse/ClickHouse/pull/109180) ([Azat Khuzhin](https://github.com/azat)).
* 修复了 `Arrow`、`ArrowStream`、`Avro` 格式以及旧版 `ORC` 和 `Parquet` 读取器在对可空结构体列进行 schema inference 时返回 `Nullable(Tuple)` 的问题，而 `Nullable(Tuple)` 类型并不允许使用 (`allow_experimental_nullable_tuple_type` 已禁用) 。`DESCRIBE` 返回的类型会被 `CREATE TABLE` 拒绝，因此使用推断出的 schema 创建表或插入数据时会失败，并报错 `Nullable Tuple type is not allowed`。[#109185](https://github.com/ClickHouse/ClickHouse/pull/109185) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了关联 `EXISTS` 和标量子查询在关联条件仅出现在子查询投影中、同时带有非关联 `WHERE` 子句时返回错误结果的问题 (子查询可能对每一行都求值为 false / `NULL`) 。修复了 [#105760](https://github.com/ClickHouse/ClickHouse/issues/105760)。[#109186](https://github.com/ClickHouse/ClickHouse/pull/109186) ([Dmitry Novik](https://github.com/novikd)).
* 修复了 `CREATE USER ... HOST LIKE 'a', 'b'` (以及等价的 `ALTER USER`) 静默地只保留第一个 pattern 的问题。现在，所有指定的 `HOST LIKE` pattern 都会存储到该用户的主机允许列表中。[#109187](https://github.com/ClickHouse/ClickHouse/pull/109187) ([Groene AI](https://github.com/groeneai)).
* 修复了定义在 `mapValues(map)` 或 `mapKeys(map)` 上的文本索引在通过启用 analyzer 的 `Distributed` engine 表查询时被静默忽略的问题。该索引在本地表以及通过 `cluster`/`remote` table function 查询时都能使用，但通过 `Distributed` engine 表查询时会跳过它 (并在 `force_data_skipping_indices` 下因 `INDEX_NOT_USED` 而失败) 。[#109188](https://github.com/ClickHouse/ClickHouse/pull/109188) ([Groene AI](https://github.com/groeneai)).
* 修复了一个错误的 `LOGICAL_ERROR` (`There was an error on <host>: Cannot obtain error message (probably it's a bug)`) ：当在 `Replicated` database 上运行 DDL query，且 Keeper 中按主机划分的 `finished` 状态节点已经被清理时，这个错误可能会在 debug 和 sanitizer 构建中导致服务器中止。[#109192](https://github.com/ClickHouse/ClickHouse/pull/109192) ([Groene AI](https://github.com/groeneai)).
* 修复了指数部分的量级超出 `Int32` 范围的 `SAMPLE` 比例 (例如 `SAMPLE 1e-3000000000`) 被静默当作 `SAMPLE 1` 处理的问题。[#109197](https://github.com/ClickHouse/ClickHouse/pull/109197) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `SYSTEM PREWARM PRIMARY INDEX CACHE ... ON CLUSTER` 的访问检查，该检查此前错误地要求 `SYSTEM PREWARM MARK CACHE` privilege，而不是 `SYSTEM PREWARM PRIMARY INDEX CACHE`。[#109198](https://github.com/ClickHouse/ClickHouse/pull/109198) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了使用自定义 `disk` setting (`SETTINGS disk = disk(...)`) 创建的 `MergeTree` 表在执行 `ALTER` queries 时失败的问题。修复了 [#63019](https://github.com/ClickHouse/ClickHouse/issues/63019)。[#109199](https://github.com/ClickHouse/ClickHouse/pull/109199) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了一个服务端崩溃问题：当窗口上下文 (`OVER ()`) 和普通聚合中的聚合函数 `cramersV`、`cramersVBiasCorrected`、`contingency` 或 `theilsU` 的状态，经由链式集合操作 (`EXCEPT`、`INTERSECT`) 或嵌套的 `UNION ALL` 组合后再被读取时 (例如通过 `-Merge` 组合器) ，会触发该问题。[#109200](https://github.com/ClickHouse/ClickHouse/pull/109200) ([Groene AI](https://github.com/groeneai)).
* 修复了常量 `ON` 条件下 `ANY JOIN` 的错误结果 (例如 `t1 ANY INNER JOIN t2 ON 1`) ：该查询此前返回的是完整笛卡尔积，而不是 `ANY` join 结果。[#109207](https://github.com/ClickHouse/ClickHouse/pull/109207) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了启用 deduplication 的异步 insert 场景下的服务端崩溃问题：当 `optimize_on_insert` 使插入块为空时 (例如在 `SummingMergeTree` 中，行求和结果为零) ，会触发该问题。[#109229](https://github.com/ClickHouse/ClickHouse/pull/109229) ([Den Kalantaevskii](https://github.com/Diskein)).
* 修复了 `SYSTEM DROP REPLICA` 和 `SYSTEM DROP DATABASE REPLICA ... FROM ZKPATH`：现在会在解析阶段以 `BAD_ARGUMENTS` 拒绝空的或仅包含根节点的 ZooKeeper 路径，将辅助 Keeper 路径路由到指定的 Keeper，并对 Keeper 路径进行规范化，从而避免本地自保护检查误指向目标副本或被绕过。[#109230](https://github.com/ClickHouse/ClickHouse/pull/109230) ([Groene AI](https://github.com/groeneai)).
* 修复了 S3 settings 的优先级问题：按 URL 作用域配置的 `<s3>` endpoint 块现在优先于顶层 `<s3>` 默认值。[#109251](https://github.com/ClickHouse/ClickHouse/pull/109251) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了一个 bug：对于带内联 `VALUES` 数据的 `INSERT INTO TABLE FUNCTION` (例如 `remote` 或 `file`) ，当服务端自行解析内联数据时 (`send_table_structure_on_insert_with_inline_data = 0`) ，列 `DEFAULT` 值不会生效。此前，向带有 `DEFAULT` 的非 `Nullable` 列显式插入 `NULL` 时，结果会变成 `0`，而不是声明的默认值。现在其行为已与普通表 `INSERT` 和 HTTP 协议保持一致。[#109258](https://github.com/ClickHouse/ClickHouse/pull/109258) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `Replicated` database 中，从 `s3Cluster` (以及其他 cluster 表函数，如 `fileCluster`/`urlCluster`) 执行 `CREATE TABLE ... AS SELECT` 时因 `NOT_FOUND_COLUMN_IN_BLOCK` 而失败的问题。[#109266](https://github.com/ClickHouse/ClickHouse/pull/109266) ([Groene AI](https://github.com/groeneai)).
* 修复了 `SHOW TABLES` 和 `SELECT ... FROM system.tables` 在数据湖目录数据库上返回结果不一致的问题：ClickHouse 无法读取的表现在会在两者中统一隐藏。[#109273](https://github.com/ClickHouse/ClickHouse/pull/109273) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复了一个 bug：当启用 `enable_block_number_column` 或 `enable_block_offset_column` setting 时，合并带有 projections 的 `MergeTree` 表会生成包含多余 `_block_number`/`_block_offset` 列的 projection parts。这样一来，合并后的 projection part 将不再匹配 projection 定义以及由 insert 产生的 projection parts，因此 `CHECK TABLE` 和 `OPTIMIZE ... DRY RUN` 会将其报告为 corrupted (`CORRUPTED_DATA`) 。[#109284](https://github.com/ClickHouse/ClickHouse/pull/109284) ([Groene AI](https://github.com/groeneai)).
* 现已支持将由两个字段组成的 `{key, value}` 记录的 Avro `array` 读取到 ClickHouse 的 `Map` 列中。这是 Iceberg 和 Spark 为非字符串键的 `MAP<K, V>` 生成的编码方式 (Avro 原生 map 仅支持字符串键) 。此前，这类文件可以读取为 `Array(Tuple(key, value))`，但不能读取为 `Map(K, V)`，并会报错 `Type Map(...) is not compatible with Avro array`。[#109289](https://github.com/ClickHouse/ClickHouse/pull/109289) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `CREATE HYPOTHETICAL INDEX ... TYPE set` (以及 `ngrambf_v1`/`tokenbf_v1`) 中省略必需的索引参数时导致的 server 崩溃。此类语句现在会被拒绝，并返回清晰的错误信息。[#109294](https://github.com/ClickHouse/ClickHouse/pull/109294) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (`Current component is empty`) ：当启用 `enforce_keeper_component_tracking` server setting 时，在将 metadata 存储于 Keeper 的 `MergeTree` 表上执行 `KILL MUTATION` 等变更操作时，可能会触发该错误。[#109297](https://github.com/ClickHouse/ClickHouse/pull/109297) ([Groene AI](https://github.com/groeneai)).
* 修复了将约 2262 年之后的 `ORC` 时间戳读取到标度小于 9 的 `DateTime64` 列时的问题。原生 `ORC` 读取器过去会先通过固定的 `DateTime64(9)` 中间值转换每个时间戳，这会在纳秒标度下导致 `Int64` overflow，并以 `VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE` 拒绝此类值，即使请求的 `DateTime64` 标度 (例如 Iceberg 生成的 `DateTime64(6)`) 实际上可以表示该值。现在会直接按请求的标度读取时间戳；如果连目标标度也无法容纳该值，则会遵循 `date_time_overflow_behavior`。[#109302](https://github.com/ClickHouse/ClickHouse/pull/109302) ([Groene AI](https://github.com/groeneai)).
* 作为 server 运行的 `clickhouse-local` (执行 `SYSTEM START LISTEN HTTP` 后) 现在会使用 `TabSeparated` 这一默认 output format 来处理 HTTP connections，与 `clickhouse-server` 保持一致，而不再使用交互式的默认格式 `PrettyCompact`。这修复了通过 HTTP 使用 `clickhouse-connect` 等驱动连接 `clickhouse-local` 时的问题。交互式 terminal 会话仍会以 `PrettyCompact` 渲染结果。[#109362](https://github.com/ClickHouse/ClickHouse/pull/109362) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 S3 分段上传中瞬时出现的 `Code: 499 ... InvalidPart` (`S3_ERROR`) 故障。MinIO 在执行 `CompleteMultipartUpload` 时，可能会短暂地将刚上传的分片报告为缺失；现在这类错误会像已处理的 `NoSuchKey` 一样进行重试，重试次数受 `s3_max_unexpected_write_error_retries` 限制。[#109364](https://github.com/ClickHouse/ClickHouse/pull/109364) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ALTER TABLE ... DROP COLUMN` 时报出的 `UNKNOWN_IDENTIFIER` 错误：当另一个列包含定义并引用内联 alias 的 `DEFAULT` 或 `MATERIALIZED` expression 时，会出现此问题。[#109374](https://github.com/ClickHouse/ClickHouse/pull/109374) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在使用 two-level sets 并行 merge `uniqExact` aggregate states 时的数据竞争 (以及由此导致的罕见 crash) ，该问题可能在使用 `GROUPING SETS`、`ROLLUP` 和 `CUBE` 时发生。[#109389](https://github.com/ClickHouse/ClickHouse/pull/109389) ([Groene AI](https://github.com/groeneai)).
* 修复了在包含两个或更多分片的 cluster 上，执行从 `Distributed` 表读取数据的 `CREATE TABLE ... ON CLUSTER ... AS SELECT` 时出现的错误 (`NOT_FOUND_COLUMN_IN_BLOCK`，旧版本中则为 `std::bad_function_call`) 。[#109407](https://github.com/ClickHouse/ClickHouse/pull/109407) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了带有 `TTL ... GROUP BY` (rollup) 的表在 merge 时的问题：已经完全聚合的分片可能会被反复重新调度进行 merge，陷入无限循环；同时，带有 `MATERIALIZED` 列或启用了持久化虚拟列的表处理也不正确——现在此类列会使用 `any` 进行聚合。关闭 [#105647](https://github.com/ClickHouse/ClickHouse/issues/105647)。[#109410](https://github.com/ClickHouse/ClickHouse/pull/109410) ([Mikhail Artemenko](https://github.com/Michicosun)). [#109532](https://github.com/ClickHouse/ClickHouse/pull/109532) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了当 `IN` 的右侧参数直接使用数组列时，会静默返回错误结果 (始终为 false) 或抛出异常的问题；现在 `x IN arr` 的行为与 `has(arr, x)` 一致。[#109416](https://github.com/ClickHouse/ClickHouse/pull/109416) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在带有基于持久化虚拟列 `_block_number`/`_block_offset` 的隐式 min-max 索引 (由 `add_minmax_index_for_block_number_column`/`add_minmax_index_for_block_offset_column` 启用) 的 `MergeTree` 表上执行 `ALTER TABLE` 操作 (`RENAME`/`ADD`/`MODIFY COLUMN`，以及对包含新插入数据分片的表执行 `MATERIALIZE INDEX`) 时出现的 `UNKNOWN_IDENTIFIER` 错误。[#109428](https://github.com/ClickHouse/ClickHouse/pull/109428) ([Groene AI](https://github.com/groeneai)). [#110236](https://github.com/ClickHouse/ClickHouse/pull/110236) ([Groene AI](https://github.com/groeneai)).
* 修复了对非常量 `Array(LowCardinality(T))` 参数执行 `arrayFold` 时出现的 `LOGICAL_ERROR` (例如 `arrayFold((acc, x) -> acc + x, materialize([1, 2, 3]::Array(LowCardinality(Int64))), toInt64(0))`) ；此前会报错 `Arguments of 'plus' have incorrect data types` (在 debug 和 sanitizer 构建中会导致服务器中止) 。[#109462](https://github.com/ClickHouse/ClickHouse/pull/109462) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `ReplicatedMergeTree` 表上执行 `CHECK TABLE` 时，如果检查过程中出现瞬时的、可重试的 ZooKeeper 错误 (例如连接丢失) ，会将健康的数据分片误报为损坏的问题；现在这类错误会改为作为可重试的查询错误返回。[#109465](https://github.com/ClickHouse/ClickHouse/pull/109465) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `groupArrayLastMerge` 和聚合函数 `largestTriangleThreeBuckets` 中的段错误：现在会校验聚合函数状态的反序列化，因此损坏的状态不会再导致越界内存访问。[#109485](https://github.com/ClickHouse/ClickHouse/pull/109485) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)). [#109492](https://github.com/ClickHouse/ClickHouse/pull/109492) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了全局 `max_rows_in_join` / `max_bytes_in_join` 限制在 `parallel_hash` join 算法中未生效的问题；此前设置了 `join_overflow_mode = 'throw'` 的查询可能会静默成功，而不是抛出 `SET_SIZE_LIMIT_EXCEEDED`。[#109488](https://github.com/ClickHouse/ClickHouse/pull/109488) ([Hechem Selmi](https://github.com/m-selmi)).
* 修复了读取按 `BIGINT` 列分区且其值无法放入 `Int32` 的 Paimon 表时的问题。此前这类分区值会被截断 (例如 `9223372036854775807` 会变成 `-1`) ，从而生成错误的分区路径并触发 filesystem 错误。[#109510](https://github.com/ClickHouse/ClickHouse/pull/109510) ([Groene AI](https://github.com/groeneai)).
* 修复了读取带有 equality delete 文件的 Iceberg 表时发生崩溃的问题。如果某列在 equality delete 文件中为 Nullable，而在表结构中为非 Nullable (或反之) ，则此前从 delete 文件读取的值会通过未经检查的强制转换插入到不同类型的列中 (列类型混淆) ，从而破坏该列并导致服务器崩溃。[#109551](https://github.com/ClickHouse/ClickHouse/pull/109551) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 MySQL 的 `connect_timeout`、读超时和写超时不生效的问题：即使设置了 `connect_timeout = 1`，连接无响应的 MySQL 服务器时也可能卡住超过两分钟，因为 Sampling query profiler 的周期性信号会不断重置 MySQL 客户端内部的轮询截止时间。[#109592](https://github.com/ClickHouse/ClickHouse/pull/109592) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了一个 `LOGICAL_ERROR` (`creation_csn is not set while removal_csn is set to 1`) ：当非事务性的 `TRUNCATE` 与同一张表上一个尚未提交、但已执行插入的事务并发运行时，可能会抛出该错误。现在，这类 `TRUNCATE` 不会再移除由尚未提交事务创建的分片。[#109598](https://github.com/ClickHouse/ClickHouse/pull/109598) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了读取物理可空性与请求的 ClickHouse 类型不一致的 `Parquet` struct 列时出现的 `TYPE_MISMATCH` 错误：现在，非空的 `Parquet` group 可以读取为 `Nullable(Tuple(...))`，原生 `Parquet` 读取器也可以将物理上可空的 struct (即 `Parquet` 的 `OPTIONAL` group) 读取为 `Nullable(Tuple(...))`。[#109615](https://github.com/ClickHouse/ClickHouse/pull/109615) ([Groene AI](https://github.com/groeneai)). [#109898](https://github.com/ClickHouse/ClickHouse/pull/109898) ([Groene AI](https://github.com/groeneai)).
* 修复了多查询流中在 `INSERT ... VALUES` 后跟尾随 SQL 注释 (例如 `VALUES (1) -- comment`) ，且走服务端内联 insert 解析路径 (`send_table_structure_on_insert_with_inline_data = 0`) 时会发生静默数据丢失的问题。此前，结束符 `;` 后的尾随注释会被扫描为行数据，导致流中的后续查询被静默跳过。[#109643](https://github.com/ClickHouse/ClickHouse/pull/109643) ([Groene AI](https://github.com/groeneai)).
* 修复了一个段错误：如果启动期间发生错误，那么在 server 关闭过程中的一个极短窗口内有查询到达时，就可能触发该问题。[#109675](https://github.com/ClickHouse/ClickHouse/pull/109675) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了使用 `ALTER TABLE ... APPLY PATCHES` 物化轻量级更新后，跳数索引 (`text`、`bloom_filter` 等) 和 projections 过期的问题。此前，依赖 patch 更新列的索引和 projection 文件不会被同步更新，因此使用它们的查询可能返回错误结果 (例如 `hasToken` 漏掉已更新的行，或在已耗尽的 patch part 被移除后，projection 返回过期的聚合结果) 。[#109709](https://github.com/ClickHouse/ClickHouse/pull/109709) ([Groene AI](https://github.com/groeneai)).
* 修复了 `system.tables` 的一个问题：当查询只读取 `name`/`database` 列时，对于拥有按 database 授权的用户，会静默跳过某些 database。该问题于 26.2 引入。[#109723](https://github.com/ClickHouse/ClickHouse/pull/109723) ([Samay Sharma](https://github.com/samay-sharma)).
* 修复了将 `LowCardinality(Time)` 列写入 `Arrow` format，且 `output_format_arrow_low_cardinality_as_dictionary = 1` 时出现的 `LOGICAL_ERROR`。[#109730](https://github.com/ClickHouse/ClickHouse/pull/109730) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ObjectStorageQueue`/`AzureQueue` (以及 `azureBlobStorage` table function) 在对象存储返回空列表页但同时附带 continuation token 时静默跳过对象的问题。Azure Blob 存储确实会出现这种情况 (例如列表跨越内部分区边界时) ，而异步列表迭代器此前会将空页视为列表结束并丢弃该 token。现在会继续跟随 continuation token。[#109761](https://github.com/ClickHouse/ClickHouse/pull/109761) ([Gal Ben Moshe](https://github.com/GalBenMoshe)).
* 修复了按时间戳 (`DateTime64`) 列分区的 Iceberg tables 在进行分区裁剪时返回空结果的问题。[#109764](https://github.com/ClickHouse/ClickHouse/pull/109764) ([Den Kalantaevskii](https://github.com/Diskein)).
* 修复了 `conv` function 处理 `FixedString` 参数时抛出的 `ILLEGAL_COLUMN` 异常；现在它们会被正确转换为 `String`。关闭 [#109670](https://github.com/ClickHouse/ClickHouse/issues/109670)。[#109771](https://github.com/ClickHouse/ClickHouse/pull/109771) ([hp](https://github.com/hp77-creator)).
* `getClientHTTPHeader` 函数现在会根据 [RFC 9110](https://www.rfc-editor.org/info/rfc9110/#section-5.1) 将请求头名称视为不区分大小写；尤其是，`authorization` 请求头现在无论大小写形式如何都会被过滤掉。关闭 [#103957](https://github.com/ClickHouse/ClickHouse/issues/103957)。[#109791](https://github.com/ClickHouse/ClickHouse/pull/109791) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 修复了 `max_execution_time` (配合 `timeout_overflow_mode = 'throw'`) 有时始终不会取消查询的问题：如果内部超时监视器已经在等待一个截止时间更晚的查询，随后注册的、截止时间更早的查询就可能被完全漏掉，导致其在超出时间限制后仍继续运行很长时间。[#109792](https://github.com/ClickHouse/ClickHouse/pull/109792) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复了 gzip 压缩的 Iceberg 元数据文件的文件名问题。ClickHouse 之前将其写为 `v{N}.gzip.metadata.json` (HTTP `Content-Encoding` 令牌) ，而 Iceberg 规范要求使用 `gz` 扩展名，即 `v{N}.gz.metadata.json`。因此，Spark 和其他 Hadoop catalog 读取器无法找到 ClickHouse 写入的元数据。ClickHouse 现在会写入 `v{N}.gz.metadata.json`，同时仍支持读取旧的 `gzip` 名称，以保持向后兼容。[#109812](https://github.com/ClickHouse/ClickHouse/pull/109812) ([Groene AI](https://github.com/groeneai)) 。
* 修复了在 `enable_join_runtime_filters = 1` (自 26.2 起默认启用) 时，join 可能抛出的 `NOT_IMPLEMENTED` 错误 ("Method getDataAt is not supported for Nullable(String)") ：当构建侧 join 键为包含 `NULL` 值的 `LowCardinality(Nullable(...))`，且运行时过滤器回退到其 bloom filter 时，就可能触发该问题。[#109824](https://github.com/ClickHouse/ClickHouse/pull/109824) ([Groene AI](https://github.com/groeneai)) 。
* 外部数据库引擎 (例如 `PostgreSQL`) 不再将 `UUID` 列上的范围比较 (`>=`、`>`、`<=`、`<`) 下推。ClickHouse 与外部数据库对 UUID 的排序方式不同，因此下推这些比较会在结果中静默丢弃行；现在这类 predicates 会改由 ClickHouse 计算。[#109833](https://github.com/ClickHouse/ClickHouse/pull/109833) ([Vismay](https://github.com/vismaytiwari)) 。
* 修复了一个服务器崩溃问题：当在高阶函数期望具体值的位置传入 lambda 表达式时 (例如 `arrayFold` 的累加器，即 `arrayFold(lambda, arr, another_lambda)`) ，服务器可能会崩溃。现在，在 `enable_analyzer = 0` 时，此类查询会被 `ILLEGAL_TYPE_OF_ARGUMENT` 拒绝，而不会导致崩溃。[#109840](https://github.com/ClickHouse/ClickHouse/pull/109840) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `icebergLocal` 表函数和 `IcebergLocal` 引擎将其 object storage 类型声明为 `azure` 而非 `local` 的问题；这会导致它们在通过 `SETTINGS disk = '...'` 使用本地 disk 时，无法通过 disk type 检查 (`Disk type doesn't match`) 。[#109872](https://github.com/ClickHouse/ClickHouse/pull/109872) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 修复了读取按同一 source column 多次分区的 Iceberg 表时的问题 (例如 `PARTITIONED BY (hours(ts), ts)`) 。此前，这类表会报错 `Cannot add column ...: column with this name already exists (ILLEGAL_COLUMN)`。[#109895](https://github.com/ClickHouse/ClickHouse/pull/109895) ([Groene AI](https://github.com/groeneai)) 。
* 修复了错误的查询结果问题：对于键列为倒序 (`DESC`) 且分片没有 final mark 的表 (非自适应 granularity，`index_granularity_bytes = 0`) ，primary key index 会错误地裁剪 granule，从而导致查询结果错误。[#109901](https://github.com/ClickHouse/ClickHouse/pull/109901) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了 `generateRandomStructure` 在类型嵌套超过内部深度限制时，偶尔会生成无效的结构字符串，把两个数据类型拼接在一起 (例如 `Decimal32(7)IPv4`) ，导致结果无法解析的问题。[#109928](https://github.com/ClickHouse/ClickHouse/pull/109928) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `Array(LowCardinality(Nullable(String)))` 上构建 `text` 索引 (包括以这种方式存储的 `Nested` 字段) 且被索引的数组包含 `NULL` 元素时出现的 `NOT_IMPLEMENTED` 错误 (`Method getDataAt is not supported for Nullable(String) in case if value is NULL`) 。现在，构建索引时会跳过数组中的 `NULL` 元素，与 `Array(Nullable(String))` 的行为一致。[#110055](https://github.com/ClickHouse/ClickHouse/pull/110055) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `LowCardinality(Nullable(...))` 列上构建 `minmax` 跳过索引时返回错误结果的问题：此前，下推到存储层的 `WHERE`/`PREWHERE`/`HAVING ... IS NULL` 谓词会剪枝掉所有粒度，即使该列包含 `NULL` 值，也会返回 0 行。[#110061](https://github.com/ClickHouse/ClickHouse/pull/110061) ([Groene AI](https://github.com/groeneai)).
* 修复了 `distinct_overflow_mode = 'break'`：现在，`DISTINCT` 会按文档所述返回达到限制前累积的部分结果，并停止读取源数据。此前，跨过 `max_rows_in_distinct` / `max_bytes_in_distinct` 的 chunk 会被丢弃 (导致结果被截断或为空) ，而且查询仍会继续读取并向哈希集合中插入数据直到输入结束，这可能最终导致 `MEMORY_LIMIT_EXCEEDED`。[#110075](https://github.com/ClickHouse/ClickHouse/pull/110075) ([Sergey Kuznetsov](https://github.com/skuznetsov-clickhouse)).
* 修复了对包含非 Parquet 格式 (例如 `ORC`) 数据文件且该文件比所有位置删除文件都新的 Iceberg 表执行 `OPTIMIZE TABLE` 时出现的逻辑错误 `ChunkInfoRowNumbers does not exist`。[#110107](https://github.com/ClickHouse/ClickHouse/pull/110107) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `max_bytes_in_distinct` 和 `max_bytes_in_set`：字符串键存储在 arena 中，而此前限制检查未将这部分计入，因此基于字符串键的 `DISTINCT` / `IN` 占用的内存可能会超出字节限制，超出的部分最多可达整个键的载荷大小 (键长度本身不受限制) 。现在这些限制会将 arena 计入，与文档描述一致；因此，接近字节限制的字符串键查询现在可能会更早触发限制 (这是正确的行为) 。[#110120](https://github.com/ClickHouse/ClickHouse/pull/110120) ([Sergey Kuznetsov](https://github.com/skuznetsov-clickhouse)).
* 修复了当 `identity` (或标量子查询结果) 包装了包含嵌套 `LowCardinality` 的值，且查询使用 `WITH TOTALS`/`WITH ROLLUP` 时出现的 `LOGICAL_ERROR` (`Bad cast from type ColumnLowCardinality to ColumnString`) 。[#110138](https://github.com/ClickHouse/ClickHouse/pull/110138) ([Groene AI](https://github.com/groeneai)).
* 修复了读取内部维度大小为零的 `Npy` 文件时的问题：物化的行数现在与优化和未优化的 `count` 结果一致。[#110146](https://github.com/ClickHouse/ClickHouse/pull/110146) ([Yanjun Qiu](https://github.com/qiuyanjun888)).
* 修复了按顺序聚合中的二次时间复杂度膨胀问题 (以及对 `max_execution_time` 不响应的问题) ，该问题会出现在按多个键分组且其排序顺序只是 grouping key 前缀时。[#110159](https://github.com/ClickHouse/ClickHouse/pull/110159) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当包含关联子查询 (例如 `exists((SELECT ...))`) 的过滤条件使用 `convert_query_to_cnf` 或 `optimize_and_compare_chain` 优化时出现的逻辑错误 (`Unexpected number of columns in result sample block`) 。[#110187](https://github.com/ClickHouse/ClickHouse/pull/110187) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个异常 (`UNION mode UNION_DEFAULT must be normalized`) ：当 `DELETE` 或 `ALTER UPDATE` 变更在其 `WHERE` 条件或 `UPDATE` 赋值中使用子查询内的集合运算 (`UNION`/`UNION ALL`/`UNION DISTINCT`/`EXCEPT`/`INTERSECT`) 时，会触发该异常。[#110196](https://github.com/ClickHouse/ClickHouse/pull/110196) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `ReadBuffer is canceled. Can't read from it.` 逻辑错误 (会在 debug/sanitizer build 中导致 server 中止) ：如果此前对同一 zip 归档的一次读取在流中途失败，那么之后再次读取该 zip 归档时 (例如从 zip 备份执行 `RESTORE` 期间) 可能会出现此问题。[#110197](https://github.com/ClickHouse/ClickHouse/pull/110197) ([Groene AI](https://github.com/groeneai)).
* 修复了以下问题：当包含 `x IN (subquery)` 的变更在主键分析期间构建子查询 Set 时，server 关闭缓慢且 `KILL MUTATION` 无响应；现在 Set 的构建会被及时取消。[#110198](https://github.com/ClickHouse/ClickHouse/pull/110198) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Keeper 现在会拒绝将协调设置 `max_requests_batch_size` 和 `max_requests_append_size` 设为 `0`，而不是像以前那样在多节点环境中卡在无限 append-entries 循环里。[#110200](https://github.com/ClickHouse/ClickHouse/pull/110200) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在元组表达式上使用 `GROUP BY ALL` 并结合 `ORDER BY` 时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误。[#110206](https://github.com/ClickHouse/ClickHouse/pull/110206) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了向带有引用子列的 `CHECK` 约束的表执行 `INSERT` 时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误 (例如 `Nullable` 列的 `x.null` 或 `Array` 的 `arr.size0`) 。[#110208](https://github.com/ClickHouse/ClickHouse/pull/110208) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了读取默认 sort order 引用了需要加引号的列 (例如 `@timestamp`) 的 Iceberg 表时的问题。这类表此前无法读取，因为自动生成的存储 `ORDER BY` 是基于原始列名构建的，解析时会因 `SYNTAX_ERROR` 失败。[#110233](https://github.com/ClickHouse/ClickHouse/pull/110233) ([Groene AI](https://github.com/groeneai)).
* 修复了 `DataLakeCatalog` (Iceberg/Glue) database 的 `system.tables` 在单个表的 metadata 无法解析时，会中止整个查询或静默丢掉该表的问题。现在，这类表仍会按名称列出；对于需要打开存储对象才能获取的列 (`engine`、`total_rows` 等) ，会显示默认值/NULL，而与 `database_datalake_require_metadata_access` 无关。直接访问损坏的表仍会报错。[#110242](https://github.com/ClickHouse/ClickHouse/pull/110242) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能导致崩溃的问题 (heap-buffer-overflow) ：当 `quantileTDigest` 系列聚合函数的状态列被用作 `GROUP BY` 键，并由多个 threads 并发序列化时，可能触发该问题。[#110263](https://github.com/ClickHouse/ClickHouse/pull/110263) ([Groene AI](https://github.com/groeneai)).
* 修复了向 Microsoft Fabric / OneLake `DataLakeCatalog` 表执行 `INSERT` 时失败并报 `IncorrectEndpointError` (HTTP 400) 的问题：原因是 ADLS Gen2 (DFS) 写入被路由到了 `.blob` host，而不是 `.dfs` 端点 host。注意：使用 `remote_url_allow_hosts` 时，必须将 `.blob` (读取) 和 `.dfs` (写入) 这两个 Fabric host 都加入 `INSERT` 的允许列表。[#110290](https://github.com/ClickHouse/ClickHouse/pull/110290) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* 修复了解析某些 PRQL 查询 (`SET dialect = 'prql'`) 时 server 异常中止的问题。此前，`prqlc` compiler 内部的 panic 会直接中止进程，而不是作为查询错误报告。 [#110316](https://github.com/ClickHouse/ClickHouse/pull/110316) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一种静默返回错误查询结果的问题：当 projection 的列集合发生变化之前写入的 projection part (例如，跨版本升级后对 `ALIAS` 列源列的 `materialize` 方式发生变化，或在 `ALTER TABLE ... MODIFY COLUMN` 之后，projection 使用的 `ALIAS` 列重新指向了其他源列) 通过 projection 被读取或参与 merge 时，缺失列会被默认值填充，而不是真实数据。现在，这类 part 会改为从 base table 读取，merge 也会基于基础数据重建 projection。 [#110328](https://github.com/ClickHouse/ClickHouse/pull/110328) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `ORDER BY ... WITH FILL` 在生成大范围填充值时 (尤其是在使用 `INTERPOLATE` 时) 不遵守 `max_execution_time`，且取消响应较慢的问题。 [#110332](https://github.com/ClickHouse/ClickHouse/pull/110332) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 Iceberg table 上执行多命令 `ALTER` (如 `UPDATE ..., DELETE ...`) 时出现的逻辑错误 (在 debug/sanitizer build 中会导致 server 中止) 。现在，这类 mutations 会被拒绝，并返回明确的 `NOT_IMPLEMENTED` 错误。 [#110347](https://github.com/ClickHouse/ClickHouse/pull/110347) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 parser 缺陷：当 `SELECT` 查询在裸表标识符后直接结束时 (例如 `... FROM t COMMENT 'x'`) ，`COMMENT` 会被错误地当作隐式别名解析，导致报出误导性的语法错误，而不是将 comment 应用到 view/table。 [#110372](https://github.com/ClickHouse/ClickHouse/pull/110372) ([Aditya Kumar](https://github.com/adityaksolves)).
* 修复了在复制或销毁深度嵌套的 `Array`/`Tuple`/`Map`/`Object` 字面量时 server 崩溃 (原生栈溢出) 的问题，例如在提高 `max_parser_depth` 后，查询中包含了极深层嵌套的字面量。 [#110393](https://github.com/ClickHouse/ClickHouse/pull/110393) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 vector search 可能返回少于预期行数的两种情况：小于 1.0 的 `vector_search_index_fetch_multiplier` 值可能会将计算出的拉取数量截断为 0，从而产生空结果 (现在这类值会被拒绝) ；此外，对于 `LIMIT ... WITH TIES` 查询，现在会跳过 vector search optimization，因为该 optimization 会将搜索范围严格限制为 N 个候选项，从而丢弃与第 N 行并列的行。 [#110452](https://github.com/ClickHouse/ClickHouse/pull/110452) ([Tamish Mhatre](https://github.com/tamish560)). [#110453](https://github.com/ClickHouse/ClickHouse/pull/110453) ([Tamish Mhatre](https://github.com/tamish560)).
* 修复了 `IN (subquery)` 场景下的逻辑错误 `Expected CommonSubplanReferenceStep to reference CommonSubplanStep`、错误 `Subplan cannot be used to build pipeline`，以及逻辑错误 `Trying to extract chunk from ChunkBuffer before all inputs are finished`；该问题出现在 subquery 包含 correlated subquery，且 Set 在 index analysis 期间构建时。 [#110491](https://github.com/ClickHouse/ClickHouse/pull/110491) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在命名 `WINDOW` 子句定义中替换 query parameters 的问题。此前，这里的参数会静默地保持未替换状态，而未设置的 `Identifier` parameter 还可能在 `EXPLAIN SYNTAX` 期间触发异常 `Logical error: '!part.empty()'`。 [#110506](https://github.com/ClickHouse/ClickHouse/pull/110506) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 object storage disk 上 `MergeTree` 表的 server 启动失败问题：当残留的 `txn_version.txt.tmp` 文件破坏了 disk 级 metadata 时，会导致启动失败。 [#110519](https://github.com/ClickHouse/ClickHouse/pull/110519) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了文件系统缓存中的一个逻辑错误 (`Expected file ... not to exist`) ：当后台缓存下载因非文件系统错误而失败时 (例如在 Iceberg 表上运行 `OPTIMIZE` 时) ，可能会留下一个空的孤儿缓存文件，进而触发该错误。[#110549](https://github.com/ClickHouse/ClickHouse/pull/110549) ([Groene AI](https://github.com/groeneai)).
* 修复了读取已损坏的 `Native` 格式 stream 时的问题：当其 `Dynamic` type 计数或 `JSON`/`Object` 路径计数接近 `SIZE_MAX` 时，这类格式错误的输入现在会被明确地以 `INCORRECT_DATA` error 拒绝，而不再触发未捕获的 `std::length_error`。[#110590](https://github.com/ClickHouse/ClickHouse/pull/110590) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `MaterializedPostgreSQL` 数据库引擎中的服务端崩溃问题：当某个表仍在同步队列中时，如果该表被 detached (或其结构发生变化) ，就可能触发该问题。[#110596](https://github.com/ClickHouse/ClickHouse/pull/110596) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了客户端中的 `SET param_<name>` (以及 `--param_<name>` 标志) 在参数名与内置 setting name (如 `limit`、`offset`、`max_threads` 或 `log_comment`) 冲突时行为异常的问题。根据冲突的 setting 不同，查询可能因 `CANNOT_PARSE_QUOTED_STRING` 而失败，值可能被静默归一化 (例如 `max_threads=0` 变为 `auto(N)`) ，或者 setting 别名名称丢失。此类参数还会导致同一会话中后续所有 `SET param_*` 都失效。[#110597](https://github.com/ClickHouse/ClickHouse/pull/110597) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了读取带有 `DEFAULT` expression 且未在 part 中 materialized 的列的 subcolumns 时的问题 (例如在 `ALTER TABLE ADD COLUMN` 之后，或在 `ALTER TABLE MATERIALIZE COLUMN` 期间) ：此前 subcolumn 会被填充为类型默认值，而不是计算后的 `DEFAULT` expression；并且在这类 `QBit` 列上使用转置向量距离函数 (`cosineDistanceTransposed` 等) 时，会报 `SIZES_OF_ARRAYS_DONT_MATCH` error。此修复关闭了 [#110634](https://github.com/ClickHouse/ClickHouse/issues/110634)。[#110636](https://github.com/ClickHouse/ClickHouse/pull/110636) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个 `LOGICAL_ERROR`：`Invalid partition key size: 0`。当向启用了 `non_replicated_deduplication_window` 的分区 `MergeTree` 表执行 `INSERT` 时，如果某个 async insert 批次只被部分去重 (某些 `insert_deduplication_token` 值重复，而另一些是新的) ，则可能导致插入失败。[#110651](https://github.com/ClickHouse/ClickHouse/pull/110651) ([Groene AI](https://github.com/groeneai)).
* 后台 asynchronous insert flush 现在在通过 `KILL QUERY` 终止时会立即停止；此前，大型缓冲负载的 flush 会一直解析到末尾，并忽略取消信号。[#110652](https://github.com/ClickHouse/ClickHouse/pull/110652) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了在 `partial_merge` JOIN 之上使用 `optimize_aggregation_in_order` 的 `GROUP BY` 以及使用 `optimize_distinct_in_order` 的 `DISTINCT` 返回错误结果的问题。按序读取优化被传播到了 partial-merge join，但后者会按 join key 对左侧输入重新排序，因此不会保留左侧 stream 的原始顺序，最终导致行分组错误。[#110671](https://github.com/ClickHouse/ClickHouse/pull/110671) ([Groene AI](https://github.com/groeneai)).
* 修复了 `toStartOfInterval` 中的有符号整数溢出问题：当在 `Date`/`Date32`/`DateTime64` 值上使用极大的 `MONTH`、`WEEK` 或 `DAY` 时间间隔计数时，可能触发该问题。[#110688](https://github.com/ClickHouse/ClickHouse/pull/110688) ([Groene AI](https://github.com/groeneai)).
* 修复了在并行副本以 `custom_key_sampling` / `custom_key_range` 模式运行时，`FROM` 中包含子查询的查询会报 `NOT_FOUND_COLUMN_IN_BLOCK` 错误的问题。此类查询 (例如 `SELECT * FROM (SELECT id, k, v FROM t WHERE id < 20) ORDER BY k`) 此前会因 `Not found column __table2.id in block ...` 而失败。[#110690](https://github.com/ClickHouse/ClickHouse/pull/110690) ([Groene AI](https://github.com/groeneai)).
* 修复了 `readWKT` 会拒绝带前导空白的 WKT 字符串 (例如 `readWKT(' POINT(1 2)')`) 的问题，而带类型的 `readWKTPoint`/`readWKTPolygon`/... 读取器以及 WKT 语法本身都接受这类字符串。[#110706](https://github.com/ClickHouse/ClickHouse/pull/110706) ([Groene AI](https://github.com/groeneai)).
* 修复了一个逻辑错误 (`Column ... already added for reading`，会在 debug/sanitizer 构建中导致 server 中止) ：当查询一个位于 `Distributed` 表之上的 `Merge` 表，并在查询的 `PREWHERE` 和 `WHERE` 中同时使用同一个文本索引谓词时，会触发该错误。[#110710](https://github.com/ClickHouse/ClickHouse/pull/110710) ([Groene AI](https://github.com/groeneai)).
* 修复了在启用并行副本时，对 `QBit` 列调用转置距离函数 (例如 `cosineDistanceTransposed`) ，并传入标量子查询或常量参考向量时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 错误。此修复关闭了 [#110719](https://github.com/ClickHouse/ClickHouse/issues/110719)。[#110729](https://github.com/ClickHouse/ClickHouse/pull/110729) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `ReplicatedMergeTree` 上一个罕见的 `LOGICAL_ERROR` (`Unexpected number of parts to remove from parts_queue`；会在 debug/sanitizer 构建中导致 server 中止) ：当两个分区操作 (例如两个 `MOVE PARTITION`/`REPLACE PARTITION` 查询，或其中一个与后台 `DROP_RANGE` 竞争) 同时取消对重叠范围的后台 parts 检查时，就会触发该问题。[#110738](https://github.com/ClickHouse/ClickHouse/pull/110738) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能出现的 `Hash is not set for serialization` 逻辑错误：当带有 `Quantized(...)` codec 的列被包裹在另一层 serialization 中时，就可能发生这种情况；例如在一个 `Merge` 表中，其 sources 里的同名列类型不同 (并合并为一个 `Variant`) 。[#110776](https://github.com/ClickHouse/ClickHouse/pull/110776) ([Groene AI](https://github.com/groeneai)).
* 修复了将 `median`/`quantile` aggregate function 的状态与超大的整数常量相乘时 server 挂起的问题 (例如 `medianState(x) * 18446744073709551615`) 。该查询会对取消操作失去响应，并且可能无限期运行。[#110779](https://github.com/ClickHouse/ClickHouse/pull/110779) ([Groene AI](https://github.com/groeneai)).
* 修复了在消耗一个长度为零的配额时间间隔时 server 崩溃的问题 (整数除零，例如 `CREATE QUOTA q FOR INTERVAL 0 SECOND MAX queries = 1000`) 。现在，在创建配额时会拒绝非正的配额时间间隔时长。[#110846](https://github.com/ClickHouse/ClickHouse/pull/110846) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了当 `col` 为 `LowCardinality` 时，`throwIf(notLike(col, pattern))` (以及其他作用于函数结果的 `throwIf`) 会无条件抛出的问题。默认的 `LowCardinality` 实现会对整个字典运行 `throwIf``，而该字典即使没有任何行引用，也始终包含保留的默认值，因此这个未使用槽位中的非零值会导致 `throwIf\` 对实际上并不满足该条件的数据也抛出异常。[#110864](https://github.com/ClickHouse/ClickHouse/pull/110864) ([Groene AI](https://github.com/groeneai)).
* 将查询的已启用角色 (`SET ROLE` 或 `role` 参数) 传递到使用 interserver secret 保护的集群中、在 parallel-replica 和 `Distributed` 读取时的远程节点；此前远程节点会回退到用户的默认角色，导致其评估行策略时与发起节点不一致。[#110867](https://github.com/ClickHouse/ClickHouse/pull/110867) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复了 Iceberg 表在初始 schema 包含嵌套 field (`Tuple`/`Array`/`Map`) 时，执行 `ALTER TABLE ... ADD COLUMN` 后生成重复 field ID 的问题。现在 `last-column-id` 会记录已分配 field ID 的最大值 (包括嵌套子项) ，因此后续新增的列不再重用嵌套 field ID，读取时也不会再因 `ICEBERG_SPECIFICATION_VIOLATION` (`Duplicate field id`) 而失败。[#110884](https://github.com/ClickHouse/ClickHouse/pull/110884) ([Groene AI](https://github.com/groeneai)).
* 修复了在 FIPS 构建中使用 Ed25519 SSH key (`CREATE USER ... IDENTIFIED WITH ssh_key ... TYPE 'ssh-ed25519'`，或在 `users.xml` 中使用此类 key) 时发生的崩溃。Ed25519 不属于 FIPS 批准的算法；现在这类 key 会被明确地以 `LIBSSH_ERROR` error 拒绝。[#110891](https://github.com/ClickHouse/ClickHouse/pull/110891) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了对 `QBit` 列 (`cosineDistanceTransposed`、`L2DistanceTransposed`、`dotProductTransposed`) 执行转置距离函数时结果精度下降的问题。此前，截断到 `precision` bit planes 的值会通过将丢弃的比特补零来重建，这会使每个重建值都向零偏移，并在低精度下出现退化：对于 `QBit(BFloat16)` 且 precision 为 1 时，只剩下符号位，因此每个值都会被重建为 `±0.0`，距离对每一行都是相同的常数，不包含任何排序信息。现在，截断值会被重建到剩余精度单元的有界中点 (原始 `Int8` 编码重建到其单元中心；精确的零值和无穷大保持不变) ，因此较小的 `precision` 只是以准确性换取速度，而不会产生严重偏置的结果。全精度结果不受影响。此修复关闭了 [#110898](https://github.com/ClickHouse/ClickHouse/issues/110898)。[#110911](https://github.com/ClickHouse/ClickHouse/pull/110911) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个 server 崩溃问题 (use-after-free) ：在同时使用 temporary tables 的会话中查询过 Iceberg 表后，执行优雅关闭时会触发该问题。[#110914](https://github.com/ClickHouse/ClickHouse/pull/110914) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了在合并以旧版 (version 0) 状态格式序列化、且包含 `Bool` 值的 `sumMap`/`sumMapWithOverflow`/`sumMapFiltered` aggregate states 时出现的 `LOGICAL_ERROR: Cannot sum Bools` 问题 (在 debug/sanitizer 构建中会导致 server 中止) 。同一修复还纠正了 version-0 `Bool` state 的两个静默错误结果场景：类型为 `Bool` 的 map key 在不同 state 之间不会被去重，以及零值合并整理会丢弃错误的条目。[#110922](https://github.com/ClickHouse/ClickHouse/pull/110922) ([Groene AI](https://github.com/groeneai)).
* 修复了 aggregate function 配合 `-Tuple` 组合器、使用 `RESPECT NULLS` 并生成中间 state (`-State`、分布式 aggregation、`WITH ROLLUP`/`WITH CUBE`) 时发生的崩溃。此前，组合后的函数以错误的 state 变体命名，导致其序列化后的 `AggregateFunction` type 在 round-trip 后重新解析为不兼容的内存布局。[#110930](https://github.com/ClickHouse/ClickHouse/pull/110930) ([Groene AI](https://github.com/groeneai)).
* 修复了一个问题：对于因 schema evolution 而重命名的 Iceberg 列，`PREWHERE` (以及行级 policies) 在旧数据文件上会静默返回 `0` 行。现在此类查询会返回正确的行，与 `WHERE` 一致。[#110941](https://github.com/ClickHouse/ClickHouse/pull/110941) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` (`LazyMaterializingTransform: Number of rows in lazy chunk N does not match number of offsets M`) ：在 `vector_search_with_rescoring = 1` 且启用 lazy materialization 的向量搜索查询中，如果有多个距离并列，可能会触发该错误。[#111003](https://github.com/ClickHouse/ClickHouse/pull/111003) ([Groene AI](https://github.com/groeneai)).
* 修复了读取由 Apache Arrow Java \< 19.0.0 (随 Apache Spark 一起打包) 生成的 `Arrow`/`ArrowStream` 数据时的问题；这类数据包含空的嵌套 `Array`/`Map` 列，此前会因 offsets 缓冲区过小而报 `INCORRECT_DATA` 错误并被拒绝。[#111101](https://github.com/ClickHouse/ClickHouse/pull/111101) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在启用 page cache 的 `plain_rewritable` disk 上出现的 stale reads 问题。[#111105](https://github.com/ClickHouse/ClickHouse/pull/111105) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了在 distributed queries 以及启用并行副本的查询中，`Variant` 类型 (包括 `Geometry`) 常量触发的 `CANNOT_CONVERT_TYPE` 错误。[#111136](https://github.com/ClickHouse/ClickHouse/pull/111136) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复了一个 bug：从 HDFS 读取大文件时，如果单个读取请求超过 `hdfsPread` 的 32 位大小限制 (`INT_MAX`) ，可能会失败或读取错误。[#98470](https://github.com/ClickHouse/ClickHouse/pull/98470) ([Arup Chauhan](https://github.com/arup-chauhan)).
* 修复了使用空 needle 进行相等比较时，text index 使用不正确的问题。[#108340](https://github.com/ClickHouse/ClickHouse/pull/108340) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了 `SYSTEM SYNC MERGES` 在使用 `Manual` 合并选择器时卡住的问题：当计划中的 merge 无法放入已满的 background pool 时，就会出现该问题。[#108770](https://github.com/ClickHouse/ClickHouse/pull/108770) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `ATTACH TABLE ... AS REPLICATED` 的问题：如果某个数据分区片段上残留了 stale 的 `txn_version.txt.tmp` 文件，就可能丢弃已 committed 的数据，并恢复到变更前的行。[#108772](https://github.com/ClickHouse/ClickHouse/pull/108772) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了非复制表 `MergeTree` 表中 `ALTER TABLE ... MOVE PARTITION TO TABLE` 的一个潜在竞态条件。此前由于被移动 parts 的 commit 与 block number 分配不在同一把 lock 的保护下，可能会产生相交的数据分区片段。[#108922](https://github.com/ClickHouse/ClickHouse/pull/108922) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了读取由 Databricks UniForm 写入的 `Iceberg` 表时的问题；这类写入会在 manifest files 中写入退化的 placeholder schema (字段列表为空) 。[#108945](https://github.com/ClickHouse/ClickHouse/pull/108945) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了使用多线程读取非分区 `Hive` 表时的 use-after-free 问题。[#109164](https://github.com/ClickHouse/ClickHouse/pull/109164) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了设置 `logger.startup_console_log_level` 后，server 启动完成后 console 日志级别未恢复的问题：此前错误地从别的 configuration 键读取了级别，导致 console 在 server 的整个 lifetime 内一直保持在提升后的 startup level。关闭 [#103472](https://github.com/ClickHouse/ClickHouse/issues/103472)。[#109858](https://github.com/ClickHouse/ClickHouse/pull/109858) ([Garrett Thomas](https://github.com/garrettthomaskth)).
* 修复了 `plain_rewritable` disk metadata 事务中的 snapshot isolation 异常。修复 [#92055](https://github.com/ClickHouse/ClickHouse/issues/92055)。[#110948](https://github.com/ClickHouse/ClickHouse/pull/110948) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了 `clickhouse-client --login` 中的一个中止错误 (`front() called on an empty vector`) ：当主机不是通过显式 `--host` 参数传入，而是来自 `--connection`、配置文件或 `CLICKHOUSE_HOST` 环境变量时，会触发该问题。关闭了 [#103603](https://github.com/ClickHouse/ClickHouse/issues/103603)。[#110279](https://github.com/ClickHouse/ClickHouse/pull/110279) ([Christoph Wurm](https://github.com/cwurm)) 。
* 修复了这样一种逻辑错误 (`!part.empty()`) ：lambda 参数是一个用反引号括起来、且名称中包含点的标识符 (例如 `__table1.`) 时会触发。此前，这类查询在 release 构建中会抛出一个已处理的异常，并在格式化错误消息时导致服务器在 debug 和 sanitizer 构建中中止。[#108735](https://github.com/ClickHouse/ClickHouse/pull/108735) ([Groene AI](https://github.com/groeneai)) 。
* 修复了以下场景中的 `LOGICAL_ERROR` (`No set is registered for key`) ：表中存在 `ALIAS` 列，且其表达式使用了 `IN` operator (包括经由另一个 `ALIAS` 列间接使用) 时，执行 `ALTER TABLE ... DROP COLUMN`、`ALTER TABLE ... DELETE`/`UPDATE` 变更以及轻量级 `DELETE FROM` 会触发该错误。[#111039](https://github.com/ClickHouse/ClickHouse/pull/111039) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 修复了异步插入与去重 (`async_insert=1`, `async_insert_deduplicate=1`) 场景下的静默数据丢失问题。当多个 `insert_deduplication_token` 值不同的 async-insert 条目被合并为一次 flush，且写入互不相交的分区时，每个标记都会被登记到此次 flush 涉及的所有分区的去重日志中，而不是只登记到其自身行实际写入的分区。这样一来，后续如果在某个它实际上从未写入过的分区中复用其中一个标记进行插入，该插入就会被静默去重。现在，标记只会登记到其行实际写入的分区。关闭了 [#111031](https://github.com/ClickHouse/ClickHouse/issues/111031)。[#111049](https://github.com/ClickHouse/ClickHouse/pull/111049) ([Groene AI](https://github.com/groeneai)) 。
* 修复了在 experimental setting `make_distributed_plan = 1` 下，查询基于 `Distributed` 表或视图的 `Merge` 表时出现的 `LOGICAL_ERROR` 异常 (`ScatterExchangeStep should have one source shard, got 8`) 以及重复行问题。关闭了 [#107946](https://github.com/ClickHouse/ClickHouse/issues/107946)。[#108401](https://github.com/ClickHouse/ClickHouse/pull/108401) ([Groene AI](https://github.com/groeneai)) 。
* 将 `Nullable(Tuple(...))` 列序列化为单个 `CSV` 字段，而不是将其展平为多个列。此前，非 NULL 值会被写成多个 `CSV` 字段，而 `NULL` 则写成单个 `\N`，导致列数因行而异，从而破坏了 `CSVWithNames`/`CSVWithNamesAndTypes` 头部以及 round-trip。[#108959](https://github.com/ClickHouse/ClickHouse/pull/108959) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `Parquet` v3 读取器中的一个逻辑错误 (`KeyCondition uses PREWHERE output`) ：当格式级别的键条件引用了一个未从 `Parquet` 文件读取的列时会触发该错误。[#109267](https://github.com/ClickHouse/ClickHouse/pull/109267) ([Groene AI](https://github.com/groeneai)) 。
* 修复了在 `serialize_query_plan = 1` 下，带有 `FINAL` 或 `SAMPLE` 的表函数读取返回错误结果的问题。同时还修复了表函数的 aggregation 哈希表统计缓存键，使不同表函数不再共享同一个预分配条目。[#109847](https://github.com/ClickHouse/ClickHouse/pull/109847) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在最终完成前失败的 `BACKUP ... TO Memory(...)` 的清理问题：失败的备份此前会一直保持已注册状态，因此其名称无法复用。[#109947](https://github.com/ClickHouse/ClickHouse/pull/109947) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复 `WITH FILL STEP` 和 `add*` / `subtract*` 日期/时间 interval 函数中的极端 interval 运算问题：超出范围的 delta 不再依赖有符号溢出，使用巨大 `YEAR` step 的 `WITH FILL` 也不再因日历向后推进而卡住。[#110158](https://github.com/ClickHouse/ClickHouse/pull/110158) ([Groene AI](https://github.com/groeneai)).
* 修复来自 Azure 服务的 `411 Length Required` 错误：基于 Poco 的 Azure HTTP 传输现在会根据 request body 为未自行设置 `Content-Length` 的 SDK clients 设置该值，例如 Azure Key Vault。[#110299](https://github.com/ClickHouse/ClickHouse/pull/110299) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* lazy `FINAL` 优化 (`query_plan_optimize_lazy_final`，默认禁用) 在查询按 sorting-key 顺序读取时不再应用，因为其替代查询计划无法保留该顺序，可能返回顺序不正确的结果。此外，当小于待读取行数的 `LIMIT` 直接作用于读取步骤时，也不再应用该优化，因为强制执行的 Set 构建过程会抵消提前终止带来的收益。[#110576](https://github.com/ClickHouse/ClickHouse/pull/110576) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复 `readWKT` 和 `readWKTPoint` 在处理 `POINT EMPTY` 时返回未初始化的 (标量) 或前一行残留的 (向量化) 坐标的问题。由于 ClickHouse `Point` 是固定的 `Tuple(Float64, Float64)`，没有空值表示，因此 `POINT EMPTY` 现在会以 `CANNOT_PARSE_TEXT` 被拒绝。[#110692](https://github.com/ClickHouse/ClickHouse/pull/110692) ([Groene AI](https://github.com/groeneai)).
* 修复在 hash joins 中 materializing 右侧列时 timezone 处理错误的问题。关闭 [#111033](https://github.com/ClickHouse/ClickHouse/issues/111033)。[#111074](https://github.com/ClickHouse/ClickHouse/pull/111074) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复当 `String` (或更窄的 `FixedString`) 键或 minmax 跳过索引 与更宽的 `FixedString` 常量比较进行过滤时，出现错误 `count()` 结果和行丢失的问题，例如 `toFixedString('abc', 257) = string_col`。主键和 minmax pruning 会基于经 NUL 填充的常量构建范围，并错误地跳过匹配的粒度。[#111106](https://github.com/ClickHouse/ClickHouse/pull/111106) ([Groene AI](https://github.com/groeneai)).
* 修复异步 `Native` 格式 inserts 的问题：在 `ALTER ... MODIFY COLUMN` 之后变得不兼容的单个缓冲条目，不再导致整个批次失败。关闭 [#111064](https://github.com/ClickHouse/ClickHouse/issues/111064)。[#111108](https://github.com/ClickHouse/ClickHouse/pull/111108) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 修复将字典 与另一类对象执行 `CREATE OR REPLACE` 时的问题：替换已 committed 后，会因 `CANNOT_DETACH_DICTIONARY_AS_TABLE` 失败，并留下一个孤立的 `_tmp_replace_*` 表。[#111142](https://github.com/ClickHouse/ClickHouse/pull/111142) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复在 `Join` engine 表上执行 `ANY` join 时出现的 `INCOMPATIBLE_TYPE_OF_JOIN`：当右侧列上的 `WHERE` 过滤器 允许 planner 将 join Rewrite 为 `SEMI` 或 `ANTI` 时会触发该问题。`Join` engine 表具有固定声明的 strictness，无法更改，因此现在会拒绝对此类表执行该转换。[#111362](https://github.com/ClickHouse/ClickHouse/pull/111362) ([Groene AI](https://github.com/groeneai)).
* 修复 `format` table function 在输入数据 parse 后为零行时不返回任何列的问题 (例如空 JSON 文档，或不包含任何 feature 的 GeoJSON `FeatureCollection`) 。现在它会返回带有正确列的空结果，而不是抛出 `NOT_FOUND_COLUMN_IN_BLOCK`。关闭 [#111390](https://github.com/ClickHouse/ClickHouse/issues/111390)。[#111428](https://github.com/ClickHouse/ClickHouse/pull/111428) ([Groene AI](https://github.com/groeneai)).

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* Sanitizer 构建现在会将 sanitizer 报告捕获到全局缓冲区 `sanitizer_report` 中，以便 core dump 分析器能够从 core dump 中读取该报告。[#109333](https://github.com/ClickHouse/ClickHouse/pull/109333) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 改为从源码构建 `musl`，不再使用 vendored 二进制文件。[#97452](https://github.com/ClickHouse/ClickHouse/pull/97452) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 LLVM-libc 提供的 SIMD `memcmp`/`memcpy`/`memmove`/`memset`/`bcmp`/`memmem` 实现。[#107566](https://github.com/ClickHouse/ClickHouse/pull/107566) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。修复了在支持 AVX-512 的机器上，`-O0` 调试构建 (`-DDEBUG_O_LEVEL=0`) 中 `memmove` 发生静默损坏的问题。[#110904](https://github.com/ClickHouse/ClickHouse/pull/110904) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 移除了代码库及捆绑第三方库中对 `curl` 库的使用。[#108296](https://github.com/ClickHouse/ClickHouse/pull/108296) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 `mariadb-connector-c` 更新至 3.4.9。[#108328](https://github.com/ClickHouse/ClickHouse/pull/108328) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 `libssh` 更新至 0.12.0。[#108329](https://github.com/ClickHouse/ClickHouse/pull/108329) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复了 macOS 上事务 `COMMIT` 时发生卡顿的问题。[#108375](https://github.com/ClickHouse/ClickHouse/pull/108375) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增了 `COMPRESS_DEBUG_SECTIONS` CMake 选项，用于压缩目标文件中的 DWARF 调试段 (`-gz`) ；在编译器支持时会自动启用，以缩小 Debug 构建目录；最终二进制文件保持未压缩，因此不会影响运行时堆栈跟踪的符号化。[#109306](https://github.com/ClickHouse/ClickHouse/pull/109306) ([Murphy](https://github.com/murphy-4o)) 。此外，捆绑的 LLVM 工具链现已使用 zlib 构建，因此其 clang 支持 `-gz=zlib`，并补上了缺失的 `clang++-21` 符号链接。[#109596](https://github.com/ClickHouse/ClickHouse/pull/109596) ([Murphy](https://github.com/murphy-4o)) 。
* Debug 构建现在会以精简调试信息 (`debug = 1`，cargo 的 `limited` 级别) 且不使用增量缓存 (`REDUCE_RUST_DEBUG_INFO`，默认开启) 的方式编译 vendored Rust crate，从而缩小 Rust 构建制品体积 (全新构建时约从 12 GB 降至 7 GB) ，并防止 cargo 缓存在重复构建过程中无限增长。设置 `-DREDUCE_RUST_DEBUG_INFO=OFF` 可恢复完整 DWARF 和增量编译。[#109471](https://github.com/ClickHouse/ClickHouse/pull/109471) ([Murphy](https://github.com/murphy-4o)) 。
* 支持 macOS 上的流式分布式查询交换和 `STREAM` 读取。[#109769](https://github.com/ClickHouse/ClickHouse/pull/109769) ([Raúl Marín](https://github.com/Algunenano)) 。
* 将 `libarchive` 从 3.8.7 升级至 3.8.8。[#109874](https://github.com/ClickHouse/ClickHouse/pull/109874) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 将 `c-ares` 从 1.34.6 升级至 1.34.8。[#109905](https://github.com/ClickHouse/ClickHouse/pull/109905) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 更新 `krb5` 以修复 CVE-2026-40355 和 CVE-2026-40356。[#109910](https://github.com/ClickHouse/ClickHouse/pull/109910) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 移除了 `libpng` 这一第三方依赖。`FORMAT PNG` 现在改用一个小型内置 PNG 编码器 (由随附的 zlib 提供支持) 。[#110051](https://github.com/ClickHouse/ClickHouse/pull/110051) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 macOS 上，通过封装 jemalloc 的 malloc zone，可在 memory tracker 中跟踪原始 C 内存分配 (不经过 `operator new`) ，从而对这部分内存强制执行 memory limit。[#110370](https://github.com/ClickHouse/ClickHouse/pull/110370) ([Raúl Marín](https://github.com/Algunenano)).
* `clickhouse-server` 和 `clickhouse-keeper` 的 `-distroless` Docker image 现在从不含 shell 的 production stage 构建；此前它们是从 debug stage 构建的，并包含 `/busybox/sh`。关闭 [#105677](https://github.com/ClickHouse/ClickHouse/issues/105677)。[#105678](https://github.com/ClickHouse/ClickHouse/pull/105678) ([ashishch432](https://github.com/ashishch432)).
* 将 `abseil-cpp` 更新至 LTS `20260526.0`。[#108991](https://github.com/ClickHouse/ClickHouse/pull/108991) ([Konstantin Bogdanov](https://github.com/thevar1able)).

<div id="266">
  ### ClickHouse 26.6 版本发布，2026-06-25。 [演示文稿](https://presentations.clickhouse.com/2026-release-26.6/), [视频](https://www.youtube.com/watch?v=-NmqMH9y4EY)
</div>

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

* 此项变更移除了 `allow_experimental_query_deduplication` 功能。该功能长期处于实验阶段，没有测试，也不会再提供支持 (最初的测试不稳定，已在 [#49579](https://github.com/ClickHouse/ClickHouse/pull/49579) 中移除) 。[#99398](https://github.com/ClickHouse/ClickHouse/pull/99398) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 基于 XRay 的 `SYSTEM INSTRUMENT` 功能现已使用 `arguments` 替代 `parameters`：`system.instrumentation.parameters` 列已重命名为 `arguments`，`SYSTEM INSTRUMENT ADD ... HANDLER PARAMETERS ...` 语法也已改为 `SYSTEM INSTRUMENT ADD ... HANDLER ARGUMENTS ...`。使用旧列名或旧语法的查询及自动化脚本必须更新为新名称；旧名称已不再受支持。[#103854](https://github.com/ClickHouse/ClickHouse/pull/103854) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 设置 `show_data_lake_catalogs_in_system_tables` 已重命名为 `show_remote_databases_in_system_tables`，且适用范围已扩大：当其值为 0 (默认值) 时，除了数据湖目录之外，`MySQL` 和 `PostgreSQL` 数据库也会从 `system.tables`、`system.columns` 和 `system.completions` 中隐藏。旧设置名保留为别名。[#104416](https://github.com/ClickHouse/ClickHouse/pull/104416) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 默认的 x86 构建现已以 x86-64-v3 (AVX2) 为目标，而不是 x86-64-v2 (SSE4.2) 。这要求 CPU 支持 AVX2 (Intel Haswell 或更新架构，AMD Excavator 或更新架构) 。如果你的 CPU 不支持 AVX2，请使用以标准 x86-64 为目标的 `amd64compat` 构建。[#105019](https://github.com/ClickHouse/ClickHouse/pull/105019) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在 `min`/`max` 聚合和 `minmax` 索引中，现会拒绝嵌套的 `Dynamic`/`Variant`。此前只会检查顶层的 `Dynamic`/`Variant`。关闭 [#104747](https://github.com/ClickHouse/ClickHouse/issues/104747)。[#105468](https://github.com/ClickHouse/ClickHouse/pull/105468) ([Pavel Kruglov](https://github.com/Avogar)) 。
* `icebergHash` 和 `icebergBucket` 现在会对 `Int128`、`UInt128`、`Int256`、`UInt256` 和 `Decimal256` 参数显式报错并拒绝处理。此前它们会静默截断更宽的值，从而产生哈希冲突。Iceberg spec 仅定义了 32/64 位整数以及精度最高为 38 的 Decimal 的哈希；对于能够容纳的值，可转换为 `Int64` 或 `Decimal128` 以保持之前的行为。[#105866](https://github.com/ClickHouse/ClickHouse/pull/105866) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在命令行客户端中新增了对查询回显的细粒度控制。`--echo` 选项现在可接受可选布尔值，并且在交互模式和批次模式下都可用。新增的 `--echo-formatted` 和 `--echo-query-id` 选项分别控制是否格式化回显的查询，以及是否打印 `query_id`。`--hilite`/`--highlight` 选项现在也会控制回显查询的高亮显示。连带影响是，`--echo` 现在是一个布尔值选项，因此紧跟在裸 `--echo` 后面的定位查询会被视为它的值；请改用 `--echo --query "..."` 或 `--echo=false`。[#106191](https://github.com/ClickHouse/ClickHouse/pull/106191) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 已移除实验性的 KQL (Kusto) 函数 `array_sort_asc` 和 `array_sort_desc`，以及它们的 SQL 后端 `kql_array_sort_asc` 和 `kql_array_sort_desc`。这些函数属于实验性功能，实现质量较低，并且是正确性问题和解析器错误的来源。现在，使用这些名称的查询将返回 `UNKNOWN_FUNCTION`。[#108101](https://github.com/ClickHouse/ClickHouse/pull/108101) ([Groene AI](https://github.com/groeneai)) 。
* 当源表在所请求的分区中没有 parts 时，`ALTER TABLE ... REPLACE PARTITION ... FROM ...` 不再静默删除目标端分区中的数据。此前，这类请求会删除目标端分区，却不会写入任何替代内容——这很容易误操作导致数据丢失。现在默认会以 `BAD_ARGUMENTS` 拒绝该操作。若要恢复此前的静默清空行为，请设置新设置 `allow_replace_partition_from_empty_source = 1`，或将 `compatibility` 设为 `26.5` 或更低；若要显式删除目标端数据，请使用 `ALTER TABLE ... DROP PARTITION`。[#104939](https://github.com/ClickHouse/ClickHouse/pull/104939) ([Groene AI](https://github.com/groeneai)).
* 服务器级设置 `insert_deduplication_version` 的默认值已从 `compatible_double_hashes` 更改为 `new_unified_hash`。插入去重现在基于整个插入块 (每次 insert) 生效，而不是基于每个 part/分区：对同一次 insert 的 retry 仍会被去重，但两个不同的 insert 即使生成了相同的 part，也不再进行跨 insert 去重；此外，相同行以不同顺序插入时，也不再被去重。将 `insert_deduplication_version = compatible_double_hashes` 可恢复此前的行为。对于从默认值为 `old_separate_hashes` 的版本直接升级的实例，在依赖 `new_unified_hash` 之前，应先使用 `compatible_double_hashes` 运行，直到相关的最长去重窗口结束。[#107886](https://github.com/ClickHouse/ClickHouse/pull/107886) ([Sema Checherinda](https://github.com/CheSema)).

<div id="267-new-feature">
  #### 新特性
</div>

* 新增了对 `MergeTree` 表上连续查询的支持，该功能通过一系列快照读取实现。这是朝着全面支持流式查询迈出的第一步。[#105114](https://github.com/ClickHouse/ClickHouse/pull/105114) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 新增了假设 (what-if) 跳过索引。使用 `CREATE HYPOTHETICAL INDEX ... ON t (expr) TYPE ...` 定义会话级的虚拟跳过索引，然后使用 `EXPLAIN WHATIF SELECT ...` 在无需实际 materialize 的情况下估算其跳过率和成本。已定义的索引可在新的 `system.hypothetical_indexes` 表中查看。[#104608](https://github.com/ClickHouse/ClickHouse/pull/104608) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 在 `clickhouse-server` 中新增了内嵌的 `/schema` Web UI，用于可视化表、materialized view、可刷新materialized view、字典、分布式表和视图之间的依赖关系图。[#105276](https://github.com/ClickHouse/ClickHouse/pull/105276) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 新增了对 `PNG` 输出格式的支持，允许将查询结果直接渲染为 PNG 图像。[#74691](https://github.com/ClickHouse/ClickHouse/pull/74691) ([Maksim Dergousov](https://github.com/m7kss1)).
* 新增了对调用 `clickhouse-client` 或 `clickhouse-local` 的 AI 编码 agent (Claude Code、Cursor、Codex、Gemini CLI、Goose 等) 的检测，依据为环境变量。检测到的 agent 会记录在 `system.query_log`、`system.query_thread_log` 和 `system.processes` 的新 `client_agent` 列中。[#106619](https://github.com/ClickHouse/ClickHouse/pull/106619) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了系统表 `system.documentation`，将系统通用组件 (函数、表引擎、数据类型、settings、formats 等) 的内嵌参考文档汇总到一张表中，文档以 Markdown 形式呈现。[#107463](https://github.com/ClickHouse/ClickHouse/pull/107463) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了 `GeoJSON` 输入格式，用于读取 [GeoJSON](https://geojson.org/) `FeatureCollection` 文档，并为每个 feature 生成一行，其中包含 `id` (`String`)、`geometry` (`Geometry`) 和 `properties` (`Nullable(JSON)`) 列。`Point`、`LineString`、`MultiLineString`、`Polygon` 和 `MultiPolygon` 几何体会被读入 ClickHouse 原生的 `Geometry` 类型。默认情况下，`GeometryCollection` 和 `MultiPoint` (`Geometry` 类型无法表示这两种类型) 会引发异常；也可以通过 `input_format_geojson_unsupported_geometry_handling` 设置将其存储为 `NULL`。此项改进对 [#91533](https://github.com/ClickHouse/ClickHouse/issues/91533) 有所贡献。[#98124](https://github.com/ClickHouse/ClickHouse/pull/98124) ([Mark Needham](https://github.com/mneedham)).
* 新增了可直接通过 SQL 提供 Mapbox 矢量瓦片的函数：`MVTEncodeGeom` 会将几何体投影到 slippy map 瓦片的像素空间并进行裁剪，`MVTEncode` 会将一组投影后的几何体聚合为单图层瓦片的二进制字节，而 `MVTBoundingBox` / `MVTBoundingBoxMercator` 会返回瓦片的 bounding box，以便将行限制在该范围内。支持 Point、line 和 polygon 几何体。同时也提供 PostGIS 别名 `ST_AsMVTGeom` 和 `ST_AsMVT`。[#106107](https://github.com/ClickHouse/ClickHouse/pull/106107) ([Saarthak Gupta](https://github.com/saarthak2002)).
* `clickhouse-local` 现在支持 `SYSTEM START LISTEN` 和 `SYSTEM STOP LISTEN` 查询，使其能够转变为接受 TCP 和 HTTP 连接的服务器。[#101143](https://github.com/ClickHouse/ClickHouse/pull/101143) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse-client` 和 `clickhouse-local` 新增了交互式 `help` 命令。输入 `help <name>` (也可使用 `/help`、`man`、`/man`) 后，会在终端中显示函数、表引擎、数据类型、格式、设置或其他组件的文档，文档由 Markdown 渲染，并带有 SQL 语法高亮。若名称有歧义，则会显示所有匹配项；若未找到，则会提示相近名称。[#108042](https://github.com/ClickHouse/ClickHouse/pull/108042) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持写入 Azure Data Lake Storage Gen2。[#105406](https://github.com/ClickHouse/ClickHouse/pull/105406) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 新增 `RowBinaryWithNamesAndTypesAndDefaults` 格式，以更好地支持 schema evolution。[#105736](https://github.com/ClickHouse/ClickHouse/pull/105736) ([Mark Zitnik](https://github.com/mzitnik)).
* 在 `ALTER TABLE` 查询中实现了 `ADD ENUM VALUES`，从而简化向现有 `Enum` 类型追加新值的操作，无需再次指定当前所有 `Enum` 值。[#93830](https://github.com/ClickHouse/ClickHouse/pull/93830) ([Ilya Golshtein](https://github.com/ilejn)).
* 可刷新materialized view 现已支持 `REFRESH DEPENDS ON`，可在另一个 RMV 刷新时触发刷新，而不再依赖基于时间的调度。 (`REFRESH EVERY ... DEPENDS ON` 之前已存在，但无法在该用例中可靠使用。) 请参阅 `CREATE MATERIALIZED VIEW` 文档。[#104440](https://github.com/ClickHouse/ClickHouse/pull/104440) ([Michael Kolupaev](https://github.com/al13n321)).
* 新增支持按名称模式选择列，可使用 `* LIKE '<pattern>'` 和 `* ILIKE '<pattern>'`，也包括限定形式，例如 `table.* LIKE '<pattern>'` 和 `table.* ILIKE '<pattern>'`。`LIKE` 按区分大小写方式匹配列名，`ILIKE` 按不区分大小写方式匹配。[#104569](https://github.com/ClickHouse/ClickHouse/pull/104569) ([Yue Ni](https://github.com/niyue)).
* 新增 `ESCAPE` 语法，可在 `LIKE` 模式中定义自定义转义字符，从而将 `%` 和 `_` 视为普通字符而非通配符。[#99774](https://github.com/ClickHouse/ClickHouse/pull/99774) ([Ilya Yatsishin](https://github.com/qoega)).
* 新增 `materialize_projections_on_insert` 和 `materialize_projections_on_merge` 两个 `MergeTree` 表设置。当 `materialize_projections_on_insert = 0` 时，`INSERT` 会跳过构建 projection parts，从而提升拥有大量 projections 的表的插入吞吐量。当 `materialize_projections_on_merge = 1` 时，如果某个 projection 在其所有源 parts 中都缺失，则 merge 会重建该 projection，因此 projections 可以在 merges 期间构建，而不是在 insert 时构建。merges 仍然只会合并具有相同 projection 集合的 parts。[#100993](https://github.com/ClickHouse/ClickHouse/pull/100993) ([Christoph Wurm](https://github.com/cwurm)).
* 新增一个不可变的 `MergeTree` 设置 `allow_tuple_element_aggregation`，默认禁用。启用后，`SummingMergeTree`、`AggregatingMergeTree` 和 `CoalescingMergeTree` 会递归展平 `Tuple` 列，并在 merges 期间对每个叶子元素分别进行聚合，就像它们是顶层列一样——`SummingMergeTree` 对其求和，`AggregatingMergeTree` 合并其聚合函数状态，而 `CoalescingMergeTree` 保留其最后一个非 NULL 值。该设置必须在建表时指定；对于不支持该设置的引擎，会静默忽略。[#98039](https://github.com/ClickHouse/ClickHouse/pull/98039) ([johnjing](https://github.com/JingYanchao)).
* 新增函数 `quantizeBFloat16ToInt8` 和 `dequantizeInt8ToBFloat16`：一种标量编解码器，使用 256 级高斯 Lloyd-Max 量化器将 embedding 分量压缩为 8 比特，并可通过比特截断从中提取 Int4/Int2/binary 编码。[#108102](https://github.com/ClickHouse/ClickHouse/pull/108102) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 添加函数 `arrayTopK` 和 `arrayBottomK`：- `arrayTopK(k, array)` 按降序返回最大的 K 个元素 - `arrayBottomK(k, array)` 按升序返回最小的 K 个元素。[#104563](https://github.com/ClickHouse/ClickHouse/pull/104563) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 新增系统表 `system.iceberg_files`，用于公开 `Iceberg` 表的每文件元数据；在每个表的当前快照中，每个数据文件或删除文件各对应一行。此项关闭了 [#98777](https://github.com/ClickHouse/ClickHouse/issues/98777)。[#104415](https://github.com/ClickHouse/ClickHouse/pull/104415) ([Asya Shneerson](https://github.com/asya-ch)) 。
* 新增 `system.constraints` 表，提供所有表上的全部 `CHECK` 和 `ASSUME` 约束信息，包括约束名称、类型和表达式。[#105337](https://github.com/ClickHouse/ClickHouse/pull/105337) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 新增 `system.dictionary_layouts` 表，列出可用的字典布局及其内嵌文档 (`description`、`syntax`、`examples`、`introduced_in`、`related`) 。[#106182](https://github.com/ClickHouse/ClickHouse/pull/106182) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `system.dictionary_sources` 表，列出可用的字典源及其内嵌文档 (`description`、`syntax`、`examples`、`introduced_in`、`related`) 。[#106184](https://github.com/ClickHouse/ClickHouse/pull/106184) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `system.data_skipping_index_types` 表，列出可用的数据跳过索引类型及其内嵌文档 (`description`、`syntax`、`examples`、`introduced_in`、`related`) 。[#106186](https://github.com/ClickHouse/ClickHouse/pull/106186) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `system.disk_types` 表，列出可用的磁盘类型及其内嵌文档 (`description`、`syntax`、`examples`、`introduced_in`、`related`) 。[#106187](https://github.com/ClickHouse/ClickHouse/pull/106187) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 实现了 `SYSTEM RESTART DISK <name>`：现在它会重新加载磁盘的内存中元数据，并重新扫描位于其上的只读副本表的数据分区片段。这样一来，位于共享 `plain_rewritable` 存储上的表的只读副本便可按需感知另一台服务器写入的数据，而无需等待 `refresh_parts_interval` 或重启服务器。[#106645](https://github.com/ClickHouse/ClickHouse/pull/106645) ([Jordi Villar](https://github.com/jrdi)) 。
* 现已支持 PostgreSQL 风格的 `expr OP SOME(array)` / `expr OP ALL(array)` (右侧为非 subquery) 。对于 `=`/`<>`，会将其重写为 `has` / `NOT has`；对于其他 comparison operators，则会重写为 `arrayExists` / `arrayAll` lambda。由于 `any` 同时也是 aggregate function，因此 array form 不接受 `ANY`；请改用 `SOME`。`ANY`/`SOME`/`ALL` 的 subquery form 仍会被降为 `IN` / `NOT IN`。[#105129](https://github.com/ClickHouse/ClickHouse/pull/105129) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增两种 `load_balancing` 策略：`hostname_longest_common_prefix` 和 `hostname_longest_common_suffix`。它们会优先选择与 initiator 的 hostname 具有最长公共前缀 (或后缀) 的副本。当数据中心被编码在 hostname 的前缀或后缀中，且其中数字段长度可变时，这些策略非常有用；在这种情况下，现有的 `nearest_hostname` 和 `hostname_levenshtein_distance` 策略可能会选错副本。[#107360](https://github.com/ClickHouse/ClickHouse/pull/107360) ([Denny \[DBA at Innervate\]](https://github.com/den-crane)) 。
* 向 `system.session_log` 表添加了 TLS 客户端证书信息 (subject、序列号、签发方和有效期) ，以提升基于证书的身份验证的可观测性。[#107679](https://github.com/ClickHouse/ClickHouse/pull/107679) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 `S3` 的基于角色的访问新增了可选的 `external_id` 凭证。[#106941](https://github.com/ClickHouse/ClickHouse/pull/106941) ([Elian Gidoni](https://github.com/eliangidoni)) 。
* 新增了 `S3Queue` 设置 `after_processing_move_preserve_path`。当它与 `after_processing='move'` 和 `after_processing_move_prefix` 一起启用时，已处理对象在移动时会保留其在目标前缀下的完整源路径，而不是被扁平化为仅保留文件名。[#105354](https://github.com/ClickHouse/ClickHouse/pull/105354) ([Asya Shneerson](https://github.com/asya-ch)) 。
* 新增 `message_queue_disable_insertion` 服务器设置，用于禁用消息队列引擎 (`Kafka`、`RabbitMQ`、`NATS`) 向已附加的 materialized view 插入数据。适用于只读副本场景。[#104911](https://github.com/ClickHouse/ClickHouse/pull/104911) ([JIaQi Tang](https://github.com/JiaQiTang98)) 。
* 新增了 `LOCALTIME` 和 `LOCALTIMESTAMP` (SQL 标准 / PostgreSQL 语法) 。`LOCALTIMESTAMP` 是 `now()` 的别名 (返回 `DateTime`) ；`LOCALTIME` 返回当前时刻的当日时间，类型为 `Time`。[#106139](https://github.com/ClickHouse/ClickHouse/pull/106139) ([Thomas Cabral](https://github.com/thomas-cabral)) 。
* 新增 `date_part('unit', expr)`，作为 `EXTRACT(unit FROM expr)` 的语法糖。支持所有标准时间间隔类型，以及 PostgreSQL 的扩展项 (`epoch`、`dow`、`doy`、`isodow`、`isoyear`、`century`、`decade`、`millennium`) 。[#105127](https://github.com/ClickHouse/ClickHouse/pull/105127) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增与 PostgreSQL 兼容的 `EXTRACT(TIMEZONE_HOUR FROM dt)` 和 `EXTRACT(TIMEZONE_MINUTE FROM dt)`，用于提取时区偏移的小时和分钟部分；同时支持 `EXTRACT(<unit> FROM INTERVAL n <unit>)` / `date_part('<unit>', INTERVAL n <unit>)`，用于从时间间隔中提取值。[#106227](https://github.com/ClickHouse/ClickHouse/pull/106227) ([Vinayak Joshi](https://github.com/vinayakj592)) 。
* 为 `argMin` 和 `argMax` 新增了聚合别名 `min_by` 和 `max_by`。[#105712](https://github.com/ClickHouse/ClickHouse/pull/105712) ([Joey Yu](https://github.com/itsjoeoui)) 。这些别名很蠢，真正的工程师都用 ClickHouse 原本的名称。
* 新增 `REGEXP_SUBSTR`，作为 `regexpExtract` 的不区分大小写别名，以兼容 Oracle/MySQL/Snowflake。[#105122](https://github.com/ClickHouse/ClickHouse/pull/105122) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `SESSION_USER`，作为 `currentUser()` 的不区分大小写别名，以兼容 PostgreSQL / SQL 标准。[#106081](https://github.com/ClickHouse/ClickHouse/pull/106081) ([Takumi Hara](https://github.com/takumihara)) 。
* 现在支持在 `ALTER TABLE ... ADD/MODIFY COLUMN` 中使用末尾的 `NULL` / `NOT NULL` modifier，与 `CREATE TABLE` 保持一致。[#106150](https://github.com/ClickHouse/ClickHouse/pull/106150) ([Takumi Hara](https://github.com/takumihara)) 。
* 现在可以使用 h3 的 `h3PolygonToCellsWithContainment` 函数来采用其新算法，该算法支持基于中心、完全包含和重叠这几种包含模式。[#104455](https://github.com/ClickHouse/ClickHouse/pull/104455) ([Youssef Kadry](https://github.com/yousefQadry)) 。
* 当按 `IP_ADDRESS` 或 `FORWARDED_IP_ADDRESS` 进行键控时，新增 `IPV4_PREFIX_BITS and IPV6_PREFIX_BITS` 标志。[#89270](https://github.com/ClickHouse/ClickHouse/pull/89270) ([Aditya Chopra](https://github.com/adityachopra29)) 。
* `formatReadableTimeDelta` 现在接受除 `Month` 和 `Year` 之外其他类型的 `INTERVAL` 表达式作为输入。[#64315](https://github.com/ClickHouse/ClickHouse/pull/64315) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)) 。
* 用户现在可以为 `formatReadableSize`、`formatReadableDecimalSize` 和 `formatReadableQuantity` 函数指定可选的 precision 参数，用于控制小数点后的位数。默认值为 2，保持原有行为不变。[#104648](https://github.com/ClickHouse/ClickHouse/pull/104648) ([Antonio Filipovic](https://github.com/antoniofilipovic)) 。
* 新增 `output_format_float_precision` 设置，用于控制浮点文本输出中的小数位数。[#99721](https://github.com/ClickHouse/ClickHouse/pull/99721) ([phulv94](https://github.com/phulv94)) 。
* 新增设置 `output_format_always_write_decimal_point_in_float_and_decimal`，用于在文本格式中始终为浮点数和 `Decimal` 数值输出小数点，即使该值是整数也是如此。例如，输出 `1.` 而不是 `1`。默认禁用。[#62614](https://github.com/ClickHouse/ClickHouse/pull/62614) ([Ilya Yatsishin](https://github.com/qoega)) 。
* 新增对 HTTP handler 配置元素 `<url_prefix>` 和 `<full_url_prefix>` 的支持 (匹配基础路径下的所有路径，例如对 Prometheus handlers 很有用) ，以及 `<url_regexp>`、`<full_url_regexp>` 和 `<headers_regexp>`。旧的 `<url>regex:...</url>` 形式现已废弃。[#107492](https://github.com/ClickHouse/ClickHouse/pull/107492) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 支持 `basic` statistics，这是一种紧凑的按列统计信息，可在适用时存储数值最小/最大值、字符串平均长度以及 NULL 计数。[#106048](https://github.com/ClickHouse/ClickHouse/pull/106048) ([Han Fei](https://github.com/hanfei1991)) 。
* ClickHouse Keeper 现支持 TTL 节点，可通过 `create_ttl` feature flag 选择启用。[#100397](https://github.com/ClickHouse/ClickHouse/pull/100397) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 为工作负载引入内存预留功能。请参阅[工作负载调度](https://clickhouse.com/docs/operations/workload-scheduling)文档。[#82414](https://github.com/ClickHouse/ClickHouse/pull/82414) ([Sergei Trifonov](https://github.com/serxa)) 。

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

* 多阶段分布式查询执行：规划器将查询计划拆分为多个阶段，这些阶段通过 scatter / broadcast / gather / shuffle exchanges 连接，并将查询计划片段分发到 worker 节点。阶段之间的数据可通过 TCP 进行流式传输，也可通过共享对象存储中的临时 File 传递；该路径支持分布式 shuffle 和 broadcast hash join、shuffle 聚合以及分布式排序。该功能属于 Experimental，默认禁用。[#106020](https://github.com/ClickHouse/ClickHouse/pull/106020) ([Alexander Gololobov](https://github.com/davenger))。实验性的分布式查询计划引擎 (`make_distributed_plan`) 现在可为每个 worker 使用不同的任务分发端口和流式 exchange 端口，这些端口可在 `<remote_servers>` 中按副本通过 `stateless_worker_port` 和 `streaming_exchange_port` 配置。未设置时，将使用此前的服务器级端口 (`stateless_worker_client.port` 和 `distributed_query.streaming_exchange_port`) 。这使得在一台主机上运行多个 worker 成为可能。[#107885](https://github.com/ClickHouse/ClickHouse/pull/107885) ([Alexander Gololobov](https://github.com/davenger))。
* 新增实验性的 `dphyp` join 重排序算法，用于 inner joins，可作为 `query_plan_optimize_join_order_algorithm` setting 的一个选项；同时新增 `query_plan_optimize_join_order_max_searched_plans` setting，用于限制 join 顺序搜索范围，并在超出上限时回退到链中的下一个算法；将其设为 `0` 可保留此前不设上限的搜索行为。[#98798](https://github.com/ClickHouse/ClickHouse/pull/98798) ([Alexander Gololobov](https://github.com/davenger))。
* 新增 `aiEmbed` 函数，可在 ClickHouse 内部调用 LLM API 生成嵌入。[#102922](https://github.com/ClickHouse/ClickHouse/pull/102922) ([George Larionov](https://github.com/george-larionov))。
* 新增实验性的 Linux OOM canary：这是一个牺牲型子进程，会在主服务器进程之前成为 Linux OOM killer 的目标。启用 `oom_canary_enable` 后，它会通过清理分配器缓存、取消查询、取消合并，以及在 `system.crash_log` 中记录事件来缓解内存压力。OOM 响应需要 cgroup v2 `memory.events` 中存在 OOM-kill 证据。[#101942](https://github.com/ClickHouse/ClickHouse/pull/101942) ([Peng](https://github.com/fastio))。
* `/webterminal` 上的 Web terminal 界面现已成为生产可用功能，并默认启用。它由新的 `enable_webterminal` server setting 控制；原有的 `allow_experimental_webterminal` setting 已弃用，但出于 backward compatibility 仍会生效。要禁用该端点，请将 `enable_webterminal` 设为 `false`。[#106255](https://github.com/ClickHouse/ClickHouse/pull/106255) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* PromQL HTTP 端点现已支持通过 URL 查询参数指定 database 和表 (`database=`、`table=` 或 `table=db.table`) 。此前隐式回退到 `default.prometheus` 表的行为已移除：如果 handler config 和 URL 都未指定表，handler 现在会返回 `The time series table name is not set`。要保留旧行为，请配置 `<table>default.prometheus</table>`，或在 URL 中传递 `table=...`。[#107553](https://github.com/ClickHouse/ClickHouse/pull/107553) ([Vitaly Baranov](https://github.com/vitlibar))。
* 在 `prometheusQuery` 和 `prometheusQueryRange` table functions 中新增对 PromQL `histogram_quantile` 函数的支持。这使得可以基于由 `le` 标签标识的经典 Prometheus 直方图桶计算分位数。[#103477](https://github.com/ClickHouse/ClickHouse/pull/103477) ([Joe Smith](https://github.com/Yasumoto))。
* 为 text index 新增惰性倒排列表应用模式。通过 `SET allow_experimental_text_index_lazy_apply = 1` 和 `SET text_index_posting_list_apply_mode = 'lazy'` 启用后，倒排列表会按需在打包块粒度上采用基于游标的方式解码，而不是完整物化为 Roaring Bitmaps，从而降低选择性 text index queries 的内存占用和 CPU 开销。[#100035](https://github.com/ClickHouse/ClickHouse/pull/100035) ([Peng](https://github.com/fastio))。
* 新增对 WebAssembly UDF 的 [AssemblyScript](https://www.assemblyscript.org) ABI 支持。你可以通过基于浏览器的 [playground](https://pastila.nl/?0009878e/b9768c4e2144d0c2f3dd512e7a1aaf69.html) 试用 AssemblyScript ABI，无需在本地安装工具链；它会编译 AssemblyScript 代码，并将生成的 WebAssembly 模块加载到本地 ClickHouse 中。[#104606](https://github.com/ClickHouse/ClickHouse/pull/104606) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 允许在主 HTTP 端口上挂载 Prometheus 处理程序，并支持可选前缀。[#104975](https://github.com/ClickHouse/ClickHouse/pull/104975) ([James Cunningham](https://github.com/JTCunning)).
* 新增 Experimental `MergeTree` setting `packed_skip_index_max_bytes`，会将较小的跳过索引子流打包到每个分片的单个 `skp_idx.packed` 归档中，从而在表上定义大量跳过索引时降低 inode 压力。是否打包会在写入时按子流决定：序列化后大小低于阈值的子流会进入归档，较大的则继续使用独立的 `skp_idx_<name>.idx2` / `.mrk2` 布局。单个分片可以混合使用这两种布局。全文索引不受支持，始终按文件存储。默认值为 0 (禁用打包) 。[#105321](https://github.com/ClickHouse/ClickHouse/pull/105321) ([Raúl Marín](https://github.com/Algunenano)).
* 为使用 `ABI BUFFERED_V1` 的 WebAssembly UDF 新增对 `Buffers` serialization 的支持，并将 `webassembly_udf_enable_fuel` 添加为持久化的 WASM UDF 函数 setting。[#105574](https://github.com/ClickHouse/ClickHouse/pull/105574) ([Antonio Andelic](https://github.com/antonio2368)).
* 新增 Experimental `use_reader_executor` setting (默认关闭) ，将读取切换为通过新的基于管道的 `ReaderExecutor`，而不是 legacy 的读取缓冲区链。[#106570](https://github.com/ClickHouse/ClickHouse/pull/106570) ([Sema Checherinda](https://github.com/CheSema)). 还为 Experimental `use_reader_executor` 读取路径新增了可观测性指标，包括一个建模的读取成本 KPI (`ReaderExecutorModeledCostMsPerRequestedMiB`) 。[#106968](https://github.com/ClickHouse/ClickHouse/pull/106968) ([Sema Checherinda](https://github.com/CheSema)). 此外，在 Experimental `use_reader_executor` 读取路径后新增了 `ChainedBuffers` 缓冲区，并提供 `ReaderExecutorChainedBufferBytes` 指标。[#107210](https://github.com/ClickHouse/ClickHouse/pull/107210) ([Sema Checherinda](https://github.com/CheSema)).
* `MergeTree` sorting key 中的降序 sort order (例如 `ORDER BY (time DESC, key)`) 现在始终受支持，不再需要 Experimental setting `allow_experimental_reverse_key`；该 setting 已变为 Obsolete。[#106440](https://github.com/ClickHouse/ClickHouse/pull/106440) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* `Nullable(Tuple(...))` 现已进入 Beta。默认禁用，设置 `enable_nullable_tuple_type = 1` 即可使用。[#107754](https://github.com/ClickHouse/ClickHouse/pull/107754) ([Nihal Z. Miaji](https://github.com/nihalzp)).

<div id="267-performance-improvement">
  #### 性能提升
</div>

* 对 Keeper 进行了多项改进，使其整体速度提升约 2 倍 (包括更高效的批处理、向 leader 发送消息的流水线化，以及日志追加的流水线化) 。[#101757](https://github.com/ClickHouse/ClickHouse/pull/101757) ([Michael Kolupaev](https://github.com/al13n321)).
* 降低了简单 `SELECT` 查询的单次开销 (解析、分析和规划) 。例如，通过单个连接执行 `SELECT count() FROM hits` 现在大约快了 50%。[#104513](https://github.com/ClickHouse/ClickHouse/pull/104513) ([Raúl Marín](https://github.com/Algunenano)).
* 针对较长和高基数主键，优化了主键索引分析。对于较长的主键，索引分析的运行时间现在主要取决于查询过滤器的复杂度 (即实际用到的键列) ，而不再取决于主键长度——因此，对于只按其中少数几列进行过滤的查询，扩展排序键几乎不会给索引分析带来额外开销。对于高基数主键，ClickHouse 仅在内存中保留具有筛选作用的键列前缀，而不会加载后续列；现在索引分析只处理这部分内存中的前缀，而不是整个键。该优化默认启用，也可以通过新设置 `use_lightweight_primary_key_index_analysis` 将其关闭。关闭了 [#65103](https://github.com/ClickHouse/ClickHouse/issues/65103)。[#91836](https://github.com/ClickHouse/ClickHouse/pull/91836) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 默认的 x86 build 现在以 x86-64-v3 (AVX2) 为目标，而不是 x86-64-v2 (SSE4.2)。这要求 CPU 支持 AVX2 (Intel Haswell 或更高版本，AMD Excavator 或更高版本) 。如果你的 CPU 不支持 AVX2，请使用面向标准 x86-64 的 `amd64compat` build。[#105019](https://github.com/ClickHouse/ClickHouse/pull/105019) ([Raúl Marín](https://github.com/Algunenano)).
* 将 `ipnsort` 和 `driftsort` (稳定排序) ——Rust 标准库排序实现的 C++ 移植版本——用于通用比较排序。这提升了非数值列上的 `ORDER BY` 和稳定排序性能，并消除了逆序输入时的一种最坏情况。[#106650](https://github.com/ClickHouse/ClickHouse/pull/106650) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 针对高基数且分布均匀的键，新增了 `GROUP BY` 优化：通过对分组键进行哈希，将行分散到各个线程，使每个线程聚合互不重叠的一部分键，从而无需 merge 阶段。设置 `enable_sharding_aggregator = 1` 即可启用。[#104233](https://github.com/ClickHouse/ClickHouse/pull/104233) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 为字符串键的 `GROUP BY` 查询启用了哈希表预取，使高基数字符串聚合性能提升约 8%。[#101007](https://github.com/ClickHouse/ClickHouse/pull/101007) ([Le Zhang](https://github.com/damahua)).
* 在 merge 包含大型 aggregate state (例如 `groupArray`) 的部分 two-level aggregation 结果时，通过在 merge 过程中逐步释放每个 bucket 的源状态，而不是一直保留到 merge 完成，降低了峰值内存占用。[#102330](https://github.com/ClickHouse/ClickHouse/pull/102330) ([Yuri Fedoseev](https://github.com/yurifedoseev)).
* 优化了 `Enum` `DataType` 的内存表示。对于包含 `Enum` 类型的表，`Enum` 组件的内存占用最多可降低 10 倍。按值 (数字) 检索名称的耗时相当或更快。按名称搜索会略慢一些，但这种访问方式较少见。[#95668](https://github.com/ClickHouse/ClickHouse/pull/95668) ([Ilya Yatsishin](https://github.com/qoega)).
* 添加了标识符解析缓存，以避免在查询分析期间重复进行标识符解析。[#88043](https://github.com/ClickHouse/ClickHouse/pull/88043) ([Max Justus Spransy](https://github.com/maxjustus)).
* 提升了针对多列表的查询分析性能：在不需要时，不再计算列节点的哈希值 (其中包含整个源表表达式) 。现在，分析针对约 1200 列表的嵌套 `SELECT *` 子查询，速度提升约 50 倍。[#106957](https://github.com/ClickHouse/ClickHouse/pull/106957) ([Dmitry Novik](https://github.com/novikd)).
* 通过从函数解析缓存中移除冗余的查询树哈希，提升了包含大量函数调用或函数调用深度嵌套的查询的查询分析速度。[#107516](https://github.com/ClickHouse/ClickHouse/pull/107516) ([Dmitry Novik](https://github.com/novikd)).
* 修复了在大量访问控制实体 (行策略、角色、配额、profile) 同时发生变更时，replicated access storage 中登录和查询启动长时间卡顿的问题。现在，每个实体缓存对于每个通知批次只会重新计算一次，而不是对每个发生变更的实体都重新计算一次，从而消除了原本可能让访问锁持有数分钟的二次复杂度开销。[#107672](https://github.com/ClickHouse/ClickHouse/pull/107672) ([Azat Khuzhin](https://github.com/azat)).
* 在 probe 侧将 hash join 的 `FixedHashMap` 共享为 JOIN runtime filter。当 build 侧哈希表是 (或可转换为) `FixedHashMap` 时，它会作为运行时过滤器发布，并替换原本由 `BuildRuntimeFilterStep` 安装的 `Set`/`BloomFilter`。该行为由新设置 `join_runtime_filter_from_fixed_hash_table` 控制 (默认值为 `true`) 。[#105640](https://github.com/ClickHouse/ClickHouse/pull/105640) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* 当 `JOIN` 后接选择性的 `LIMIT`、`TopN` 或另一个 `JOIN` 时，对 selector 索引和复制索引采用惰性应用。要控制启用惰性 selector 索引所需的负载列数量，请使用设置 `query_plan_min_columns_for_join_lazy_indexing` (0 表示禁用该优化) 。要控制应用该优化的 `LIMIT`，请使用设置 `query_plan_max_limit_for_join_lazy_indexing`。[#106566](https://github.com/ClickHouse/ClickHouse/pull/106566) ([Hechem Selmi](https://github.com/m-selmi)).
* 现在，并行副本已支持 DP (动态规划) JOIN 重排序。[#105889](https://github.com/ClickHouse/ClickHouse/pull/105889) ([Nikita Taranov](https://github.com/nickitat)).
* 改进了 JOIN 使用运行时过滤器 (默认启用 `enable_join_runtime_filters`) 时的查询计划：join 重排序成本模型现在能够穿透右子树中的 `WindowTransform` (以及其他保持行不变的查询计划步骤) ，使用底层行数和每列 NDV，而不再回退为无统计信息。[#107229](https://github.com/ClickHouse/ClickHouse/pull/107229) ([UnamedRus](https://github.com/UnamedRus)).
* 通过批次方式处理 RIGHT 和 FULL join 中未匹配行的输出，去除了其中的虚函数调用开销。[#105679](https://github.com/ClickHouse/ClickHouse/pull/105679) ([Hechem Selmi](https://github.com/m-selmi)).
* `HashJoin` 现已支持 packed `keys32` 和 `keys64` 方法。[#107202](https://github.com/ClickHouse/ClickHouse/pull/107202) ([Nikita Taranov](https://github.com/nickitat)).
* `Set` 现已支持 packed `keys32` 和 `keys64` 方法。[#107564](https://github.com/ClickHouse/ClickHouse/pull/107564) ([Nikita Taranov](https://github.com/nickitat)).
* 优化了 aggregation 中对 Nullable 列的处理。[#106015](https://github.com/ClickHouse/ClickHouse/pull/106015) ([Nikita Taranov](https://github.com/nickitat)).
* 提升了 `LIMIT BY` 查询的性能。[#103349](https://github.com/ClickHouse/ClickHouse/pull/103349) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 当 `LIMIT BY` 的列是 `ORDER BY` 的前缀时，在 `Sort` 阶段对每个并行已排序流内部执行 `LIMIT BY`，从而加速 `ORDER BY ... LIMIT BY` 查询。这可以减少流经最终排序合并以及后续管道步骤的行数。该优化由新设置 `query_plan_push_limit_by_into_sort` 控制 (默认启用) 。[#104000](https://github.com/ClickHouse/ClickHouse/pull/104000) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 当 `<cols>` 是表排序键的前缀，或在 `WHERE col = const` 固定了前导列后成为其前缀时，可加速 `SELECT ... LIMIT N BY <cols>` 查询。启用后，`MergeTree` 会按主键顺序读取数据，并先以流式模式执行 `LIMIT BY` 过滤，每个已排序流仅使用 O(1) 内存，从而过滤掉大部分数据；最后再对缩减后的数据执行普通 `LIMIT BY`，得到最终结果。该优化由新设置 `optimize_limit_by_in_order` 控制 (默认启用) 。[#105135](https://github.com/ClickHouse/ClickHouse/pull/105135) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 通过在每个分区的流内并行执行 `LIMIT BY`，而不是先将所有流合并为一个再应用限制，可加速分区 `MergeTree` 表上的 `LIMIT BY` 查询。这适用于分区表达式是 `LIMIT BY` 列的确定性函数的情况，因此不会有任何 `LIMIT BY` 分组跨越两个分区。该优化由新设置 `allow_limit_by_partitions_independently` 控制 (默认启用) 。[#105126](https://github.com/ClickHouse/ClickHouse/pull/105126) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 通过移除冗余键表达式来加速 `LIMIT BY` 查询：如果某个键是其他键的确定性函数，则会被去掉 (例如 `LIMIT 5 BY x, f(x)` 会变为 `LIMIT 5 BY x`) ；如果某个键是另一个键的单射函数，则会被替换为其参数 (例如 `LIMIT 5 BY toString(x)` 会变为 `LIMIT 5 BY x`) 。这样可减少每行需要计算的表达式数量，并降低计算成本。该优化由新设置 `optimize_limit_by_function_keys` 和 `optimize_injective_functions_in_limit_by` 控制，二者默认均启用。[#106818](https://github.com/ClickHouse/ClickHouse/pull/106818) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 通过使用利用硬件 CRC32C 的 kernel 替换按 chunk 进行的逐列哈希计算，加速分片聚合、`grace_hash` join 分桶以及并行窗口分区。[#106538](https://github.com/ClickHouse/ClickHouse/pull/106538) ([Harikrishnan Prabakaran](https://github.com/harikrishnan94)).
* 在 x86-64-v4/v3 上，针对数组参数使用多目标自动向量化，优化 `L1Distance`、`L2Distance`、`L2SquaredDistance`、`LinfDistance` 和 `cosineDistance`。对于非常量数组参数，除使用带运行时 exponent 的 `std::pow` 的 `LpDistance` 外，其余函数现在都可以使用由 compiler 向量化的 kernel。现有针对 `L2Distance` 和 `cosineDistance` 的 AVX-512 与 Sapphire Rapids `BFloat16` 常量参数快速路径予以保留。[#101310](https://github.com/ClickHouse/ClickHouse/pull/101310) ([Peng](https://github.com/fastio)).
* 提升了 `{Norm}Distance` 和 `dotProduct` 函数的性能。[#106007](https://github.com/ClickHouse/ClickHouse/pull/106007) ([Nikita Taranov](https://github.com/nickitat)).
* 提升了 `arrayNorm` 函数的性能。[#106211](https://github.com/ClickHouse/ClickHouse/pull/106211) ([Nikita Taranov](https://github.com/nickitat)).
* 在某些情况下，`dotProduct` 的性能有所提升。[#106210](https://github.com/ClickHouse/ClickHouse/pull/106210) ([Nikita Taranov](https://github.com/nickitat)).
* 当数组长度恰好能被向量化处理宽度整除时，优化了 `L2Distance` 和 `cosineDistance` 在 `Array(Float32)`、`Array(Float64)` 和 `Array(BFloat16)` 上的 AVX-512 左侧常量路径性能。[#104625](https://github.com/ClickHouse/ClickHouse/pull/104625) ([Sergey Kuznetsov](https://github.com/skuznetsov)) 。
* 为 AMD 启用了 AVX-512 代码生成，并进一步改进了 `arrayDistance` 的代码生成。[#106505](https://github.com/ClickHouse/ClickHouse/pull/106505) ([Nikita Taranov](https://github.com/nickitat)) 。
* 提升了 `QBit` 数据类型下 `L2DistanceTransposed` 和 `cosineDistanceTransposed` 函数的性能。[#106701](https://github.com/ClickHouse/ClickHouse/pull/106701) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 将 `encrypt`、`decrypt`、`tryDecrypt`、`aes_encrypt_mysql` 和 `aes_decrypt_mysql` 函数的性能最高提升了一个数量级，恢复了从 BoringSSL 迁移到 OpenSSL 3.x (24.4) 期间损失的性能。[#107339](https://github.com/ClickHouse/ClickHouse/pull/107339) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 通过避免 OpenSSL 3.x 中隐式的逐行 OpenSSL 提供商查找，提升了 `encrypt`、`decrypt` 和 `halfMD5` 函数的性能。[#99105](https://github.com/ClickHouse/ClickHouse/pull/99105) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 为 `SHA1` 新增了 SIMD 实现，利用 AVX-512 并行计算多个输入的哈希，从而提升吞吐量。[#105459](https://github.com/ClickHouse/ClickHouse/pull/105459) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 为多缓冲 `MD5` 实现新增了 AArch64 ASIMD/NEON 后端。[#105563](https://github.com/ClickHouse/ClickHouse/pull/105563) ([Venkata  Vineel ](https://github.com/vyalamar)) 。
* 在 `MATERIALIZE PROJECTION` 期间，计算 projection 之前先合并源块，以减少临时 projection parts 的数量和 merge 开销。在一个 5000 万行的表上，速度提升约 3.4 倍。[#100047](https://github.com/ClickHouse/ClickHouse/pull/100047) ([Amos Bird](https://github.com/amosbird)) 。
* 对在 `ORDER BY` 列上使用跳过索引的 `MergeTree` 表，通过避免在写入 part 时进行冗余的列置换，降低了 `INSERT` 延迟 (在链路追踪类工作负载上约降低 17%) 。[#101101](https://github.com/ClickHouse/ClickHouse/pull/101101) ([Amos Bird](https://github.com/amosbird)) 。
* 启用了 Arrow 的 SIMD 代码路径 (ARM 上为 NEON，x86 上为 SSE4.2/AVX2/AVX512) ，并利用这些代码路径加速了解码采用 `BYTE_STREAM_SPLIT` 编码的 Parquet `FLOAT`/`DOUBLE` 列。[#106376](https://github.com/ClickHouse/ClickHouse/pull/106376) ([Raúl Marín](https://github.com/Algunenano)) 。
* 提升了带有 `bloom_filter` 索引的 `LowCardinality` 列的插入性能。[#106410](https://github.com/ClickHouse/ClickHouse/pull/106410) ([Michael Jarrett](https://github.com/EmeraldShift)) 。
* 在 `DiskObjectStorageTransaction::copyFile` 中，使用每个 disk 的线程池并行复制 blob。[#105089](https://github.com/ClickHouse/ClickHouse/pull/105089) ([Asya Shneerson](https://github.com/asya-ch)) 。
* 在对 `file`、`s3` 等类文件 table function 使用 `One` 输入格式时，避免读取文件内容。[#105157](https://github.com/ClickHouse/ClickHouse/pull/105157) ([Yue Ni](https://github.com/niyue)) 。
* 通过不导出动态符号，将 macOS 上 `clickhouse` 的启动速度提升了约 3 倍；否则动态链接器会在每次启动时处理这些符号。[#107768](https://github.com/ClickHouse/ClickHouse/pull/107768) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过避免为每个缓存键重复打开目录，加快了启动时文件系统缓存的加载速度。[#107414](https://github.com/ClickHouse/ClickHouse/pull/107414) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过让负责列出目录的线程在完成列出后协助加载缓存元数据，而不是让半数线程闲置，加快了启动时文件系统缓存的加载速度。[#107416](https://github.com/ClickHouse/ClickHouse/pull/107416) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过更新随附的 WasmEdge 库，降低了 `clickhouse` 进程的启动开销；该库不再在每次启动时于全局初始化器中生成随机哈希密钥。[#107869](https://github.com/ClickHouse/ClickHouse/pull/107869) ([Raúl Marín](https://github.com/Algunenano)).
* `MergeTree` 主键和跳过索引现在可以对由 `ifNull` 或 `coalesce` 包裹条件的过滤器裁剪粒度，例如 `ifNull(key = 0, 0)` 或 `coalesce(key = 0, 0)`。这类谓词通常由查询生成器生成，用于将可能为 `NULL` 的比较转换为明确的布尔值；此前索引分析无法识别它们，因此也无法跳过粒度。这扩展了现有的 `allow_key_condition_coalesce_rewrite` 设置 (默认启用) 。关闭 [#106264](https://github.com/ClickHouse/ClickHouse/issues/106264)。[#106272](https://github.com/ClickHouse/ClickHouse/pull/106272) ([Andy Zhao](https://github.com/andyzzhao)).
* 在 26.6 中，对 `DateTime64` 类型进行跳过索引求值时的 CPU 消耗应更低。[#107707](https://github.com/ClickHouse/ClickHouse/pull/107707) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 通过优化对罕见标记的处理，提升了多标记搜索中文本索引分析的性能。[#98226](https://github.com/ClickHouse/ClickHouse/pull/98226) ([Anton Popov](https://github.com/CurtizJ)).
* 为文本索引的 posting list 压缩分段加入了缓存。[#106299](https://github.com/ClickHouse/ClickHouse/pull/106299) ([Anton Popov](https://github.com/CurtizJ)).
* 提升了针对选择表中大段连续范围的查询执行通用排除搜索时的性能。[#93813](https://github.com/ClickHouse/ClickHouse/pull/93813) ([Michael Jarrett](https://github.com/EmeraldShift)).
* 具有相同端点和 bucket 的 `S3` 客户端现在会共享缓存，从而避免重复进行区域发现。关闭 [#92482](https://github.com/ClickHouse/ClickHouse/issues/92482)。[#96802](https://github.com/ClickHouse/ClickHouse/pull/96802) ([Andrey Zvonov](https://github.com/zvonand)).
* 如果查询包含 `has(<constant array>, <expr>)`，`analyzer` 会在可行时将该节点转换为使用更快的 `in` 实现。[#97341](https://github.com/ClickHouse/ClickHouse/pull/97341) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 当在 `ThreadPool` 中调度新的 job 时，会唤醒最近一个进入空闲状态的工作线程 (LIFO) ，而不是任意唤醒一个线程。这可减少每线程 allocator 缓存造成的内存碎片。job 的处理顺序不会改变。[#100177](https://github.com/ClickHouse/ClickHouse/pull/100177) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 提升了近似运行时过滤器和布隆过滤器索引的性能。[#100201](https://github.com/ClickHouse/ClickHouse/pull/100201) ([Christoph Viebig](https://github.com/cv4g)).
* 允许 `ASOF JOIN` 使用 `parallel_hash` join algorithm，从而可在不同等值键之间并行构建。此前 `ASOF` 会无条件禁用 `parallel_hash`。[#105375](https://github.com/ClickHouse/ClickHouse/pull/105375) ([Greg Maher](https://github.com/gregakinman)).
* 当空输入已足以确定结果为空时，避免为 `INTERSECT` 和 `EXCEPT` 查询读取无界输入。[#105393](https://github.com/ClickHouse/ClickHouse/pull/105393) ([Yue Ni](https://github.com/niyue)).
* 为多个 `MemoryTracker` 阻塞器添加了 `constinit`。 [#105490](https://github.com/ClickHouse/ClickHouse/pull/105490) ([Azat Khuzhin](https://github.com/azat)).
* 通过在范围检查期间避免重复调用 `rb_max`，提升了非 `UInt64` `groupBitmap` 状态下 `bitmapContains` 的性能。 [#105960](https://github.com/ClickHouse/ClickHouse/pull/105960) ([Yue Ni](https://github.com/niyue)).
* 对于由单个字典支持的 `LowCardinality` 列，不连续查询的速度更快。 [#103662](https://github.com/ClickHouse/ClickHouse/pull/103662) ([Ivan Babrou](https://github.com/bobrik)).
* 当块中仅有一行时，为 `HashJoin` 的 probe 增加了快速路径。 [#106008](https://github.com/ClickHouse/ClickHouse/pull/106008) ([Nikita Taranov](https://github.com/nickitat)).
* 来自如下查询的 predicates：`SELECT ... FROM view(SELECT ... FROM remote(...)) WHERE ... `，现可下推到发送至远程分片的查询中。此前，优化项 `allow_push_predicate_ast_for_distributed_subqueries` 缺少对 table functions 的处理。 [#105986](https://github.com/ClickHouse/ClickHouse/pull/105986) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 默认启用 `enable_join_transitive_predicates`。 [#103724](https://github.com/ClickHouse/ClickHouse/pull/103724) ([Alexander Gololobov](https://github.com/davenger)).
* text indexes 新增对函数 `multiSearchAny`、`multiSearchAnyUTF8` 和 `multiMatchAny` 的支持。同时改进了函数 `match` 的 text index analysis：现在，包含可选分组的 patterns 可以跳过更多 granules。 [#106279](https://github.com/ClickHouse/ClickHouse/pull/106279) ([Anton Popov](https://github.com/CurtizJ)).
* 允许在初始 PREWHERE 选择之后引入的 filters (predicate pushdown、运行时过滤器，或显式 PREWHERE 加上规划器设置的 WHERE) 在优化器第二次遍历时合并到现有 PREWHERE 中，而不是继续作为位于 `MergeTree` 读取之上的独立 Filter 步骤。 [#105445](https://github.com/ClickHouse/ClickHouse/pull/105445) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* `QueryConditionCache` 现在会单独记录被过滤掉的粒度，即使在部分通过 PREWHERE 的读取批次中也是如此，从而减少后续具有相同 condition 的查询需要重新读取的 marks 数量。 [#105335](https://github.com/ClickHouse/ClickHouse/pull/105335) ([Han Fei](https://github.com/hanfei1991)).
* 新增 Keeper 设置 `nuraft_use_bg_thread_for_snapshot_io`，默认启用，使 `NuRaft` 改为从后台线程而非 Raft worker threads 读取 snapshot 对象。 [#106285](https://github.com/ClickHouse/ClickHouse/pull/106285) ([Antonio Andelic](https://github.com/antonio2368)).
* 在 ClickHouse Keeper 中使用 `KeeperMemoryStorage` 应用接收到的 snapshots 时，可降低峰值内存占用。 [#105851](https://github.com/ClickHouse/ClickHouse/pull/105851) ([Antonio Andelic](https://github.com/antonio2368)).
* 将 LLVM/JIT allocations 路由到专用的 jemalloc arena。这样可减少长期存在的 JIT bookkeeping 与短生命周期的查询 allocations 交错造成的 RSS 碎片。为可观测性新增异步指标 `jemalloc.jit_arena.active_bytes`、`jemalloc.jit_arena.dirty_bytes`、`CompiledExpressionCacheBytesMax` 和 `CompiledExpressionCacheCountMax`。`SYSTEM DROP COMPILED EXPRESSION CACHE` 现在还会删除底层 CHJIT 实例并清空 JIT arena。 [#104113](https://github.com/ClickHouse/ClickHouse/pull/104113) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了使用原生 V3 读取器从 `Parquet` 读取稀疏字典编码的 `Nullable(String)` 列时内存预留过多的问题。 [#102805](https://github.com/ClickHouse/ClickHouse/pull/102805) ([Francisco](https://github.com/Milias)).
* 修复了加密磁盘上的 `CREATE TABLE ... CLONE AS (and REPLACE / ATTACH PARTITION ... FROM)` 会复制数据而非创建硬链接的问题。[#106731](https://github.com/ClickHouse/ClickHouse/pull/106731) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 改进了查询计划优化器中的基数估算：由确定性单参数函数 (例如 `toYear(date)`) 生成的列，现在会将其参数的不同值数量作为上界继承，而不再处于缺少统计信息的状态，从而使 join 重排序更准确。[#107757](https://github.com/ClickHouse/ClickHouse/pull/107757) ([Alexander Gololobov](https://github.com/davenger)).
* 在高日志速率下，降低了异步日志的 CPU 开销：现在仅在队列从空变为非空时通知日志消费者，而不是每条消息都通知。[#107352](https://github.com/ClickHouse/ClickHouse/pull/107352) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 在更多场景下消除了查询执行期间的重复计算。[#106113](https://github.com/ClickHouse/ClickHouse/pull/106113) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 将递归 CTE 结果的处理并行化：对大型 `WITH RECURSIVE` 结果执行 `GROUP BY` 或其他操作时，不再受限于单线程。[#107694](https://github.com/ClickHouse/ClickHouse/pull/107694) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过在 ARM 上新增 NEON SIMD 路径，并在 x86 上采用更宽的 AVX2 内核，提升了不区分大小写的子串搜索 (`positionCaseInsensitiveUTF8`、`ILIKE`、`multiSearchAnyCaseInsensitiveUTF8` 及相关函数) 的性能。[#107882](https://github.com/ClickHouse/ClickHouse/pull/107882) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 ARM 上 `FPC` 浮点 codec 约 16% 的吞吐量回退问题；该问题是在其预测器表开始使用 `VectorWithMemoryTracking` 后引入的。[#108182](https://github.com/ClickHouse/ClickHouse/pull/108182) ([Groene AI](https://github.com/groeneai)).

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

* 后台 `MemoryWorker` 现在会根据当前内存使用量以及内核报告的可用内存量，定期更新 server 的硬内存限制，从而让 ClickHouse 为同一主机上的其他进程预留空间。公式为 `(resident memory + system MemAvailable) * max_server_memory_usage_to_ram_ratio`。同一个 `max_server_memory_usage_to_ram_ratio` server setting 同时控制启动时上限和动态调整；将其设为 `0` 即可同时禁用两者。若只保留静态的启动/重载上限 (即旧版本的行为) ，请将新的 server setting `memory_worker_dynamic_hard_limit` 设为 `0`。[#104964](https://github.com/ClickHouse/ClickHouse/pull/104964) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 `PostgreSQL` protocol 中支持 C# PostgreSQL client。这解决了 [#18611](https://github.com/ClickHouse/ClickHouse/issues/18611)。[#80785](https://github.com/ClickHouse/ClickHouse/pull/80785) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 变更现在使用 analyzer。[#98884](https://github.com/ClickHouse/ClickHouse/pull/98884) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 在命令行客户端中新增了对查询回显的细粒度控制。`--echo` 选项现在接受可选的布尔值，并且在交互模式和批次模式下都可使用。新选项 `--echo-formatted` 和 `--echo-query-id` 分别控制是否格式化回显的查询，以及是否打印 `query_id`。`--hilite`/`--highlight` 选项现在也会控制回显查询的高亮显示。一个连带影响是，`--echo` 现在是一个布尔值选项，因此如果在未带值的 `--echo` 后直接跟一个位置参数查询，它会被视为该选项的值；请改用 `--echo --query "..."` 或 `--echo=false`。[#106191](https://github.com/ClickHouse/ClickHouse/pull/106191) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持数据湖目录的 schema evolution，并同时支持并发一致性检查。[#106102](https://github.com/ClickHouse/ClickHouse/pull/106102) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 允许数据湖 table engines 使用 cache disk。[#102017](https://github.com/ClickHouse/ClickHouse/pull/102017) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 修复了 `catalog_type = 'onelake'` 的 `DataLakeCatalog` databases 读取表数据的问题：现默认使用 OneLake Blob endpoint (`.blob.fabric.microsoft.com`) 。将 `onelake_use_blob_endpoint = false` 可保留此前使用 DFS endpoint (`.dfs.fabric.microsoft.com`) 的行为。[#106843](https://github.com/ClickHouse/ClickHouse/pull/106843) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 将 `S3(Azure)Queue` setting `persistent_processing_node_ttl_seconds` 的默认值从 `1 hour` 调整为 `6 hours` (表示因服务异常重启等情况导致的清理时间) 。此前的默认值对于 processing nodes ttl 是合适的，但它也用于 bucket lock ttl，而后者可能需要持有更长时间，因此 1 小时并不足够。[#106838](https://github.com/ClickHouse/ClickHouse/pull/106838) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 将 `Iceberg` metadata cache 的默认大小从 1 GB 降至 128 MB。[#106492](https://github.com/ClickHouse/ClickHouse/pull/106492) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 将 `S3Queue` 流式任务的 `query_id` 传递给依赖表的 inserts。[#106494](https://github.com/ClickHouse/ClickHouse/pull/106494) ([Christoph Wurm](https://github.com/cwurm)).
* 通过 `DataLakeCatalog` 查询表时，在 `system.query_log` 中用 storage engine 名称填充 `used_storages`。[#100706](https://github.com/ClickHouse/ClickHouse/pull/100706) ([Melvyn Peignon](https://github.com/melvynator)).
* 你可以检查 Iceberg 的 snapshots 包含哪些 'operation' 和 'summary'。这对测试和调试很有帮助。[#106246](https://github.com/ClickHouse/ClickHouse/pull/106246) ([Den Kalantaevskii](https://github.com/Diskein)) 。
* 通过任务跟踪器异步完成最终的 `S3` 分段上传请求，使其可以与最后一个分片的上传并行进行，而不是在 finalize 中串行执行。[#105487](https://github.com/ClickHouse/ClickHouse/pull/105487) ([Asya Shneerson](https://github.com/asya-ch)) 。
* 新增了四个 `MergeTree` 表设置，用于控制文本索引的默认参数：`text_index_dictionary_block_size`、`text_index_dictionary_block_frontcoding_compression`、`text_index_posting_list_block_size` 和 `text_index_posting_list_codec`。这些设置允许你在表级别调优文本索引的行为，而不必在每个索引定义中单独指定参数。索引级显式指定的参数仍然优先。[#100626](https://github.com/ClickHouse/ClickHouse/pull/100626) ([Anton Popov](https://github.com/CurtizJ)) 。
* 允许投影覆盖除 `index_granularity` 之外的更多 `MergeTree` 设置 (压缩、分片格式、序列化) ，并提供允许设置项的白名单和校验机制。[#101170](https://github.com/ClickHouse/ClickHouse/pull/101170) ([Amos Bird](https://github.com/amosbird)) 。
* 向 `system.merges` 添加 `current_projection`、`current_projection_progress`、`projections_completed` 和 `projections_remaining` 列，用于展示投影合并进度。[#102611](https://github.com/ClickHouse/ClickHouse/pull/102611) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了主键列上带 `IN` 子查询的 `PREWHERE` 未使用主键索引进行粒度剪枝的问题；该问题会导致执行全表扫描，而不是只读取相关粒度。[#102570](https://github.com/ClickHouse/ClickHouse/pull/102570) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 函数 `h3PolygonToCells` 现在会对 `MultiPolygon` 中所有 Polygon 统一执行最大数组大小限制，校验底层 H3 库的返回码，并拒绝 `MultiLineString` 参数，而不是静默返回空结果。[#106399](https://github.com/ClickHouse/ClickHouse/pull/106399) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增一个仅 Keeper 可用的 `system.keeper_snapshots` 表，包含本地 ClickHouse Keeper 快照的信息。[#105571](https://github.com/ClickHouse/ClickHouse/pull/105571) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增一个仅 Keeper 可用的 `system.keeper_changelogs` 表，包含本地 ClickHouse Keeper 更新日志 (Raft 日志) 文件的信息。[#105617](https://github.com/ClickHouse/ClickHouse/pull/105617) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增一个仅 Keeper 可用的 `system.keeper_cluster` 表。当前 Keeper 视角下的每个 Raft 集群成员各对应一行。[#105646](https://github.com/ClickHouse/ClickHouse/pull/105646) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 为 watches 添加更多 Keeper profile 事件 (服务器端 + 客户端) 。关闭 [#97703](https://github.com/ClickHouse/ClickHouse/issues/97703)。[#105336](https://github.com/ClickHouse/ClickHouse/pull/105336) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 为 `NuRaft` 未提交日志条目的准入限制和 append-entries 反向探测限流新增 Keeper `coordination_settings`。[#106108](https://github.com/ClickHouse/ClickHouse/pull/106108) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 为 `mysql` 表函数、`MySQL` 表引擎、`MySQL` database engine、字典 `SOURCE(MYSQL)` 以及命名集合新增 `enable_compression` 设置。启用后，ClickHouse 会为通过该连接传输的所有数据协商使用 MySQL 协议级压缩。[#103229](https://github.com/ClickHouse/ClickHouse/pull/103229) ([Bernard Lim](https://github.com/bernardlim)) 。
* 降低了通过 PostgreSQL wire 协议运行的查询取消延迟：`KILL QUERY` 现在可在单个数据块内中断输出序列化，而不必等整个数据块发送到客户端后才中断。[#106535](https://github.com/ClickHouse/ClickHouse/pull/106535) ([Roman Vasin](https://github.com/rvasin)) 。
* 降低了通过 MySQL wire 协议运行的查询取消延迟：`KILL QUERY` 现在可在单个数据块内中断输出序列化，而不必等整个数据块发送到客户端后才中断。[#107228](https://github.com/ClickHouse/ClickHouse/pull/107228) ([Roman Vasin](https://github.com/rvasin)) 。
* 修复了 MySQL 握手过程中 `auth_response` 长度的读取问题：当长度字节 `>= 128` 时，由于被读取为有符号 `char`，会被误解释为数 GB 的值。[#107384](https://github.com/ClickHouse/ClickHouse/pull/107384) ([uwezkhan](https://github.com/uwezkhan)) 。
* `MaterializedPostgreSQL` 现在会将精度大于 76 的 PostgreSQL `numeric(p, 0)` 列 (例如用于 256 位整数的 `numeric(78, 0)`) 映射为 ClickHouse `Int256`，而不再因 "Precision too big" 失败。无法装入 `Int256` 的值会以明确的错误被拒绝。[#107431](https://github.com/ClickHouse/ClickHouse/pull/107431) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当 TCP 连接建立失败时，会向客户端发送异常。[#107317](https://github.com/ClickHouse/ClickHouse/pull/107317) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 用户现在可以插入用于 8 位/16 位/32 位/64 位整数变体的 `Avro` `Fixed` 字段。[#98139](https://github.com/ClickHouse/ClickHouse/pull/98139) ([Patrick Pichler](https://github.com/patrickpichler)) 。
* `AvroConfluent` 格式现在会在遇到瞬时故障 (传输超时、连接被拒绝、DNS 错误、HTTP `5xx`/`408`/`429`) 时，对 Confluent Schema Registry HTTP 客户端按指数退避策略进行重试，而不是在第一次网络抖动时就中止 INSERT。新设置 `format_avro_schema_registry_max_retries` (默认 `5`) 和 `format_avro_schema_registry_retry_initial_backoff_ms` (默认 `100`) 用于控制该策略。Schema 校验错误 (HTTP `409`、格式错误的 Avro JSON) 仍会被视为致命错误。[#106661](https://github.com/ClickHouse/ClickHouse/pull/106661) ([Groene AI](https://github.com/groeneai)) 。
* 在 `system.query_log.used_privileges` 中记录所有已授予访问检查的特权，包括通过非抛出式 `isGranted` 路径 (`checkAccessWithFilter`) 执行的检查。此前，只有通过抛出式入口点 (`checkAccess` / `checkGrantOption`) 检查的特权会被记录，这使得对于使用 `file` / `s3` / `azure` / `url` 表函数的 `DESCRIBE`、`CREATE TABLE AS` 及类似查询，`READ ON FILE` / `READ ON S3` / `READ ON AZURE` / `READ ON URL` 在审计日志中不可见。访问控制行为保持不变。[#104693](https://github.com/ClickHouse/ClickHouse/pull/104693) ([Alexey Bakharew](https://github.com/alexbakharew)) 。
* 新增异步指标 `TotalUncompressedBytesOfMergeTreeTables` 和 `TotalUncompressedBytesOfMergeTreeTablesSystem`，用于报告存储在 MergeTree 家族表中的数据总未压缩大小。[#106364](https://github.com/ClickHouse/ClickHouse/pull/106364) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `GlobalMemoryLimitExceeded` profile event，便于运维人员监控何时触及服务器范围的内存限制。[#106466](https://github.com/ClickHouse/ClickHouse/pull/106466) ([Sacheendra Talluri](https://github.com/sacheendra)) 。
* 为 `executable_pool` UDF 填充 `ExecutableUserDefinedFunction*` `ProfileEvents` 计数器。现在可在 `system.query_log.ProfileEvents` 中查看每次调用的调用次数、总耗时与池等待时间、子进程 CPU 和峰值内存占用，以及 stdin/stdout 字节数。[#105010](https://github.com/ClickHouse/ClickHouse/pull/105010) ([Xu Jia](https://github.com/XuJia0210)) [#105618](https://github.com/ClickHouse/ClickHouse/pull/105618) ([Ilya Andreev](https://github.com/andreev-io)).
* 新增异步指标 `ExecutableUserDefinedFunctionMemoryResidentBytes` 和 `ExecutableUserDefinedFunctionProcesses`，用于报告 `executable` 和 `executable_pool` 用户自定义函数的常驻内存 (`VmRSS`) 及存活进程数，其中包括 descendant processes 和空闲池工作线程。[#107300](https://github.com/ClickHouse/ClickHouse/pull/107300) ([Hanzi Jiang](https://github.com/HanziJiang)).
* 新增三个仅限 Linux 的 async 指标——`MemoryThreadStacksCount`、`MemoryThreadStacksVirtual` 和 `MemoryThreadStacksResident`——将 pthread 栈内存与其余匿名内存分开报告。通过 `asynchronous_metrics_enable_heavy_metrics` 启用。需要 Linux 5.17+ (`prctl(PR_SET_VMA_ANON_NAME)`) 以及可读的 `/proc/self/smaps`；否则这些指标不会出现，且该限制会记录在 `system.warnings` 中。[#106230](https://github.com/ClickHouse/ClickHouse/pull/106230) ([Raúl Marín](https://github.com/Algunenano)).
* 在 macOS 上公开 `MemoryThreadStacks*` 异步指标 (线程栈的常驻/虚拟大小及数量) 。[#107752](https://github.com/ClickHouse/ClickHouse/pull/107752) ([Raúl Marín](https://github.com/Algunenano)).
* 表引擎现已附带嵌入式文档，可通过 `system.table_engines` 表新增的 `description`、`syntax`、`examples`、`introduced_in` 和 `related` 列进行内省。[#106177](https://github.com/ClickHouse/ClickHouse/pull/106177) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 数据库引擎现已附带嵌入式文档，可通过 `system.database_engines` 表新增的 `description`、`syntax`、`examples`、`introduced_in` 和 `related` 列进行内省。[#106178](https://github.com/ClickHouse/ClickHouse/pull/106178) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 数据类型现已附带嵌入式文档，可通过 `system.data_type_families` 表新增的 `description`、`syntax`、`examples`、`introduced_in` 和 `related` 列进行内省。[#106180](https://github.com/ClickHouse/ClickHouse/pull/106180) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 输入/输出格式现已附带嵌入式文档，可通过 `system.formats` 表新增的 `description`、`examples`、`introduced_in` 和 `related` 列进行内省。[#106181](https://github.com/ClickHouse/ClickHouse/pull/106181) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 聚合函数组合器现已附带嵌入式文档，可通过 `system.aggregate_function_combinators` 表新增的 `description`、`syntax`、`examples`、`introduced_in` 和 `related` 列进行内省。[#106185](https://github.com/ClickHouse/ClickHouse/pull/106185) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse-client`、`clickhouse-local` 和嵌入式客户端新增了 `--chime` 命令行选项。当查询运行至少 N 秒后结束时 (无论成功还是报错) ，客户端都会向 stderr 写入 ASCII `BEL` 控制字符 (`\x07`) 。终端会根据用户偏好决定是发出声音还是闪烁提示。默认启用，阈值为 5 秒；可通过 `--chime N` 自定义阈值，或使用 `--chime 0` 禁用。关闭 [#92718](https://github.com/ClickHouse/ClickHouse/issues/92718)。[#104545](https://github.com/ClickHouse/ClickHouse/pull/104545) ([Groene AI](https://github.com/groeneai)).
* 在 `clickhouse-client` 中，当终端不支持 bracketed paste 时，粘贴的多行查询中的换行现在会折叠到同一个编辑缓冲区中，而不会为每一行都切换到续行提示符。粘贴的查询会保留在单个提示符下，方向键也可以在各行之间移动。这是一项尽力而为的改进，依赖于典型的 TTY 缓冲粘贴行为。[#104299](https://github.com/ClickHouse/ClickHouse/pull/104299) ([Alexey Milovidov](https://github.com/alexey-milovidov))。现在在禁用语法高亮 (`--highlight 0`) 时也可正常工作。[#106665](https://github.com/ClickHouse/ClickHouse/pull/106665) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 为 `clickhouse-client`/`clickhouse-local` 添加了类似 MySQL 的运行时 pager 控制。[#105706](https://github.com/ClickHouse/ClickHouse/pull/105706) ([Azat Khuzhin](https://github.com/azat))。
* `clickhouse-client` 现在可正确处理非 UTF-8 终端：当终端字符编码不是 UTF-8 时 (例如使用 `LANG=C`) ，`Pretty` 格式会回退为 ASCII 网格边框，而不是输出会破坏终端显示的 Unicode 盒线字符。[#106213](https://github.com/ClickHouse/ClickHouse/pull/106213) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 在 `clickhouse-client` 的 `Hello` packet 处理逻辑中，会对 server 提供的显示字符串 (server 名称、time zone、显示名称、password-rule patterns 和消息) 进行清理，这样恶意 server 就无法注入会被 client 原样渲染的字节；同时还限制了这些字符串的大小，以防止无界内存分配。[#105243](https://github.com/ClickHouse/ClickHouse/pull/105243) ([Raúl Marín](https://github.com/Algunenano))。
* 现在，当查询使用图像 output format (例如 `FORMAT PNG`) 时，Web UI 会将结果显示为图像，而不是将 raw bytes 显示为表。[#107638](https://github.com/ClickHouse/ClickHouse/pull/107638) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 新增设置 `output_format_pretty_use_nbsp_for_padding`：当 `output_format_pretty_grid_charset` 为 `UTF-8` 时，在表格样式的 `Pretty` 格式中使用 `U+00A0` NO-BREAK SPACE 渲染表格布局中的 padding。这有助于在会折叠普通空格的工具中复制 `Pretty` 输出时保持表格对齐。该设置默认禁用，而 `ASCII` 字符集输出仍使用普通空格。[#103559](https://github.com/ClickHouse/ClickHouse/pull/103559) ([Ashrith Bandla](https://github.com/ashrithb))。
* 通用安装脚本现在还会在 Linux 和 macOS 上将 `clickhousectl` 安装到 `~/.local/bin`，并创建一个 `chctl` 符号链接。设置 `CLICKHOUSE_ONLY=1` 可跳过此步骤。[#105399](https://github.com/ClickHouse/ClickHouse/pull/105399) ([Alasdair Brown](https://github.com/sdairs))。
* 修复了一个偶发的伪 `Syntax error: Unterminated quoted string` 错误：当通过 `curl https://clickhouse.com/ | sh` 安装 ClickHouse 且当前目录中已存在 `clickhouse` binary 时，可能会间歇性触发该错误。[#106417](https://github.com/ClickHouse/ClickHouse/pull/106417) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 修复了 `play.html` 页面在 Web 终端打开时左侧面板的高度问题，使底部的终端切换按钮始终可见。[#105087](https://github.com/ClickHouse/ClickHouse/pull/105087) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 修复了在 Web UI 中运行后自动选中唯一查询的问题。[#105711](https://github.com/ClickHouse/ClickHouse/pull/105711) ([Joey Yu](https://github.com/itsjoeoui))。
* 现在，当查询高度最多只比当前编辑器高度高 30% 时，Web SQL UI 会自动展开查询编辑器。[#105713](https://github.com/ClickHouse/ClickHouse/pull/105713) ([Joey Yu](https://github.com/itsjoeoui))。
* 在 Web UI 中，当左侧面板展开时，将底部菜单图标 (Web 终端和 GitHub) 横向排列，为数据库和表列表腾出更多垂直空间。[#106427](https://github.com/ClickHouse/ClickHouse/pull/106427) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 Web UI (`play.html`) 中，按下 `Escape` 现在会取消当前选中的结果表单元格。[#107777](https://github.com/ClickHouse/ClickHouse/pull/107777) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进 Web SQL UI (Play) 中的数据库面板：为数据库图标添加工具提示、增加隐藏面板按钮、让数据库/表名称整行均可点击，并修复滚动条出现时面板宽度发生偏移的问题。[#108013](https://github.com/ClickHouse/ClickHouse/pull/108013) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 添加一个服务器设置 (`min_allocation_size_to_throw_on_memory_limit`) ，允许任意内存分配抛出 `MEMORY_LIMIT_EXCEEDED`，这有助于防止 OOM。[#105265](https://github.com/ClickHouse/ClickHouse/pull/105265) ([Azat Khuzhin](https://github.com/azat)).
* 允许 SSH 使用 `NONE` 身份验证 (可避免向 `no_password` 用户询问密码) 。[#105476](https://github.com/ClickHouse/ClickHouse/pull/105476) ([Azat Khuzhin](https://github.com/azat)).
* 在降权前，于 `clickhouse su` 中重置补充组列表，使其行为与 `/bin/su` 和 `sudo` 一致。此前，降权后的进程会继承调用者的补充组。[#105247](https://github.com/ClickHouse/ClickHouse/pull/105247) ([Raúl Marín](https://github.com/Algunenano)).
* 为数值谓词函数 (`isFinite`、`isNaN`) 添加 `BFloat16` 支持。[#105391](https://github.com/ClickHouse/ClickHouse/pull/105391) ([Mohamed Hussain S](https://github.com/mohhddhassan)).
* 降低多边形字典 (`polygon_index_cell`、`polygon_index_each`) 的内存使用量，并让 `system.dictionaries.bytes_allocated` 能正确反映其构建的查找索引。[#105431](https://github.com/ClickHouse/ClickHouse/pull/105431) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 Kafka 表引擎消费者在分区分配后仍持续使用较短 poll interval 的问题，使其恢复为配置的 `kafka_poll_timeout_ms`，从而避免在 rebalance 后出现过多空轮询、更小的已插入分片以及额外的 merge 开销。[#100431](https://github.com/ClickHouse/ClickHouse/pull/100431) ([sugaf1204](https://github.com/sugaf1204)).
* 在查询计划中移除未使用列时，按位置而非按名称识别列。这样即使存在重复列名，也能移除未使用列。[#100586](https://github.com/ClickHouse/ClickHouse/pull/100586) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 对于尝试在复制引擎上使用 `table_readonly` 的情况，ClickHouse 现在会抛出正确的异常，并改进与该设置相关的 DDL 查询 (以及 `DatabaseReplicated`) 的异常处理。[#100950](https://github.com/ClickHouse/ClickHouse/pull/100950) ([alesapin](https://github.com/alesapin)). 当目标表设置了 `table_readonly = 1` 时，`OPTIMIZE TABLE ... ON CLUSTER` 和其他 DDL 不会再挂起。该设置现在会抛出一个新的专用错误码 `TABLE_IS_PERMANENTLY_READ_ONLY`，`DDLWorker` 会将其视为不可重试 (不同于临时 `ReplicatedMergeTree` ZooKeeper 断开连接期间出现的瞬态 `TABLE_IS_READ_ONLY`) 。现在也会明确拒绝对 `ReplicatedMergeTree` 使用 `table_readonly`，无论是在创建时还是通过 `ALTER MODIFY SETTING` 进行设置。后续跟进见 [#97652](https://github.com/ClickHouse/ClickHouse/issues/97652)。[#105109](https://github.com/ClickHouse/ClickHouse/pull/105109) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了可刷新materialized view 的刷新问题：目标表被替换后 (例如通过 `EXCHANGE TABLES` 或删除后重建) ，刷新可能会因 `UNKNOWN_TABLE` 失败；现在刷新会按名称解析目标表，不再依赖过期的 UUID。[#102724](https://github.com/ClickHouse/ClickHouse/pull/102724) ([Seva Potapov](https://github.com/seva-potapov)).
* 新增设置 `wait_for_part_commit_in_dependent_materialized_views` (默认值为 `false`) 。当 materialized view 的 `SELECT` 会回读其自身源表时 (例如通过对源表执行 `INNER JOIN`) ，级联过程中可能会漏掉当前正在插入的行，因为插入的分片只有在依赖视图运行后才会提交。启用此设置后，会在触发依赖视图前先提交该分片，使其能够看到这条正在插入的行，但代价是插入并行度会降低。[#105943](https://github.com/ClickHouse/ClickHouse/pull/105943) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 不再在 `tryDeserialize` 中吞掉致命错误 (例如 `MEMORY_LIMIT_EXCEEDED`) 。[#106808](https://github.com/ClickHouse/ClickHouse/pull/106808) ([Azat Khuzhin](https://github.com/azat)).
* 在 `InverseDictionaryLookupPass` 中延迟检查 `CREATE TEMPORARY TABLE` 授权。[#107098](https://github.com/ClickHouse/ClickHouse/pull/107098) ([Azat Khuzhin](https://github.com/azat)).
* 修复了分布式查询在设置 `serialize_query_plan = 1` 且包含带常量参数的 lambda (例如 `arrayMap(t -> t.2, ...)`) 时出现 `ILLEGAL_TYPE_OF_ARGUMENT` 错误的问题。现在，在查询计划序列化期间会保留 `ActionsDAG` `INPUT` 节点的常量列。[#107124](https://github.com/ClickHouse/ClickHouse/pull/107124) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，对 `contingency`、`cramersV`、`cramersVBiasCorrected` 和 `theilsU` aggregate functions 状态的反序列化会校验存储的计数是否构成一致的列联表，否则将抛出 `CORRUPTED_DATA` 异常。关闭了 [#106899](https://github.com/ClickHouse/ClickHouse/issues/106899)。[#107185](https://github.com/ClickHouse/ClickHouse/pull/107185) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 保留封装在 `arrow::Status` 中的异常的原始错误代码。[#107267](https://github.com/ClickHouse/ClickHouse/pull/107267) ([Azat Khuzhin](https://github.com/azat)).
* 为静态服务器配置 (`users.xml`) 中定义的配额支持 `keyed_by_normalized_query_hash`，与现有 `CREATE QUOTA ... KEYED BY normalized_query_hash` DDL 语法保持一致。[#107654](https://github.com/ClickHouse/ClickHouse/pull/107654) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 兼容性设置不再应用已废弃设置，因此不会将其标记为已更改，也不会产生已废弃设置警告。[#107737](https://github.com/ClickHouse/ClickHouse/pull/107737) ([Maxim Orlovsky](https://github.com/UberDever)).
* 异步插入不再在 `trace`/`debug` 级别记录完整的 `query_id` 列表；自 26.2 起，这可能导致高异步插入流量服务上的 `text_log` 急剧膨胀。现在详细日志会记录在 `test` 级别。[#107852](https://github.com/ClickHouse/ClickHouse/pull/107852) ([Sema Checherinda](https://github.com/CheSema)).
* 文件系统缓存改进：防止已失效的 priority 条目持续占用 `KeyMetadata`。这是对 [#106387](https://github.com/ClickHouse/ClickHouse/pull/106387) 的后续修复。[#107903](https://github.com/ClickHouse/ClickHouse/pull/107903) ([Kseniia Sumarokova](https://github.com/kssenii)).
* `FileCache` 指标改进。[#106116](https://github.com/ClickHouse/ClickHouse/pull/106116) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 当堆栈跟踪实际上为空时，不再在异常消息中打印 "Stack trace (when copying this message, always include the lines below):" 这段前导文字。[#106524](https://github.com/ClickHouse/ClickHouse/pull/106524) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在为超大偏移量计算文件系统缓存边界对齐时，`roundUpToMultiple` 中可能发生的溢出问题。[#92579](https://github.com/ClickHouse/ClickHouse/pull/92579) ([Bharat Nallan](https://github.com/bharatnc)).
* `EXPLAIN SYNTAX` 现在会在 explain 输出中一致地将运算符格式化为函数调用 (例如使用 `plus(1, 2)` 而不是 `1 + 2`) 。[#94681](https://github.com/ClickHouse/ClickHouse/pull/94681) ([Mohamed Abdelhalim ](https://github.com/1abdelhalim)).
* 改进了错误消息中的表名提示：不再建议完全相同的名称，并且会在建议中包含数据库名 (例如："Maybe you meant `other_db.my_table`?") 。[#95116](https://github.com/ClickHouse/ClickHouse/pull/95116) ([Mathuranath Metivier](https://github.com/matt-metivier)).
* 改进了不含 `FROM` 子句的查询中未解析标识符的错误消息，提示可添加一个 `FROM` 子句。[#101769](https://github.com/ClickHouse/ClickHouse/pull/101769) ([Yash ](https://github.com/Onyx2406)).
* 为 `EXPLAIN PIPELINE` 添加了一个用于压缩重复处理器链的选项。[#104662](https://github.com/ClickHouse/ClickHouse/pull/104662) ([Yue Ni](https://github.com/niyue)).
* 修复了构造语法错误消息时的一处堆缓冲区溢出读取问题 (`UTF8::computeWidthImpl` 经由 `parseQuery.cpp`) ，该问题发生在解析器回溯到第一个分号 / 流结束标记之前时；发行版构建会把相邻堆内存中的字节拼接到显示的错误内容中，而 ASan 构建则会直接中止。[#105086](https://github.com/ClickHouse/ClickHouse/pull/105086) ([Groene AI](https://github.com/groeneai)).
* 在兼容性设置 `file_like_engine_default_partition_strategy` 下，默认使用 hive 分区策略。[#86746](https://github.com/ClickHouse/ClickHouse/pull/86746) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在 macOS 上使用更大的 (8 MiB) 线程栈，以匹配 Linux 默认值，修复了 JIT 编译期间因栈溢出导致的罕见服务端崩溃问题。[#107033](https://github.com/ClickHouse/ClickHouse/pull/107033) ([Raúl Marín](https://github.com/Algunenano)).
* `clickhouse-local` 的临时存储大小限制不再硬编码为 1 GiB。默认值已提高到 1 TiB，并且可通过 `max_temporary_data_on_disk_size` 服务器设置进行配置。[#106689](https://github.com/ClickHouse/ClickHouse/pull/106689) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse-disks` 添加了 `read-checksums` 命令。它会读取 `MergeTreeDataPart` 的 `checksums.txt` 文件，并以便于人类阅读的制表符分隔表形式打印出来。[#106901](https://github.com/ClickHouse/ClickHouse/pull/106901) ([Asya Shneerson](https://github.com/asya-ch)).
* 为 `clickhouse-disks` 添加了 `read-bitmap` 命令。[#107834](https://github.com/ClickHouse/ClickHouse/pull/107834) ([murphy-4o](https://github.com/murphy-4o)).
* Chdig：为安全连接启用 TLS (此前会导致 "unknown setting `skip_verify`" 或 "connection reset by peer") 。[#105864](https://github.com/ClickHouse/ClickHouse/pull/105864) ([Azat Khuzhin](https://github.com/azat)).
* [`chdig` v26.5.1](https://github.com/azat/chdig/releases/tag/v26.5.1)。[#105918](https://github.com/ClickHouse/ClickHouse/pull/105918) ([Azat Khuzhin](https://github.com/azat)).
* [`chdig` v26.6.1](https://github.com/azat/chdig/releases/v26.6.1) - `{asynchronous_,}metric_log`、查询模式、热力图，以及存储在磁盘上的日志/链路追踪 (此前 1 小时的链路追踪可能会占用 >40GiB) 。[#107678](https://github.com/ClickHouse/ClickHouse/pull/107678) ([Azat Khuzhin](https://github.com/azat)).
* 服务器配置 (`programs/server/config.xml`) 现将 `keep_alive_timeout` 设为 30 (此前为 10) ，与文档记录及实际实现的默认值保持一致。[#107779](https://github.com/ClickHouse/ClickHouse/pull/107779) ([Dan Checkoway](https://github.com/dcheckoway)).
* 服务器级配置项 `disk_connections_rcvbuf` 的默认值已从 `0` (内核 TCP 自动调优) 改为 `204800` (200 KB) ，用于限制对象存储 (`S3`/`Azure`/`GCS`) disk 连接中每个套接字的 TCP 接收缓冲区大小。[#107859](https://github.com/ClickHouse/ClickHouse/pull/107859) ([Sema Checherinda](https://github.com/CheSema)).
* `PREWHERE` 优化器现在会在估算选择性之前，先将引用同一列集合的合取项分组，因此像 `a > 2500 AND a < 2502` 这样的条件会作为一个组合范围一起计算，而不是作为两个独立谓词计算，从而得到更准确的选择性估算。[#106337](https://github.com/ClickHouse/ClickHouse/pull/106337) ([Han Fei](https://github.com/hanfei1991)).
* 添加了支持 silk fiber 感知的安全套接字和普通套接字实现。[#107680](https://github.com/ClickHouse/ClickHouse/pull/107680) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 `nested` 函数中的一条错误消息显示错乱问题 (参数顺序颠倒) 以及一个拼写错误。[#108031](https://github.com/ClickHouse/ClickHouse/pull/108031) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse-disks` 新增了一个 `sed` 命令，可对给定路径原地应用 sed 表达式。[#107131](https://github.com/ClickHouse/ClickHouse/pull/107131) ([Asya Shneerson](https://github.com/asya-ch)).
* 为 `MaterializedPostgreSQL` database engine 新增了创建时配置项 `materialized_postgresql_use_extended_date_and_time_types`。默认情况下 (启用时) ，PostgreSQL 的 `date`/`timestamp` 列会被推断为 `Date32`/`DateTime64`；如果在 `CREATE DATABASE` 时将其设为 `0`，则会推断为更窄的 `Date`/`DateTime` 类型。[#107428](https://github.com/ClickHouse/ClickHouse/pull/107428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

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

* 支持删除带有 `tryN` 后缀的 detached parts。[#58957](https://github.com/ClickHouse/ClickHouse/pull/58957) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了在启用并行副本时，嵌套子查询中包含重复投影别名 (例如 `SELECT *, day + 365 AS day`) 的查询触发 `MULTIPLE_EXPRESSIONS_FOR_ALIAS` 异常的问题。[#80310](https://github.com/ClickHouse/ClickHouse/pull/80310) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `splitMultipartQuery` 在查询以分号后的注释结尾时抛出 "Empty query" 错误的问题。[#85491](https://github.com/ClickHouse/ClickHouse/pull/85491) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 `ARRAY JOIN` 的一个异常：当使用 `LowCardinality` 数值类型时，会出现 `Function writeSlice expects same column types for GenericArraySlice and GenericArraySink` (issue [#57243](https://github.com/ClickHouse/ClickHouse/issues/57243)) 。[#91784](https://github.com/ClickHouse/ClickHouse/pull/91784) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复了在新 analyzer 中，将 `LIMIT BY` 与常量列、`DISTINCT` 和 `ORDER BY` 一起使用时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 异常。[#93195](https://github.com/ClickHouse/ClickHouse/pull/93195) ([Ashrith Bandla](https://github.com/ashrithb)).
* 修复了当 `data_type_default_nullable = 1` 且表是在 `Replicated` 数据库中创建或通过 `ON CLUSTER` 创建时，`NOT NULL` 列会被静默创建为 `Nullable` 的问题。[#97572](https://github.com/ClickHouse/ClickHouse/pull/97572) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 通过增加自动重试机制和重连逻辑来处理与 Hive Metastore 通信时的 TTransportException 错误，提升了 HiveCatalog 连接的稳定性。[#98471](https://github.com/ClickHouse/ClickHouse/pull/98471) ([Dmitriy Borisenko](https://github.com/otselnik)).
* 修复了 `nested` 函数 (由 `ARRAY JOIN` 在内部使用) 会从列类型中去掉 `LowCardinality` 的问题，导致输出中的 `Array(LowCardinality(String))` 变为 `Array(String)`。关闭了 [#95582](https://github.com/ClickHouse/ClickHouse/issues/95582)。[#98974](https://github.com/ClickHouse/ClickHouse/pull/98974) ([Yash ](https://github.com/Onyx2406)).
* 修复了在启用并行副本的查询中使用 `url`、`s3` 或类似表函数时出现的 "Distributed task iterator is not initialized" 异常。[#100146](https://github.com/ClickHouse/ClickHouse/pull/100146) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了读取由外部工具 (例如 Spark) 升级过 format version 的 Iceberg 表时出现的 logical error 异常。[#100407](https://github.com/ClickHouse/ClickHouse/pull/100407) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `like`、`ilike`、`notLike`、`notILike` 和 `match` 函数现在支持常量 haystack 与非常量 needle (例如 `'foo' LIKE pattern_column`) ，而此前这会抛出 `ILLEGAL_COLUMN`。[#100479](https://github.com/ClickHouse/ClickHouse/pull/100479) ([Yash ](https://github.com/Onyx2406)).
* 修复了当视图将一个整数列映射为 `Bool` 列时，`query_plan_enable_optimizations = 0` 的 `MaterializedView` 查询返回行数错误的问题。[#100692](https://github.com/ClickHouse/ClickHouse/pull/100692) ([Maksim Moisiuk](https://github.com/Maximus5)).
* 修复了在启用 PREWHERE optimization 时，读取包含 ORC 数据文件的 Iceberg 表时出现的异常 (`LOGICAL_ERROR: 'PREWHERE passed to format that doesn't support it'`) 。[#101206](https://github.com/ClickHouse/ClickHouse/pull/101206) ([Groene AI](https://github.com/groeneai)).
* 修复 RestCatalog 中的竞态问题。[#101216](https://github.com/ClickHouse/ClickHouse/pull/101216) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复从带有普通 projection 的表上的 VIEW 进行查询时出现 `NOT_FOUND_COLUMN_IN_BLOCK` 错误的问题。[#101218](https://github.com/ClickHouse/ClickHouse/pull/101218) ([Amos Bird](https://github.com/amosbird)).
* 修复文件被删除后重新创建时 FileLog 中 metadata 过期的问题。[#101408](https://github.com/ClickHouse/ClickHouse/pull/101408) ([Azat Khuzhin](https://github.com/azat)).
* 修复在与另一张表进行逗号 join (cross) 时，join 重排序会静默丢弃 `RIGHT`/`LEFT JOIN` 未匹配行的问题，例如 `t1 RIGHT JOIN t2 ON t1.c = t2.c, t3`。此前，该查询返回的是 inner join 结果，而不是 outer join 结果。[#101684](https://github.com/ClickHouse/ClickHouse/pull/101684) ([Groene AI](https://github.com/groeneai)).
* 修复在 `EXPLAIN INSERT INTO ... SELECT ... FORMAT ...` 中，`FORMAT` clause 被 `INSERT` 消费，而不是应用到 `EXPLAIN` 输出上的问题。[#101772](https://github.com/ClickHouse/ClickHouse/pull/101772) ([Yash ](https://github.com/Onyx2406)).
* 修复在显式配置表级 `default_compression_codec` setting 时，`MergeTree` parts 选择压缩 codec 不正确的问题。on insert 写入的 parts、merge 期间的 parts 以及 projections 使用的是服务器级默认 codec，而不是表级 setting (现在也涵盖了完全删除型 mutation 生成的空 part) 。[#101784](https://github.com/ClickHouse/ClickHouse/pull/101784) ([Yash ](https://github.com/Onyx2406)).
* 拒绝 `max_bytes_per_second`、`max_cpus` 等 workload settings 中的负 `Float64` 值 (例如 `-100.5`) 。此前仅校验负整数，导致负浮点数可能静默创建损坏的 scheduler 节点。关闭 [#101825](https://github.com/ClickHouse/ClickHouse/issues/101825)。[#101842](https://github.com/ClickHouse/ClickHouse/pull/101842) ([Groene AI](https://github.com/groeneai)).
* 修复执行包含 JOIN 且其中 VIEW 内有 aggregation 的查询时，可能出现的 `LOGICAL_ERROR` ("Port is not connected"，代码 49) 。[#102574](https://github.com/ClickHouse/ClickHouse/pull/102574) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复对使用非默认 serialization 的列执行 mutations 后，part metadata 不一致的问题。[#102817](https://github.com/ClickHouse/ClickHouse/pull/102817) ([Eduard Karacharov](https://github.com/korowa)).
* 修复在执行 mutation 之前更新 metadata 的问题，并解决了 [#96806](https://github.com/ClickHouse/ClickHouse/issues/96806)。[#102882](https://github.com/ClickHouse/ClickHouse/pull/102882) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复在并发 `INSERT` 运行时，SELECT 查询显著变慢的问题。此前，`INSERT` 管道会在查询开始时预留最多 `max_threads` 个 CPU 插槽，即使其中大多数实际上从未使用，从而挤占并发 SELECT 的资源。现在 CPU 插槽分配改为按需进行：该管道仅在实际推送可并行化工作时才会请求插槽。这同时适用于并发控制以及 workloads 的抢占式 CPU scheduler。新增 server setting `concurrent_threads_lazy_allocation` (默认值为 `true`) 可作为 rollback 开关。[#102928](https://github.com/ClickHouse/ClickHouse/pull/102928) ([Seva Potapov](https://github.com/seva-potapov)).
* 修复了读取从 `Nullable(Tuple(...))` 列中提取的子列时 `NULL` 传播不正确的问题。例如，对于 `tup Nullable(Tuple(s Nullable(String)))`，`SELECT tup.s` 现在会在外层 Tuple 为 `NULL` 的行中正确返回 `NULL`，而不是垃圾值。这涵盖了所有可表示 `NULL` 的元素类型：`Nullable`、`Dynamic`、`Variant` 和 `LowCardinality(Nullable(...))`。关闭 [#105356](https://github.com/ClickHouse/ClickHouse/issues/105356)。[#102942](https://github.com/ClickHouse/ClickHouse/pull/102942) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 当客户端提供的 Native format 数据被截断或格式不正确时，抛出 `INCORRECT_DATA` 而不是 `LOGICAL_ERROR`。[#102975](https://github.com/ClickHouse/ClickHouse/pull/102975) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 为 ObjectStorage 读取操作添加了取消检查。关闭 [#98165](https://github.com/ClickHouse/ClickHouse/issues/98165)。[#103016](https://github.com/ClickHouse/ClickHouse/pull/103016) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 在解码 aggregate function 参数时遵循 `input_format_binary_max_type_complexity`。关闭 [#102903](https://github.com/ClickHouse/ClickHouse/issues/102903)。[#103026](https://github.com/ClickHouse/ClickHouse/pull/103026) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了基于 Arrow 的 Parquet reader 中 geo 列的 nullable 推断问题。关闭 [#101845](https://github.com/ClickHouse/ClickHouse/issues/101845)。[#103032](https://github.com/ClickHouse/ClickHouse/pull/103032) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `recursiveRemoveLowCardinality` 会清除自定义 geometry type name (例如 `LineString` 与 `Ring`、`MultiLineString` 与 `Polygon`) 的问题，该问题会导致 geometry type 被错误解释。关闭 [#103207](https://github.com/ClickHouse/ClickHouse/issues/103207)。[#103041](https://github.com/ClickHouse/ClickHouse/pull/103041) ([Joanna Hulboj](https://github.com/jh0x)).
* 修复了在 `max_insert_block_size_bytes` 为 `0` (默认值) 时，`INSERT` parsing 过程中 `input_format_max_block_size_bytes` 被静默忽略的问题。该 setting 现在会正确限制由行 input formats 生成的块大小。[#103068](https://github.com/ClickHouse/ClickHouse/pull/103068) ([Kirill Kopnev](https://github.com/Fgrtue)).
* 修复了 ClickHouse 因错误剥离尾随 null byte 而偶尔生成无效 GSSAPI 标记的问题。[#103114](https://github.com/ClickHouse/ClickHouse/pull/103114) ([Michael Jarrett](https://github.com/EmeraldShift)).
* 修复了 analyzer 阶段对短路函数 (`if`、`multiIf`、`and`、`or` 等) 的常量折叠问题，因此静态上不可达的分支不再在分析阶段触发异常。例如，`WITH 0 AS n SELECT multiIf(n = 0, 0, intDiv(100, n))` 现在会正确返回 `0`，而不是因除零错误失败。[#103157](https://github.com/ClickHouse/ClickHouse/pull/103157) ([Peng](https://github.com/fastio)).
* `EXPLAIN SYNTAX` 会展开 parameterized views。[#103263](https://github.com/ClickHouse/ClickHouse/pull/103263) ([Jordi Villar](https://github.com/jrdi)).
* 修复了通过 `INSERT INTO FUNCTION hdfs(...)` 向 HDFS 写入 Parquet (以及其他带尾部标记的格式，如 ORC 和 Arrow) 时发生的数据损坏问题。自 26.1 起，`WriteBufferFromHDFS` 不会在 `finalize()` 时刷新其工作缓冲区，因此每个文件末尾最多 `DBMS_DEFAULT_BUFFER_SIZE` 字节都会被静默丢失，其中包括 Parquet 的 `PAR1` footer。读取此类文件会返回 `Not a Parquet file (wrong magic bytes at the end of file)`。[#103268](https://github.com/ClickHouse/ClickHouse/pull/103268) ([Groene AI](https://github.com/groeneai)).
* 修复了在同时设置 join 大小限制 (`max_rows_in_join` / `max_bytes_in_join`) 和 `join_overflow_mode = 'break'` 时，相关子查询可能产生错误结果以及潜在逻辑错误的问题。现在，内部为评估相关子查询而创建的 join 会忽略这些用户限制，因此不再会提前停止并丢弃行。[#103322](https://github.com/ClickHouse/ClickHouse/pull/103322) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 bug：在 `EmbeddedRocksDB` 表上执行 `ALTER TABLE ... MODIFY SETTING` 时，即使服务器拒绝了该查询，也可能将无效的设置值持久化到表元数据文件中。下一次服务器重启时，该表会因 `CANNOT_PARSE_BOOL` (或类似的解析错误) 而无法附加；而在将加载失败视为致命错误的数据库中，服务器将拒绝启动。现在会在写入任何元数据之前先拒绝无效的设置值。[#103417](https://github.com/ClickHouse/ClickHouse/pull/103417) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用不受支持的参数数量创建对象存储引擎 (`AzureBlobStorage`, `DeltaLakeAzure`, `S3`, `HDFS`) 表时服务器中止的问题。现在，服务器会返回明确的 `NUMBER_OF_ARGUMENTS_DOESNT_MATCH` 错误，而不是在 debug/sanitizer 构建中中止。[#103544](https://github.com/ClickHouse/ClickHouse/pull/103544) ([Groene AI](https://github.com/groeneai)).
* 修复了 `JSON` 和 `Dynamic` 数据类型参数解析中的服务器崩溃问题：当抽象语法树 (AST) 在结构上格式错误时 (例如由 AST fuzzer 生成) ，`equals(name, value)` 参数表达式可能只剩少于两个子节点，而 `DataTypeObject` 和 `DataTypeDynamic` 随后会在没有边界检查的情况下解引用它。[#103545](https://github.com/ClickHouse/ClickHouse/pull/103545) ([Groene AI](https://github.com/groeneai)).
* 修复了 analyzer 在 PREWHERE 中使用 lambda 时因列名冲突导致的逻辑错误。关闭 [#103584](https://github.com/ClickHouse/ClickHouse/issues/103584)。[#103627](https://github.com/ClickHouse/ClickHouse/pull/103627) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在异步加载元数据期间，当 `Iceberg` 引擎表在常规数据库中加载时，`DataLakeConfiguration::getCatalog` 偶发抛出 `Logical error: 'Database <name> not found'` 的问题。[#103775](https://github.com/ClickHouse/ClickHouse/pull/103775) ([Groene AI](https://github.com/groeneai)).
* 修复了在启用并行副本且 `parallel_replicas_local_plan = 0` 时，运行引用 `PREWHERE` / `WHERE` / `HAVING` / `QUALIFY` 中投影别名的查询 (例如 `SELECT x AS a, y AS b, (a AND b) AS c FROM t PREWHERE c`) ，或对列名重叠的自连接执行 `SELECT *` 时，远程副本抛出 `MULTIPLE_EXPRESSIONS_FOR_ALIAS` 错误的问题。关闭 [#74324](https://github.com/ClickHouse/ClickHouse/issues/74324)。[#103806](https://github.com/ClickHouse/ClickHouse/pull/103806) ([Groene AI](https://github.com/groeneai)).
* 修复了当查询在具有多个 `minmax` 跳过索引且 `use_skip_indexes_for_disjunctions = 1` 的 `MergeTree` 表上使用嵌套 `coalesce`/`ifNull` 比较 (例如 `WHERE coalesce(a, b, coalesce(c, d), e) = const`) 时服务器中止的问题。现在，针对 `<op>(coalesce(...), const)` 的跳过索引重写会递归应用到内部 coalesce 参数，因此每个索引的 `KeyCondition` RPN 会与模板的 RPN 匹配，这正是析取跟踪代码原本假定的行为。[#103929](https://github.com/ClickHouse/ClickHouse/pull/103929) ([Groene AI](https://github.com/groeneai)).
* 修复在新 analyzer 下，`GLOBAL IN` 和 `GLOBAL JOIN` 查询中 `max_rows_to_transfer` 与 `max_bytes_to_transfer` 被静默忽略的问题。现在，当物化的外部表超过配置限制时，这些设置会触发 `SET_SIZE_LIMIT_EXCEEDED` (或根据 `transfer_overflow_mode` 中断) ，与旧 analyzer 的行为一致。关闭 [#103333](https://github.com/ClickHouse/ClickHouse/issues/103333)。[#104119](https://github.com/ClickHouse/ClickHouse/pull/104119) ([Groene AI](https://github.com/groeneai)).
* 修复在启用 `show_data_lake_catalogs_in_system_tables` 时，DataLake catalog 数据库中的 `INSERT` 或 DDL 语句引用不存在的表而导致过度读取 catalog/S3 元数据的问题。拼写提示建议路径会为整个 catalog 加载每个表的完整 Iceberg 元数据，这在大型 catalog 上可能耗尽内存。[#104124](https://github.com/ClickHouse/ClickHouse/pull/104124) ([DQ](https://github.com/il9ue)).
* 修复一个崩溃问题 (在调试构建中表现为 `LOGICAL_ERROR` "Columns are assumed to be of identical types, but they are different in Nullable"，在 release 构建中表现为 `ColumnString::compareAt` 空指针 SIGSEGV) 以及一个错误结果问题；当查询使用 `direct` `join_algorithm`，且右侧表为 `MergeTree` 时，如果查找查询计划在优化过程中重排列，就可能出现这些问题。右侧列可能会落入名称错误的槽位，因此对连接键的过滤器或比较会读取到类型错误的列。该问题由 AST fuzzer 以 STID 2139-5111 发现，并在 [#107272](https://github.com/ClickHouse/ClickHouse/issues/107272) 中报告。[#104174](https://github.com/ClickHouse/ClickHouse/pull/104174) ([Groene AI](https://github.com/groeneai)).
* 修复对 `Date` 的越界整数分区 ID 的处理：现在会直接拒绝，而不是在 `ALTER` 时发生静默溢出或报出 `LOGICAL_ERROR`。[#104250](https://github.com/ClickHouse/ClickHouse/pull/104250) ([Azat Khuzhin](https://github.com/azat)).
* 在并行副本、analyzer 且没有查询计划序列化的情况下禁用 `additional_table_filters`。此前这可能导致错误结果。[#104296](https://github.com/ClickHouse/ClickHouse/pull/104296) ([Azat Khuzhin](https://github.com/azat)).
* 修复 `dictGetOrNull` 在使用 `Nullable` 键列且其值在字典中缺失时，会静默用 `NULL` 覆盖 `SELECT` 投影中其他列的问题。该函数此前会原地修改一个输入别名的 null map；现在它会在变更前深拷贝结果列。关闭 [#73633](https://github.com/ClickHouse/ClickHouse/issues/73633)。[#104327](https://github.com/ClickHouse/ClickHouse/pull/104327) ([Groene AI](https://github.com/groeneai)).
* 修复在执行 `ALTER TABLE ... DROP PARTITION ID 'patch-...'` 后再执行 `DETACH`/`ATTACH TABLE` 时损坏的 patch part 问题。此前，空的 covering part 在写入时缺少 `partition.dat` 和 `source_parts.dat`，导致下一次 attach 或服务器重启后，`system.detached_parts` 中出现 `broken-on-start_patch-...` 条目。关闭 [#93132](https://github.com/ClickHouse/ClickHouse/issues/93132)。关闭 [#102103](https://github.com/ClickHouse/ClickHouse/issues/102103)。[#104353](https://github.com/ClickHouse/ClickHouse/pull/104353) ([Groene AI](https://github.com/groeneai)).
* 修复 `HTTP` 接口以及 `INSERT SELECT FROM input` 的流式 `INSERT` 在配合 `input_format_max_block_wait_ms` 时的问题，使部分输入块会在请求结束前刷写出去。[#104534](https://github.com/ClickHouse/ClickHouse/pull/104534) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个 bug：在 `JOIN` 之后将 `arrayJoin` 与 `ORDER BY ... LIMIT` 组合使用的查询，可能会静默返回零行。由于 `arrayJoin` 可能改变行数，因此当被上提的表达式中包含 `arrayJoin` 时，不再应用将函数求值提升到 `SortingStep` 之上的查询计划优化。关闭 [#82279](https://github.com/ClickHouse/ClickHouse/issues/82279)。[#104558](https://github.com/ClickHouse/ClickHouse/pull/104558) ([Groene AI](https://github.com/groeneai)).
* 修复了销毁 `MergeTree` 系列表时罕见的 server 中止问题。当 `shutdown` 在后台作业调度器完全停止前抛出异常时，可能会触发该中止：如果后台任务恰好在这段极短的时间窗口内运行，就会通过一个已部分销毁的存储对象分派一次 virtual 调用，并触发 `__cxa_pure_virtual`。[#104561](https://github.com/ClickHouse/ClickHouse/pull/104561) ([Groene AI](https://github.com/groeneai)).
* 修复了 `JSON` 组合 subcolumn 与包含 null value 的 type hint 结合使用时结果不一致的问题。[#104584](https://github.com/ClickHouse/ClickHouse/pull/104584) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了当聚合投影中包含多个带不同 `IN (...)` 条件的 `sumIf` 聚合时，结果错误或遗漏 projection 的问题。[#104765](https://github.com/ClickHouse/ClickHouse/pull/104765) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复了在 `JOIN ON` 中使用 `arrayJoin()` 时返回行数错误的问题：结果会额外再乘一次数组长度。[#104785](https://github.com/ClickHouse/ClickHouse/pull/104785) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `deltaSumTimestamp` 在有符号整数类型跨越零点时返回错误结果的问题。解决了 [#104750](https://github.com/ClickHouse/ClickHouse/issues/104750)。[#104830](https://github.com/ClickHouse/ClickHouse/pull/104830) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了使用 NULL 常量进行过滤下推后，UnionStep 中 block 结构不匹配的问题。关闭 [#104821](https://github.com/ClickHouse/ClickHouse/issues/104821)。[#104853](https://github.com/ClickHouse/ClickHouse/pull/104853) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了对刚附加、且其元数据文件已损坏或无法加载的 `Iceberg`、`DeltaLake` 或 `Hudi` 表执行 `DELETE FROM` 时抛出的 `Logical error: 'Metadata is not initialized'`。现在会改为报告常规的用户可见异常，server 也会继续运行。关闭 [#104891](https://github.com/ClickHouse/ClickHouse/issues/104891)。[#104917](https://github.com/ClickHouse/ClickHouse/pull/104917) ([Groene AI](https://github.com/groeneai)).
* 修复了配置变更时 `max_memory_usage_soft_limit` 不会动态更新的问题。此前，软内存限制只会在启动时计算一次并缓存，因此后续配置重载不会生效。修复后，每次配置重载时都会立即重新计算并应用该限制，无需重启 Keeper。[#104940](https://github.com/ClickHouse/ClickHouse/pull/104940) ([Kai Zhu](https://github.com/nauu)).
* 修复了 macOS 上的 JIT 符号解析问题，因此 sort、expression 和 aggregate 的 JIT 编译不再因 `CANNOT_COMPILE_CODE: Could not find symbol _<name>` 而失败。[#104946](https://github.com/ClickHouse/ClickHouse/pull/104946) ([Alexei Fedotov](https://github.com/leshikus)).
* 修复了在新 analyzer 下启用 `optimize_skip_unused_shards_rewrite_in` 时，执行如下形式查询会出现的异常 (即向量加固中的 `Received signal 6 (abort)`，表现为对空向量调用 `Tuple::back()`) ：`SELECT ... FROM <Distributed table> WHERE/HAVING/GROUP BY ... (sharding_key_column IN tuple())`。[#104966](https://github.com/ClickHouse/ClickHouse/pull/104966) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 debug / sanitiser 构建中，类似 `CREATE TABLE t (c0 Int CODEC(not((not(materialize(1), materialize(2)))), ZSTD)) ENGINE = Memory` 这样的查询触发 `Logical error: 'Inconsistent AST formatting'` 并导致服务器中止的问题 (STID 1941-1bfa) 。格式化器现在不再为出现在 `CODEC` / `STATISTICS` / `BACKUP_NAME` 参数列表中的多参数 `tuple(...)` 函数调用生成多余的外层括号 (这些位置禁用了操作符形式 `(a, b)`) ，从而保持 format-parse-format 往返稳定。 [#104991](https://github.com/ClickHouse/ClickHouse/pull/104991) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ALTER TABLE ... MATERIALIZE INDEX` 在 25.8 创建、且包含基于通过单独 `ALTER TABLE ... ADD COLUMN` 添加的列所建跳过索引的分片上抛出 `NOT_FOUND_COLUMN_IN_BLOCK` 的问题。现在在强制重新计算期间，变更会正确读取该分片上所有既有跳过索引和 PROJECTION 所需的每一列。关闭 [#104872](https://github.com/ClickHouse/ClickHouse/issues/104872)。 [#105039](https://github.com/ClickHouse/ClickHouse/pull/105039) ([Groene AI](https://github.com/groeneai)).
* 修复了启用 `enable_materialized_cte` 的查询中会抛出的两类 `LOGICAL_ERROR: Reading from materialized CTE 'X' before it has been materialized` 情况：(1) 一个被复用的 materialized CTE，且通过另一个 materialized CTE 上的 `IN (subquery)` 进行过滤；(2) 一个 materialized CTE 既被直接引用，又在命中 MergeTree 主键的嵌套 IN-subquery 中作为 `WHERE ... IN (...)` 过滤条件的一部分被引用。对相同查询执行 `EXPLAIN` 也会受到影响，因为这些 bug 会在计划优化阶段触发。关闭 [#101940](https://github.com/ClickHouse/ClickHouse/issues/101940)，关闭 [#102320](https://github.com/ClickHouse/ClickHouse/issues/102320)。 [#105041](https://github.com/ClickHouse/ClickHouse/pull/105041) ([Dmitry Novik](https://github.com/novikd)).
* 修复了 `Float32` 列的 `countmin` 统计信息在 `PREWHERE` 中的选择性估算问题。两个 bug 会导致 `countmin` 统计信息对 `Float32` 列静默地产生错误估算：`ConditionSelectivityEstimator` 在列类型 (`Float32`) 比字面量类型 (`Float64`) 更窄时会完全跳过统计信息，回退到默认选择性并忽略 sketch；而 `StatisticsCountMinSketch::estimateEqual` 会对 `Field` 对象前 N 个字节进行哈希，但 `Field` 将 `Float32` 存储为 `Float64` (`NearestFieldType<Float32>` = `Float64`) ，因此查询时使用的字节模式与构建期间存储的实际 `Float32` 字节并不一致。 [#105047](https://github.com/ClickHouse/ClickHouse/pull/105047) ([Han Fei](https://github.com/hanfei1991)).
* 对于提供了存储子句 (`ORDER BY`、`PARTITION BY`、`PRIMARY KEY`、`SAMPLE BY`、`TTL`、`UNIQUE KEY` 或引擎 `SETTINGS`) 但未提供 `ENGINE` 的 `ATTACH TABLE name <clauses>;` 查询，现在会抛出 `BAD_ARGUMENTS`，而不是静默地按已存储定义重新附加该表并丢弃用户提供的子句。查询级会话 `SETTINGS` (例如 `log_comment`) 仍会生效。可使用 `ATTACH TABLE t;` 按已存储的 metadata 重新附加，或在 `ATTACH` 之后使用 `ALTER TABLE t MODIFY SETTING ...` 修改设置。 [#105068](https://github.com/ClickHouse/ClickHouse/pull/105068) ([Groene AI](https://github.com/groeneai)).
* 修复了 `runningAccumulate` 在对聚合函数返回其自身状态的列调用时出现的 use-after-free 问题 (例如 `uniqStateOrDefaultState`、`sumStateOrDefaultState`、`uniqStateForEachState`) 。 [#105085](https://github.com/ClickHouse/ClickHouse/pull/105085) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了 Web UI (`play.html`) 中的一个 bug：当光标位于唯一一个末尾 `;` 之后时运行查询，会报出 "empty query"，而不是执行该查询。 [#105107](https://github.com/ClickHouse/ClickHouse/pull/105107) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `Replicated` database 中的一个问题：当 `CREATE TABLE ... AS SELECT` 从 `system.current_roles` 或 `system.enabled_roles` 读取时，会报错 `LOGICAL_ERROR: 'No user in current context, it's a bug'`。现在，该查询在这个内部 DDL worker 上下文中可以成功执行，并返回空结果集。[#105150](https://github.com/ClickHouse/ClickHouse/pull/105150) ([Groene AI](https://github.com/groeneai)).
* 修复了在合并 `quantileExactWeightedInterpolated`、`quantileDD` 或 `quantilePrometheusHistogram` aggregate states 与其对应的复数形式 `quantilesXxxMerge` 时出现的 `ILLEGAL_TYPE_OF_ARGUMENT` 错误 (反之亦然) 。这三个 quantile 系列的单数和复数变体共享相同的内部 aggregate state，但之前未被列入内部名称映射表，因此跨函数的状态合并——以及这些系列的函数融合 optimization——都会被拒绝。[#105189](https://github.com/ClickHouse/ClickHouse/pull/105189) ([Groene AI](https://github.com/groeneai)).
* 修复了 `toStartOfWeek`、`toLastDayOfWeek`、`toMonday`、`toStartOfMonth`、`toLastDayOfMonth`、`toStartOfQuarter` 和 `toStartOfYear` 在处理结果超出 `Date` 范围的 `Date32` 和 `DateTime64` argument 时返回错误结果的问题：现在结果不再溢出到任意日期，而是将早于 `1970-01-01` 的结果限制为 `1970-01-01`，将晚于 `2149-06-06` 的结果限制为 `2149-06-06`。这也修复了当这些函数在 `WHERE` 中作用于包含越界值的 `Date32` 或 `DateTime64` key 时产生的错误查询结果 (即错误裁剪的 parts 和 granules) 。[#105244](https://github.com/ClickHouse/ClickHouse/pull/105244) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 `arrayRemove` 中的一个逻辑错误：当第一个 argument 是 `Variant` 数组，且其所有备选类型都与第二个 argument 的类型不兼容，同时禁用了 `variant_throw_on_type_mismatch` 时，就会触发该问题。现在该函数会将比较视为“永不相等”，并原样返回数组，而不是触发 server-side `assertTypeEquality` 失败。[#105248](https://github.com/ClickHouse/ClickHouse/pull/105248) ([Groene AI](https://github.com/groeneai)).
* 即使 `FileCache` 在 disk 上为 caching 创建某些 directory 失败，查询现在也仍然可以成功执行。[#105250](https://github.com/ClickHouse/ClickHouse/pull/105250) ([Den Kalantaevskii](https://github.com/Diskein)).
* 修复了 `ExtremesTransform` 中导致 server 中止的问题：当启用 `extremes = 1` 的查询在转换器基于首个 chunk 构建 extremes columns 时遇到异常 (例如 `MEMORY_LIMIT_EXCEEDED`) ，会触发 `Assertion 'px != 0' failed`。现在客户端会收到原始异常，而不会导致 server 崩溃。[#105264](https://github.com/ClickHouse/ClickHouse/pull/105264) ([Groene AI](https://github.com/groeneai)).
* `LEFT ANTI JOIN` 现在会为未匹配的行正确返回右侧连接键列的默认值，而不是重复左侧键值。此前，`SELECT a.x AS l, b.x AS r FROM a LEFT ANTI JOIN b ON a.x = b.x` 在未匹配行中可能返回 `r = a.x`，而正确结果应为默认值 (`Int32` 为 `0`，`String` 为 `''`，`Nullable` 为 `NULL`) 。只有连接键列受此问题影响；右侧的非键列此前已经能正确返回默认值。当优化器交换两侧时，`RIGHT ANTI JOIN` 中也会出现同样的 bug。关闭 [#99959](https://github.com/ClickHouse/ClickHouse/issues/99959)。[#105278](https://github.com/ClickHouse/ClickHouse/pull/105278) ([Groene AI](https://github.com/groeneai)).
* 修复了 `clickhouse-local` 在使用非 `default` 的 `--default_database` 反复启动时发生的数据丢失问题 (例如 `clickhouse-local --path X -- --default_database=mydb`) ：持久化数据库 UUID 的查找路径被硬编码为 `metadata/default`，因此每次重启都会生成新的 UUID，导致上一次运行中的表变得不可见。关闭 [#101831](https://github.com/ClickHouse/ClickHouse/issues/101831)。[#105284](https://github.com/ClickHouse/ClickHouse/pull/105284) ([Groene AI](https://github.com/groeneai)).
* 修复了运行 `ALTER TABLE <memory_table> APPLY PATCHES` 或 `ALTER TABLE <memory_table> APPLY DELETED MASK` 时触发的逻辑错误 `Mutation of `Memory` table produced incomplete output`。`Memory` 表并不拥有 patch parts 或 deletion masks，因此这两个命令现在都会被正确视为无操作。[#105286](https://github.com/ClickHouse/ClickHouse/pull/105286) ([Groene AI](https://github.com/groeneai)).
* 通过在查询请求中传递 `table_id` 参数，修复了 Unity Catalog 中长时间运行查询的问题。[#105303](https://github.com/ClickHouse/ClickHouse/pull/105303) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了在 `distributed_group_by_no_merge=1` 时，`Distributed` 上两层 `Merge` 的 `CANNOT_CONVERT_TYPE` 问题。[#105330](https://github.com/ClickHouse/ClickHouse/pull/105330) ([Azat Khuzhin](https://github.com/azat)).
* 修复了 `clickhouse local` 和 `clickhouse client` 在同时提供位置参数形式的文件参数时，会静默忽略 `--query`/`-q` 的问题。现在这两种形式都会一致地返回 `BAD_ARGUMENTS`。[#105334](https://github.com/ClickHouse/ClickHouse/pull/105334) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `REPLACE TEMPORARY TABLE` 在目标不存在时静默创建新表的问题。现在它会抛出 `UNKNOWN_TABLE`，与 `REPLACE TABLE` 的语义一致。若要保留 create-or-replace 行为，请使用 `CREATE OR REPLACE TEMPORARY TABLE`。[#105373](https://github.com/ClickHouse/ClickHouse/pull/105373) ([Groene AI](https://github.com/groeneai)).
* 修复了从 `catalog_type = 'glue'` 的 `DataLakeCatalog` 数据库执行长时间读取操作 (例如 `INSERT ... SELECT`) 时可能失败的问题：当在加载表元数据时获取的 STS 会话凭证过期后，会报 `ExpiredToken` 错误。现在 AWS STS 凭证会在查询执行过程中刷新，因此这类读取可在标记过期后继续进行。[#105381](https://github.com/ClickHouse/ClickHouse/pull/105381) ([Pratima Patel](https://github.com/pratimapatel2008)).
* 修复了在某些情况下配合 `ARRAY JOIN` 使用负数 `LIMIT BY` 时出现的逻辑错误。[#105403](https://github.com/ClickHouse/ClickHouse/pull/105403) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了读取 Parquet 文件时被高估的 `read_bytes` (以及 `system.query_log`、进度条等中显示的派生 bytes/s) 。此前的实现会在每个 chunk 上报整个行组的总压缩后大小，因此读取 N 列中的 K 列时会按 `N / K` 高估。现在只会对所选列求和。还修复了 Iceberg 表的文件级进度跟踪问题，此前它从不报告数据文件大小。[#105413](https://github.com/ClickHouse/ClickHouse/pull/105413) ([Groene AI](https://github.com/groeneai)).
* 修复了 cluster 表函数 (`s3Cluster`、`urlCluster`、`fileCluster`、...) 中的一个潜在服务器段错误：当规划器生成带有 `recursive_with` 标志但没有 `WITH` expression 的 `SELECT` 时，可能会触发该问题。关闭 [#105370](https://github.com/ClickHouse/ClickHouse/issues/105370)。[#105433](https://github.com/ClickHouse/ClickHouse/pull/105433) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `count_distinct_optimization = 1` 时，`Nullable` 列上的 `countDistinct` / `uniqExact` 结果错误问题 (此前错误地将 NULL 分组计入统计) 。[#105439](https://github.com/ClickHouse/ClickHouse/pull/105439) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了读取 Arrow 或 ArrowStream 文件时的堆缓冲区溢出问题：当二进制列或字符串列中的中间 offsets 损坏时会触发；同时还修复了读取带地理标签的 Arrow 列时的空指针解引用问题。[#105449](https://github.com/ClickHouse/ClickHouse/pull/105449) ([Raúl Marín](https://github.com/Algunenano)).
* 在 window `PARTITION BY` 中校验 `Dynamic`/`Variant` 类型；此前在禁用 `allow_suspicious_types_in_group_by` 时，不会进行这项检查。关闭 [#105028](https://github.com/ClickHouse/ClickHouse/issues/105028)。[#105450](https://github.com/ClickHouse/ClickHouse/pull/105450) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `input_format_json_empty_as_default` 在 JSONStrings\* formats 中不起作用的问题。关闭 [#104913](https://github.com/ClickHouse/ClickHouse/issues/104913)。[#105453](https://github.com/ClickHouse/ClickHouse/pull/105453) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复在表达式 parsing 期间，通过 `VALUES` format 向 `Variant` 列 insert `NULL` 的问题。关闭 [#104909](https://github.com/ClickHouse/ClickHouse/issues/104909)。[#105455](https://github.com/ClickHouse/ClickHouse/pull/105455) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `dictGetOrDefault` 抛出 `CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN` 的问题：当默认 argument 为 `Nullable` 表达式，且启用了 `short_circuit_function_evaluation`，同时字典 key 同时包含可找到和找不到的情况时会触发。[#105461](https://github.com/ClickHouse/ClickHouse/pull/105461) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 `Dynamic` 列中静默发生的值截断问题：当 `Quoted` (Values) 文本 reader 对 `Map(Array(Nothing), ...)` 这类未完整推断的 types 回退到 `String` 时会出现该问题。此前，这种回退会通过简单的 `'...'` concatenation 包装原始 field，因此内部的单引号 (这类回退中始终存在) 会提前结束带引号的字符串，导致后续值丢失。[#105463](https://github.com/ClickHouse/ClickHouse/pull/105463) ([Groene AI](https://github.com/groeneai)).
* 修复在 `ALTER` 之后，从压缩的 `Memory` 表读取 `Dynamic` subcolumns 时出现的 SIGSEGV。关闭 [#104901](https://github.com/ClickHouse/ClickHouse/issues/104901)。[#105464](https://github.com/ClickHouse/ClickHouse/pull/105464) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `toFloat64`/`toUInt32`/`toString`/etc. 对 `Dynamic` 的处理忽略 `cast_keep_nullable` 的问题。关闭 [#104789](https://github.com/ClickHouse/ClickHouse/issues/104789)。[#105467](https://github.com/ClickHouse/ClickHouse/pull/105467) ([Pavel Kruglov](https://github.com/Avogar)).
* 在 `WithNames` formats 的 schema cache key 中加入 `skip_first_lines`。关闭 [#104527](https://github.com/ClickHouse/ClickHouse/issues/104527)。[#105469](https://github.com/ClickHouse/ClickHouse/pull/105469) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复在配合 `GROUP BY ... WITH ROLLUP`、`WITH CUBE` 或 `WITH TOTALS` 使用，且 argument 为 Nullable 时，`uniqStateOrNull` / `uniqStateOrDefault` / `uniqOrNullState` (以及 `uniq` 上类似的组合器链) 导致的 server segfault 问题。[#105470](https://github.com/ClickHouse/ClickHouse/pull/105470) ([Groene AI](https://github.com/groeneai)).
* 修复在启用 analyzer 时，同时使用 `ORDER BY ... WITH FILL INTERPOLATE` 和 `LIMIT N BY` 会导致 `NOT_FOUND_COLUMN_IN_BLOCK` Exception 的问题。关闭 [#103474](https://github.com/ClickHouse/ClickHouse/issues/103474)。[#105481](https://github.com/ClickHouse/ClickHouse/pull/105481) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复 `toStartOfMillisecond` 和 `toStartOfMicrosecond` 在负数 (epoch 之前) 的 `DateTime64` 值上返回结果偏差近一秒的问题，并修复 `UndefinedBehaviorSanitizer` 在 `toStartOfSecond`、`toStartOfMillisecond` 和 `toStartOfMicrosecond` 中对接近 `INT64_MIN` 的 `DateTime64` 输入报出的有符号整数溢出问题。 [#105482](https://github.com/ClickHouse/ClickHouse/pull/105482) ([Groene AI](https://github.com/groeneai)).
* 新增兼容性设置 `analyzer_compatibility_prefer_alias_over_subcolumn` (默认禁用) 。启用后，新的 analyzer 在解析多部分标识符时，会优先按 alias 前缀来解释，而不是匹配 `Tuple` 子列 / 点号列，从而恢复旧解释器的行为。这可避免以下情况下出现 `AMBIGUOUS_IDENTIFIER` (及相关) 错误：查询 join 了一个表，而该表名恰好与某个 CTE/子查询中的内部表同名，且该 CTE/子查询在 join 结果上使用了 `SELECT *`。否则，由星号重命名的列 (如 `b.id`) 会将内部表标识符泄漏到外层作用域。 [#105491](https://github.com/ClickHouse/ClickHouse/pull/105491) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 使用 *index only* 优化执行的 vector search 查询，现在如果 `SELECT` 列表中包含 `L2Distance()`，将返回正确的值。此前该函数错误地返回了 *L2-squared* 距离值。请注意，vector search 查询返回的结果排序本身一直是正确的；只有那些**明确获取并解释** `L2Distance()` 值的应用程序，才会看到这个平方后的值。 [#105495](https://github.com/ClickHouse/ClickHouse/pull/105495) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 修复新 Kafka table engine 中一个罕见问题：在 topic 分区重新分配期间，消息可能会被错误处理，从而在 offset 回滚后可能导致消息被跳过。 [#105500](https://github.com/ClickHouse/ClickHouse/pull/105500) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复当主体为 correlated subquery 的 `MATERIALIZED` CTE 被用作 `IN` 右侧时出现的异常 (`Trying to execute PLACEHOLDER action` logical error) 。现在，这类 CTE 会在分析阶段被拒绝，这与在 `FROM` 中直接引用该 CTE 时对相同模式的处理保持一致。 [#105518](https://github.com/ClickHouse/ClickHouse/pull/105518) ([Groene AI](https://github.com/groeneai)).
* 修复显式指定 format 时未应用 stdout/stdin 压缩的问题。关闭 [#104441](https://github.com/ClickHouse/ClickHouse/issues/104441)。 [#105528](https://github.com/ClickHouse/ClickHouse/pull/105528) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `JSON` 类型在 `singleValueOrNull` 反序列化时出现的段错误。关闭 [#103630](https://github.com/ClickHouse/ClickHouse/issues/103630)。 [#105535](https://github.com/ClickHouse/ClickHouse/pull/105535) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `clickhouse-format --backslash` 静默丢弃 `INSERT` `VALUES` 数据的问题。关闭 [#103533](https://github.com/ClickHouse/ClickHouse/issues/103533)。 [#105536](https://github.com/ClickHouse/ClickHouse/pull/105536) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `variant_throw_on_type_mismatch/dynamic_throw_on_type_mismatch=false` 在函数执行期间未捕获异常的问题。关闭 [#103484](https://github.com/ClickHouse/ClickHouse/issues/103484)。 [#105543](https://github.com/ClickHouse/ClickHouse/pull/105543) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复向 `JSON` 中的 shared data 插入数据时忽略 `input_format_try_infer_datetimes` 的问题。关闭 [#103221](https://github.com/ClickHouse/ClickHouse/issues/103221)。 [#105544](https://github.com/ClickHouse/ClickHouse/pull/105544) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `histogram` 在小规模未排序输入下产生错误结果的问题。关闭 [#103109](https://github.com/ClickHouse/ClickHouse/issues/103109)。[#105548](https://github.com/ClickHouse/ClickHouse/pull/105548) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `JSONExtract` 和文本反序列化中，超出范围的值导致 `DateTime` 回绕的问题。关闭 [#103094](https://github.com/ClickHouse/ClickHouse/issues/103094)。[#105551](https://github.com/ClickHouse/ClickHouse/pull/105551) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复启用 `optimize_trivial_insert_select` 时，table functions 中 insertion table 的使用问题。关闭 [#103083](https://github.com/ClickHouse/ClickHouse/issues/103083)。[#105555](https://github.com/ClickHouse/ClickHouse/pull/105555) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `CASE` 表达式在表达式本身和某个 `WHEN` 值都为 `NULL` 时，返回 `ELSE` 分支而不是匹配的 `THEN` 分支的问题。[#105556](https://github.com/ClickHouse/ClickHouse/pull/105556) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 `replxx` 因触发 `select` 的 `FD_SETSIZE` 限制而导致的崩溃 (现已改为使用 `poll`) 。此前，启用 SSH 或 Web 终端 时，这可能导致 server 崩溃。[#105559](https://github.com/ClickHouse/ClickHouse/pull/105559) ([Azat Khuzhin](https://github.com/azat)) 。
* 在执行表达式前，先在 `executePartitionByExpression` 中物化 subcolumns。关闭 [#103057](https://github.com/ClickHouse/ClickHouse/issues/103057)。[#105573](https://github.com/ClickHouse/ClickHouse/pull/105573) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `TTL` 表达式引用 subcolumn 时触发的 `NOT_FOUND_COLUMN_IN_BLOCK` Exception。[#105578](https://github.com/ClickHouse/ClickHouse/pull/105578) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复一个 server 崩溃 (SIGSEGV) 问题：任何拥有 `CREATE TABLE` 权限的用户，都可通过 HTTP 或 native protocol 发送不带 `ENGINE` clause 的 `CREATE TABLE ... TO INNER UUID '...'` 来触发该问题。相同的 bug 也会导致 client 崩溃。parser 现在会正确报告 `BAD_ARGUMENTS` error，而不是解引用空指针。[#105579](https://github.com/ClickHouse/ClickHouse/pull/105579) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `estimateCompressionRatio` window function 在行与行之间丢失累计数据的问题。关闭 [#101738](https://github.com/ClickHouse/ClickHouse/issues/101738)。[#105581](https://github.com/ClickHouse/ClickHouse/pull/105581) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复向 `String` 列插入同一 VALUES clause 中大小不同的 tuples 时发生的崩溃。关闭 [#101727](https://github.com/ClickHouse/ClickHouse/issues/101727)。[#105582](https://github.com/ClickHouse/ClickHouse/pull/105582) ([Pavel Kruglov](https://github.com/Avogar)) 。
* Hive 分区值提取现在会遵循 `cast_string_to_date_time_mode` setting，并且默认接受 partition key 中带有 timezone 后缀的 ISO 8601 timestamps (例如 `+0000`、`+00:00`、`Z`) 。[#105584](https://github.com/ClickHouse/ClickHouse/pull/105584) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `DateTime` 搭配包含 `NULL` 值的 Timezone 调用 `toString` 时出现的 `NOT_IMPLEMENTED` error。关闭 [#103712](https://github.com/ClickHouse/ClickHouse/issues/103712)。[#105587](https://github.com/ClickHouse/ClickHouse/pull/105587) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复 flattened `Dynamic` 列在 `Native` 反序列化中的 OOB 读取问题。[#105666](https://github.com/ClickHouse/ClickHouse/pull/105666) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了对 `if` 表达式进行查询计划时触发的 `LOGICAL_ERROR` (`Unexpected return type from if`) ：当结果类型为 `Variant`，且第二或第三个分支是一个基于可放入 `Int64` 的 `UInt64` 字面量的常量条件 `if` 时，会出现该问题。关闭 [#105649](https://github.com/ClickHouse/ClickHouse/issues/105649)。[#105680](https://github.com/ClickHouse/ClickHouse/pull/105680) ([Groene AI](https://github.com/groeneai)).
* 修复了在另一个未启用该设置的 writer (例如 `icebergLocal`/`icebergS3` 表函数) 推进表之后，使用 `iceberg_use_version_hint = 1` 读取 Iceberg 表时结果错误的问题。现在只要该文件存在，每个 writer 都会保持 `version-hint.text` 同步，因此后续使用该 hint 的读取器都能看到最新的 snapshot。[#105682](https://github.com/ClickHouse/ClickHouse/pull/105682) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `use_query_condition_cache = 1` (默认) 时，`SELECT` 查询会静默少计数的问题。对带有 bloom-filter 跳过索引的列执行形如 `PREWHERE pk_prefix = X WHERE non_pk IN (...)` 的查询时，会污染 `pk_prefix = X` predicate 对应的 `QueryConditionCache`，从而导致后续正常的 `SELECT count() ... WHERE pk_prefix = X` 返回错误的偏少结果。影响所有 26.x 发行版。[#104781](https://github.com/ClickHouse/ClickHouse/issues/104781)。[#105686](https://github.com/ClickHouse/ClickHouse/pull/105686) ([Groene AI](https://github.com/groeneai)).
* 修复了 `singleValueOrNullMerge` 在合并已经观察到多个不同值的状态时，返回具体值而不是 `NULL` 的问题。[#105734](https://github.com/ClickHouse/ClickHouse/pull/105734) ([Minh Vu](https://github.com/fallintoplace)).
* 修复了 `Template` 输入格式在遇到格式错误的行后进行错误恢复时的问题。[#105735](https://github.com/ClickHouse/ClickHouse/pull/105735) ([Yue Ni](https://github.com/niyue)).
* 修复了 `mongodb` 表函数、MongoDB 存储和 MongoDB 字典源中，当 collection 名称为空或包含 NUL 字节时发生崩溃的问题。[#105776](https://github.com/ClickHouse/ClickHouse/pull/105776) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `Keeper` 在写入失败后的 snapshot 清理问题，使不完整的 snapshot 能被安全清理，并且失败的写入可在不推进 `latest_snapshot_meta` 的情况下重试。[#105779](https://github.com/ClickHouse/ClickHouse/pull/105779) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了显式 `SummingMergeTree` 和 `CoalescingMergeTree` 的 `columns_to_sum` 列不允许执行 `ALTER TABLE ... CLEAR COLUMN` 的问题。[#105785](https://github.com/ClickHouse/ClickHouse/pull/105785) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了在创建数据库名称通过查询参数提供的参数化视图时，`DatabaseCatalog::tryGetDatabase` 中的断言失败问题 (以及在发布构建中由此导致的 `UNKNOWN_DATABASE` 错误) ，例如 `CREATE VIEW {db:Identifier}.v AS SELECT {p:UInt64}`。现在，`CREATE` statement 的 DDL 部分中的参数会在创建时替换，而 SELECT 主体中的参数仍可在调用视图时替换。[#105799](https://github.com/ClickHouse/ClickHouse/pull/105799) ([Groene AI](https://github.com/groeneai)).
* 修复了对 `Nested(... Nullable(Decimal(P, S)))` 列上的 `sumMap` 和 `sumMapWithOverflow` 进行 aggregate state 序列化时 (例如并行副本、通过二进制状态格式说明符的 `sumMapState`、external aggregation) ，出现 `Bad get: has Decimal32, requested Decimal128` 的问题。[#105816](https://github.com/ClickHouse/ClickHouse/pull/105816) ([Groene AI](https://github.com/groeneai)).
* 修复了在表上使用 `apply_mutations_on_fly = 1` 时，如果在 `ALTER MODIFY COLUMN ... LowCardinality(...)` 变更之前，队列中已有待处理的即时 `UPDATE`/`DELETE` 变更，会出现 `Expected ColumnLowCardinality, got String` / `Bad cast from type DB::ColumnString to DB::ColumnLowCardinality` 错误的问题。[#105847](https://github.com/ClickHouse/ClickHouse/pull/105847) ([Raúl Marín](https://github.com/Algunenano)).
* Iceberg 现在会在 `Nullable(T)` 分区列写入时保留 NULL 值。此前，由 ClickHouse 写入的 NULL 在被 Spark 或其他 Iceberg reader 读回时，会显示为内部类型的默认值 (`int` 为 `0`) 。关闭 [#105852](https://github.com/ClickHouse/ClickHouse/issues/105852)。[#105862](https://github.com/ClickHouse/ClickHouse/pull/105862) ([Groene AI](https://github.com/groeneai)).
* 修复了 `Parquet` 和 `ORC` 针对 `IN (subquery)` 谓词的过滤器下推问题，使 row-group/page/bloom-filter 剪枝可用于 `file`、`url`、`s3` 和对象存储读取。[#105863](https://github.com/ClickHouse/ClickHouse/pull/105863) ([Arsen Muk](https://github.com/arsenmuk)).
* 修复了 `Merge` 表的按序读取问题 (在使用新的 analyzer 时) 。[#105867](https://github.com/ClickHouse/ClickHouse/pull/105867) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了 Iceberg v2 merge-on-read position deletes 在单个删除文件引用多个数据文件，且多个此类删除文件同时作用于同一个数据文件时返回错误行的问题。流式 reader (`use_roaring_bitmap_iceberg_positional_deletes = 0`) 现在会在 C++ 中按 `file_path` 过滤删除文件中的行，而不再依赖 Parquet row-group 剪枝，从而恢复 position 递增这一 invariant。[#105888](https://github.com/ClickHouse/ClickHouse/pull/105888) ([Groene AI](https://github.com/groeneai)).
* 修复了新的 analyzer 在分布式查询中使用 `IN Array(...)` 过滤器时出现 `Cannot find column` 错误的问题。[#105894](https://github.com/ClickHouse/ClickHouse/pull/105894) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了在 `MergeTree` 表上执行 `ALTER TABLE ... MODIFY COLUMN ... Nullable(...)` 时可能出现的 SIGSEGV 问题：当带有 `STATISTICS` 的列被另一个 `ALTER` 并发删除时，会触发该问题。关闭 [#105912](https://github.com/ClickHouse/ClickHouse/issues/105912)。[#105917](https://github.com/ClickHouse/ClickHouse/pull/105917) ([Groene AI](https://github.com/groeneai)).
* 修复了一个可能导致服务器崩溃的问题：当通过 postgresql table function、PostgreSQL table engine，或使用 PostgreSQL 源的字典从 PostgreSQL 读取的查询被取消 (例如使用 KILL QUERY) ，且取消远端 PostgreSQL 查询失败时，就可能发生该问题。[#105949](https://github.com/ClickHouse/ClickHouse/pull/105949) ([Rory Shanks](https://github.com/rorylshanks)).
* 修复了 `SYSTEM INSTRUMENT ADD` 的 formatting，使处理器参数之间只用一个空格分隔；同时会拒绝无效的 `SLEEP` instrumentation 参数列表，例如包含超过两个值，或范围中最小值大于最大值的情况。[#105984](https://github.com/ClickHouse/ClickHouse/pull/105984) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了某些查询可能返回错误结果的问题：当查询将外连接与后续引用该外连接 null-supplying side 的内连接组合使用时，join 重排序可能会选出一种执行计划，将内连接条件拉入外连接的 ON 子句中。[#105992](https://github.com/ClickHouse/ClickHouse/pull/105992) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了由于查询中发送了过大的字符串字面量而可能导致崩溃的问题。[#105996](https://github.com/ClickHouse/ClickHouse/pull/105996) ([Nikita Taranov](https://github.com/nickitat)).
* 修复在 `ORDER BY` 中使用排序前缀并启用 `use_with_fill_by_sorting_prefix` 时，配合 `INTERPOLATE ()` (空) 会触发 `INVALID_WITH_FILL_EXPRESSION` 异常的问题。现在会正确地将排序前缀列排除在隐式插值集合之外，与显式指定的 `INTERPOLATE (col)` 行为一致。[#106001](https://github.com/ClickHouse/ClickHouse/pull/106001) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复 `Bool` 分区键的 `ALTER TABLE` 分区操作会静默失败的问题。关闭 [#101722](https://github.com/ClickHouse/ClickHouse/issues/101722)。[#106004](https://github.com/ClickHouse/ClickHouse/pull/106004) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复带默认值的类型化 `JSON` 路径中 `JSONExtractRaw` 和 `JSONHas` 的问题。关闭 [#101721](https://github.com/ClickHouse/ClickHouse/issues/101721)。[#106005](https://github.com/ClickHouse/ClickHouse/pull/106005) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复数据湖配置中为空的 basepath 被错误添加 '/' 前缀的问题。关闭 [#105989](https://github.com/ClickHouse/ClickHouse/issues/105989)。[#106013](https://github.com/ClickHouse/ClickHouse/pull/106013) ([thewisenerd](https://github.com/thewisenerd)).
* 修复 `IcebergLocal` 表引擎在经历 `DETACH` + `ATTACH` 循环或服务器重启后变为只读的问题，这会导致之后每次 `INSERT` 都因 `Local object storage Local is readonly. (READONLY)` 而失败。[#106016](https://github.com/ClickHouse/ClickHouse/pull/106016) ([Groene AI](https://github.com/groeneai)).
* 修复 `Keeper` 在 follower catch-up 期间发生故障的问题：新的请求分发器响应队列可能会在线程启动前就被填满。[#106049](https://github.com/ClickHouse/ClickHouse/pull/106049) ([Antonio Andelic](https://github.com/antonio2368)).
* 改进与旧版 analyzer 的兼容性。如果表中有类似 `x.a Array, x.b Array, x String` 的列，则对 `ARRAY JOIN x` 会优先选择数组。[#106069](https://github.com/ClickHouse/ClickHouse/pull/106069) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复 Azure Blob 存储上的文件系统缓存被静默禁用的问题 (例如 Azure 上的 Delta Lake 表) ，原因是对象元数据中未包含 blob ETag。[#106091](https://github.com/ClickHouse/ClickHouse/pull/106091) ([thewisenerd](https://github.com/thewisenerd)).
* 修复在部分撤销 `SHOW DICTIONARIES` 权限时，`system.dictionaries` 返回 0 行的问题。[#106105](https://github.com/ClickHouse/ClickHouse/pull/106105) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复在启用 `allow_experimental_delta_kernel_rs` 且凭证或选项包含无效字节时，查询 DeltaLake 表会导致服务器崩溃的问题 (Rust FFI 在 `extern "C"` 边界发生 panic) 。[#106109](https://github.com/ClickHouse/ClickHouse/pull/106109) ([Raúl Marín](https://github.com/Algunenano)).
* 修复对 `ORDER BY` 包含单调递减函数 (如 `(c0 / -42)` 或 `intDiv(c0, -42)`) 的表进行查询时结果错误的问题。底层列上的谓词 (例如 `c0 < 0`) 可能会错误地裁剪包含匹配行的粒度，从而导致结果缺失。关闭 [#106084](https://github.com/ClickHouse/ClickHouse/issues/106084)。关闭 [#106124](https://github.com/ClickHouse/ClickHouse/issues/106124)。关闭 [#106080](https://github.com/ClickHouse/ClickHouse/issues/106080)。[#106136](https://github.com/ClickHouse/ClickHouse/pull/106136) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复对在 `MATERIALIZED VIEW` 定义中使用 `WASM` SQL UDF 的支持问题。[#106161](https://github.com/ClickHouse/ClickHouse/pull/106161) ([Yue Ni](https://github.com/niyue)).
* Iceberg 分区剪枝现在可以正确处理 `WHERE partition_col = (SELECT ... FROM ...)` 过滤条件：在这种情况下，analyzer 会将标量子查询结果包装为内部 `_CAST(Const, 'TargetType')`，且源类型与目标类型一致。此前，这类过滤条件会禁用分区剪枝并触发全表扫描。[#106204](https://github.com/ClickHouse/ClickHouse/pull/106204) ([Groene AI](https://github.com/groeneai)).
* 修复了 clickhouse local 的 `--query_id` 参数，使其支持指定自定义 Query id。[#106205](https://github.com/ClickHouse/ClickHouse/pull/106205) ([Yue Ni](https://github.com/niyue)).
* 修复了在 `S3` disks 和 object storage 上，通过分段上传写入对象时忽略 S3 storage class (`s3_storage_class` / `s3_storage_class_name`) 的问题，这会导致大对象以默认的 `STANDARD` 类别创建。现在，对 disks、object storage 和 backups，`s3_storage_class` 与 `s3_storage_class_name` 这两个选项名都可以使用。[#106214](https://github.com/ClickHouse/ClickHouse/pull/106214) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 Keeper 在启动时有时会卡住的问题，该问题会在将 setting `nuraft_max_log_gap_in_stream` 设为非默认值时出现 (默认值为 0，即禁用 `append_entries` requests 的流水线处理) 。[#106220](https://github.com/ClickHouse/ClickHouse/pull/106220) ([Michael Kolupaev](https://github.com/al13n321)).
* 改为在插入时校验损坏的 `DDSketch` aggregate-function state (bin keys) ，不再接受格式错误的数据。[#106236](https://github.com/ClickHouse/ClickHouse/pull/106236) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了当 subqueries 覆盖顺序设置时 coordinator 模式不匹配的问题。[#106243](https://github.com/ClickHouse/ClickHouse/pull/106243) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了以下问题：当通过 `Merge` 表或 `merge` table function 查询 `Distributed` 表，且 predicate 应用于其上层时，`optimize_skip_unused_shards` 不生效 (以及 `force_optimize_skip_unused_shards` 会错误失败) 。[#106250](https://github.com/ClickHouse/ClickHouse/pull/106250) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了在旧 analyzer 下，如果 `ORDER BY` columns 在 `SELECT` 列表中使用了别名，`INTERPOLATE ()` 会抛出 `INVALID_WITH_FILL_EXPRESSION` 的问题。关闭 [#106248](https://github.com/ClickHouse/ClickHouse/issues/106248)。[#106252](https://github.com/ClickHouse/ClickHouse/pull/106252) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复了从 `RowBinary` 输入或 query parameter 反序列化格式错误的 `AggregateFunction(uniqTheta, ...)` state 时会中止的问题。现在，这类错误输入会以明确的 `CORRUPTED_DATA` 被拒绝，而不会以 `std::exception` 形式逃逸并通过 `abortOnFailedAssertion` 中止进程。[#106260](https://github.com/ClickHouse/ClickHouse/pull/106260) ([Groene AI](https://github.com/groeneai)).
* 在 `RowBinaryWithNamesAndTypes` 类型解码期间 (`input_format_binary_decode_types_in_binary_format = 1`) ，现在会拒绝超出范围的 `IntervalKind` 字节，并返回明确的 `INCORRECT_DATA` 错误；不再构造 kind 无效的 `DataTypeInterval`，从而避免后续在哈希路径中触发未定义行为。[#106261](https://github.com/ClickHouse/ClickHouse/pull/106261) ([Groene AI](https://github.com/groeneai)).
* 修复了 `26.1+` 中 `SLRU` 降级失败时的回滚问题。修复了启用 `keep_free_space_ratio` feature 时 `System`/`Data` cache 拆分优先级的问题。[#106286](https://github.com/ClickHouse/ClickHouse/pull/106286) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在 `Nullable(JSON)` 中，将 `null` 子列作为 `JSON` 路径读取，而不是作为 null-map 读取。关闭 [#106085](https://github.com/ClickHouse/ClickHouse/issues/106085)。[#106295](https://github.com/ClickHouse/ClickHouse/pull/106295) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了当 Iceberg REST catalog 包含表时，`RestCatalog::empty` 返回错误结果的问题。[#106301](https://github.com/ClickHouse/ClickHouse/pull/106301) ([Lefteris](https://github.com/LefterisXefteris)) 。
* 修复了在启用 `enable_parallel_replicas`、`query_plan_use_new_logical_join_step` 和 `query_plan_optimize_join_order_algorithm = 'greedy'` 时，左侧 `MergeTree` 表为空的 `INNER JOIN` 查询抛出异常的问题。[#106338](https://github.com/ClickHouse/ClickHouse/pull/106338) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了将非正规 `Float16` 值错误转换为 `Float32` 的问题 (例如从 Numpy `.npy` 文件中读取时) ；其原因是尾数移位差了一位。[#106343](https://github.com/ClickHouse/ClickHouse/pull/106343) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 修复了在基于约束的优化 (`optimize_using_constraints`) 与相关子查询一起使用时，可能导致崩溃和 `NOT_FOUND_COLUMN_IN_BLOCK` 错误的问题。[#106349](https://github.com/ClickHouse/ClickHouse/pull/106349) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在对某一列计算哈希时，如果该列中的数组全部为空且 key 不是常量，`sipHash64Keyed`、`sipHash128Keyed` 和 `sipHash128ReferenceKeyed` 中会发生越界读取的问题。[#106355](https://github.com/ClickHouse/ClickHouse/pull/106355) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `SYSTEM RELOAD CONFIG` 丢弃各 endpoint 的 Azure Blob 存储设置 (例如 `use_native_copy`) 的问题，这会导致在服务器重启前，为 `BACKUP`/`RESTORE` 配置的磁盘设置无法生效。[#106357](https://github.com/ClickHouse/ClickHouse/pull/106357) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复了 `regexpExtract(haystack, pattern)`：当 pattern 不包含 capturing group 时，返回整个匹配结果，而不是抛出 `INDEX_OF_POSITIONAL_ARGUMENT_IS_OUT_OF_RANGE`。[#106374](https://github.com/ClickHouse/ClickHouse/pull/106374) ([Groene AI](https://github.com/groeneai)) 。
* 修复了缓存预下载期间出现的 `LOGICAL_ERROR` 异常，该问题会在远程 S3 对象于列出和读取之间被较短内容覆盖时发生。[#106375](https://github.com/ClickHouse/ClickHouse/pull/106375) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 修复了文件系统缓存中的内存使用量增长问题。[#106387](https://github.com/ClickHouse/ClickHouse/pull/106387) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 Arrow IPC format 读取器 (`ArrowColumnToCHColumn`) 中的多个堆越界读取漏洞。格式错误的 Arrow 文件可能声明的行数超过其缓冲区实际包含的行数，声明与父对象不一致的 list/struct/map 子项长度，提供非单调递增的 list offsets，或截断子项有效性 bitmap，从而导致读取越过 heap allocations 的末尾。任何拥有 `SELECT` 权限的用户都可通过 `file()`、`format()`、表函数或 ArrowFlight 输入触发此问题。现在，在进行任何原始指针访问之前，都会先验证所有 data、offsets、view-struct 和 validity-bitmap 缓冲区，并检查 list/struct/map 的形状和 offsets 是否一致。[#106395](https://github.com/ClickHouse/ClickHouse/pull/106395) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了以下情况下备份因 `FILE_DOESNT_EXIST` 失败的问题：在 Replicated 或 Shared database 中收集可刷新materialized view 的 REPLACE 目标时，如果该 materialized view 尚未在发起备份的副本上实例化，就会出现此问题。[#106411](https://github.com/ClickHouse/ClickHouse/pull/106411) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复一个逻辑错误：当变更 (`DELETE`/`UPDATE`) 的 predicate 包含 `IN`/`EXISTS` 子查询，且该子查询从嵌套在另一个子查询中的默认表表达式读取数据时，会出现 `Column identifier ... is already registered`。[#106414](https://github.com/ClickHouse/ClickHouse/pull/106414) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 JOIN 顺序优化器中的一个逻辑错误 (`Left and right columns have same names`) ：当使用并行副本执行 join，且 join 图中的两个 relation 具有相同的列名时，可能会触发该错误。[#106418](https://github.com/ClickHouse/ClickHouse/pull/106418) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复从包含 `NaN` 或 infinite 点坐标的源数据构建 polygon dictionary 时的一个逻辑错误。现在这类坐标会被明确拒绝，并返回清晰的错误信息。[#106423](https://github.com/ClickHouse/ClickHouse/pull/106423) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复一个 bug：`system.query_log` 的 `used_privileges` 和 `missing_privileges` 列中，可能包含泄露自其他用户、数据库或会话中更早且无关查询的 privilege 字符串。[#106425](https://github.com/ClickHouse/ClickHouse/pull/106425) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `base58Encode`、`base58Decode` 和 `tryBase58Decode` 现在在处理大输入时会遵守 `max_execution_time` 和查询取消，并且会拒绝大于 10 KB 的输入，而不是长时间运行。该限制可通过新设置 `function_base58_max_input_size` 配置 (`0` 表示禁用) 。[#106428](https://github.com/ClickHouse/ClickHouse/pull/106428) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在 `read_in_order_use_virtual_row_per_block = 1` 且 `max_block_size` 较小时，以逆序读取 wide parts 时，`ORDER BY ... DESC` 查询偶发返回错误结果的问题。[#106429](https://github.com/ClickHouse/ClickHouse/pull/106429) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复查询 Iceberg 或 S3 表时出现的 `NOT_FOUND_COLUMN_IN_BLOCK` 异常：在使用 Parquet V3 读取器、且复合 `WHERE` 条件中对一个不在 `SELECT` 列表中的列使用 `IS NOT NULL` 时，会触发该问题。[#106443](https://github.com/ClickHouse/ClickHouse/pull/106443) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 允许用户使用 named collections 为 `HTTPDictionary` 指定 headers。[#106459](https://github.com/ClickHouse/ClickHouse/pull/106459) ([Jan Rada](https://github.com/ZelvaMan)) 。
* 修复一种情况：当 `CurrentThread::attachToGroup` 在执行过程中部分失败后，worker thread 可能仍会附着在一个过期的 thread group 上，导致后续在同一线程上的任务因 `Thread is already attached to a group` 而失败。[#106462](https://github.com/ClickHouse/ClickHouse/pull/106462) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 修复 vector search 查询在使用 vector index、同时使用另一个跳过索引 (如 `minmax`) ，且 `use_skip_indexes_on_data_read = 1` 时出现的异常。[#106473](https://github.com/ClickHouse/ClickHouse/pull/106473) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 现在会校验格式错误的 `Avro` enum 值，并在反序列化损坏的 `Avro` 数据时直接报错并拒绝处理，而不是导致越界读取并中止。[#106476](https://github.com/ClickHouse/ClickHouse/pull/106476) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复在使用 `_file` 或 `_path` 过滤器从 Iceberg tables 读取时，进度报告被夸大的问题。此前，`total_bytes_to_read` 进度会包含清单中的所有文件，而不考虑过滤条件。[#106491](https://github.com/ClickHouse/ClickHouse/pull/106491) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 修复了 Redis 字典在使用 `STORAGE_TYPE 'simple'`、采用 `cache`/`direct` layout 且仅有一个字符串 (复杂) 键时出现的 `Bad cast exception`；这类字典现已可正常工作，而基于 `simple` storage 的复合键现在会报出明确的错误。[#106501](https://github.com/ClickHouse/ClickHouse/pull/106501) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了错误结果问题：对于使用 `ORDER BY f(c0)` 的表，当 `f(const)` 的计算结果为 NaN 时，例如带负常量的 `ORDER BY sqrt(c0)`，`WHERE c0 = const` 会返回空结果。此前主键分析错误地剪枝了每个粒度，并污染了后续查询的 query condition cache。[#106507](https://github.com/ClickHouse/ClickHouse/pull/106507) ([Groene AI](https://github.com/groeneai)).
* 修复了 `LIMIT WITH TIES` 和分数形式的 `LIMIT WITH TIES` 在判定并列时未遵循 `ORDER BY ... COLLATE` 中 collation 规则的问题。按 collation 规则相等的行 (例如 numeric collation 下的 `'1'` 和 `'01'`) 此前是按字节比较的，因此部分并列行会被错误地从结果中丢弃。[#106539](https://github.com/ClickHouse/ClickHouse/pull/106539) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了 `DISTINCT` in order 和 `LIMIT BY` in order optimization (包括负数 `LIMIT BY`) 在输入按带有 collation 的方式排序 (`ORDER BY ... COLLATE`) 时返回错误结果的问题。按 collation 规则相等的行 (例如在不区分大小写的 collation 下的 `'a'` 和 `'A'`) 会按 collation 键排序，因此在值上并不相邻，所以现在使用 collator 时会跳过 in order optimization。[#106564](https://github.com/ClickHouse/ClickHouse/pull/106564) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了针对带有隐式 `_minmax_count_projection`、显式 aggregate projection 或普通 projection 的表执行 `SELECT c, count() FROM t WHERE c GROUP BY c` 时返回错误结果的问题：此前每个分组都会坍缩为一行，带有常量键，计数值则为总行数。[#106590](https://github.com/ClickHouse/ClickHouse/pull/106590) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 bug：当第二个参数是非常量元组时，用户无法在 `IN` 的第一个参数中使用 scalar subqueries。[#106610](https://github.com/ClickHouse/ClickHouse/pull/106610) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了在对 `Memory` engine 执行对每行数据没有实际影响的 `ALTER TABLE <memory_table>` 命令时抛出的异常 `Mutation of `Memory` table produced incomplete output`，具体包括 `APPLY PATCHES`、`APPLY DELETED MASK`、`MATERIALIZE STATISTICS`、`MATERIALIZE INDEX`、`MATERIALIZE PROJECTION` 和 `REWRITE PARTS`。`Memory` 表并不拥有这些结构，因此这类命令现在会被视为 no-op。[#106621](https://github.com/ClickHouse/ClickHouse/pull/106621) ([Groene AI](https://github.com/groeneai)).
* 修复了将 `LowCardinality(DateTime)` 列序列化为 text formats (CSV、TSV、JSONEachRow 等) 时忽略 `session_timezone` 的问题。此前，在某个 server 上首次写入 `LowCardinality(DateTime)` 列后，之后每个写出此类列的查询都会使用首次遇到的 timezone 来渲染 wall-clock 字符串，而不考虑 `session_timezone`。[#106634](https://github.com/ClickHouse/ClickHouse/pull/106634) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一种查询触发的 `LOGICAL_ERROR` "Trying to get name of not a column: `ExpressionList`"：将星号作为 `multiIf` 内的参数传递给 table function 参数，例如 `numbers(multiIf(*, ...), 2)`。现在该查询会以 `UNSUPPORTED_METHOD` 拒绝这个无法解析的 matcher。[#106647](https://github.com/ClickHouse/ClickHouse/pull/106647) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一个问题：当 `MergeTree` 表的某个跳过索引分片粒度为 0，且磁盘上的 marks 文件非空时，服务器启动会失败，并报错 `Too many marks in file ...skp_idx_idx.cmrk4, marks expected 0 (bytes size 0)`。[#106675](https://github.com/ClickHouse/ClickHouse/pull/106675) ([Groene AI](https://github.com/groeneai)).
* 拒绝会在目录列表中导致无限递归的异常 `file` glob pattern。现在强制最大递归深度为 1000；超过该限制的查询会报出 `TOO_DEEP_RECURSION`，而不是因栈溢出导致服务器崩溃。[#106676](https://github.com/ClickHouse/ClickHouse/pull/106676) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一个问题：当 `if`/`multiIf` 条件经常量折叠后变为 `Const(Nullable(Nothing))` 时 (例如对空数组进行越界下标访问，如 `arraySort(x -> x, [])[toNullable(1)]`) ，服务器会在 `FunctionIf::executeForConstAndNullableCondition` 中因 `Bad cast from type DB::ColumnNothing to DB::ColumnVector<char8_t>` 而中止。[#106678](https://github.com/ClickHouse/ClickHouse/pull/106678) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一个问题：当表函数 `input` 被包装在一个在查询中被多处引用的非 MATERIALIZED CTE 中时，会抛出异常 `'Trying to read from input() twice.'`。现在会在规划阶段以明确的 `INVALID_USAGE_OF_INPUT` 错误拒绝该查询。`input` 是一次性的 client 流，在查询计划中只能由单个 source 消费。[#106682](https://github.com/ClickHouse/ClickHouse/pull/106682) ([Groene AI](https://github.com/groeneai)).
* 使 `FORMAT` 也可应用于 `EXPLAIN ... INSERT ... SELECT ... FORMAT ...` 的 `EXPLAIN` 输出，即使 `SETTINGS` 位于 `FORMAT` 之前，或者输出 format 为 `Values`。这是对 [#101772](https://github.com/ClickHouse/ClickHouse/issues/101772) 的后续修复。[#106686](https://github.com/ClickHouse/ClickHouse/pull/106686) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个罕见的误报 `RESOURCE_ACCESS_DENIED` 错误 ("Scheduler queue with resource request is about to be destructed") ：查询实际上已经获得了 workload resource 的访问权限，但由于复用的线程本地 request 对象保留了前一个 request 的失败状态，仍然报错。[#106690](https://github.com/ClickHouse/ClickHouse/pull/106690) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 NATS 库中通过 callbacks 调用 `INATSConsumer::onMsg` 与销毁 `INATSConsumer` 对象之间的竞争条件。[#106692](https://github.com/ClickHouse/ClickHouse/pull/106692) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 `match`、`extract`、`extractAll` 和 `countMatches` 在包含十六进制或八进制转义的 regular expression 中返回错误结果的问题。[#106709](https://github.com/ClickHouse/ClickHouse/pull/106709) ([ofeliacode](https://github.com/ofeliacode)).
* Keeper 的内部 Raft TLS 现在会遵循 `openSSL.client.verificationMode` 设置。此前，无论该设置如何，Keeper 之间 Raft 通信的 peer 证书验证始终处于启用状态，因此 `none` 会被静默忽略。现在，`none` 会显式禁用 Raft peer 证书验证，而未设置该项时则保持此前默认安全的行为。升级后，显式设置 `none` 的配置将停止验证 Raft peer 证书，从而与配置意图保持一致。[#106726](https://github.com/ClickHouse/ClickHouse/pull/106726) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 `SYSTEM RELOAD CONFIG` 中启动 scripts 的 logical error。此外，现在会在 `SYSTEM RELOAD CONFIG` 时加载启动 scripts (当前仅为私有功能) 。[#106727](https://github.com/ClickHouse/ClickHouse/pull/106727) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 回退了一项变更：该变更会使 `sumMap` / `-Map` 组合器拒绝自定义命名的数值类型 (如 `SimpleAggregateFunction(sum, T)` 和 `Bool`) ，并报错 `ILLEGAL_TYPE_OF_ARGUMENT: Values for -Map cannot be summed`，从而破坏了此前可正常工作的聚合计算。[#106729](https://github.com/ClickHouse/ClickHouse/pull/106729) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复了多个可由不可信输入触发的格式读取器中的内存安全和资源耗尽问题：包括原生 Parquet reader 的 `DataPageV2` definition/repetition level-length 处理中的堆越界读取、在具有深度嵌套 schema 的 Parquet files 上出现的栈溢出，以及在解析 GeoParquet WKB/WKT geometry 和 Avro strings/bytes 时忽略 `max_memory_usage` 的 allocations。[#106739](https://github.com/ClickHouse/ClickHouse/pull/106739) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `decodeHTMLComponent` 中的一个 heap buffer overflow (导致 server crash) ：解码包含会展开的 HTML entities `&nGt;` 或 `&nLt;` 的字符串时即可触发，任何用户只需执行一次 `SELECT` 即可利用该问题。[#106741](https://github.com/ClickHouse/ClickHouse/pull/106741) ([Raúl Marín](https://github.com/Algunenano)).
* 对于跳过索引，在 `CREATE TABLE`、`ALTER TABLE ADD INDEX` 和 `CREATE INDEX` 中使用 `GRANULARITY 0` 时，现在会以明确的 `BAD_ARGUMENTS` error 拒绝。此前这会在 debug 构建中触发 `Inconsistent AST formatting` exception。[#106783](https://github.com/ClickHouse/ClickHouse/pull/106783) ([Groene AI](https://github.com/groeneai)).
* 修复了 Azure BACKUP/RESTORE 在旧式 `azure_blob_storage` disk 上忽略端点设置的问题。[#106784](https://github.com/ClickHouse/ClickHouse/pull/106784) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了按 `MinMax` statistics 裁剪 parts 时出现的 `Bad cast` exception：当 key column 为 `LowCardinality`，且 predicate constant 为 `LowCardinality(Nullable(...))` 时会触发该问题。[#106793](https://github.com/ClickHouse/ClickHouse/pull/106793) ([Groene AI](https://github.com/groeneai)).
* 修复了解析过程中发生 exception (即 `MEMORY_LIMIT_EXCEEDED`) 时导致列不一致的问题 (后续会引发 `LOGICAL_ERROR`) 。[#106802](https://github.com/ClickHouse/ClickHouse/pull/106802) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在配置 `keeper_server.http_control.secure_port` 后，server 在向 HTTPS 客户端提供服务时却返回 HTTP 响应的问题。[#106822](https://github.com/ClickHouse/ClickHouse/pull/106822) ([linjiayu1025-collab](https://github.com/linjiayu1025-collab)).
* 修复了 `parseDateTime` 在处理非 ASCII 输入字节时的 logical error。[#106856](https://github.com/ClickHouse/ClickHouse/pull/106856) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `SHOW CREATE ROW POLICY` 输出 `restrictive`/`permissive` 时使用小写而非大写、与其他关键字不一致的问题。[#106865](https://github.com/ClickHouse/ClickHouse/pull/106865) ([Valery Petrov](https://github.com/valerypetrov)).
* 修复了这样一种情况：由于 `UNION` 中存在空表，导致并行副本未能应用到包含 `UNION` 的视图上。[#106900](https://github.com/ClickHouse/ClickHouse/pull/106900) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了在读取截断的 `Protobuf` 数据且 `input_format_allow_errors_num > 0` 时发生的 server crash (SIGSEGV) 。[#106905](https://github.com/ClickHouse/ClickHouse/pull/106905) ([Andrey Tsarevskiy | Андрей Царевский ](https://github.com/atsarevskiy)).
* 修复了分布式查询中的 `THERE_IS_NO_COLUMN` exception：当涉及 `optimize_rewrite_aggregate_function_with_if` optimization，且 aggregate function argument 需要转换为 `Nullable` type 时会触发该问题。[#106908](https://github.com/ClickHouse/ClickHouse/pull/106908) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复了以下异常：当 join key 在 `Tuple`、`Array` 或 `Map` 中嵌套了 `Variant` 或 `Dynamic` 类型，且 join 右侧只有一个 distinct 值时，JOIN 运行时过滤器会触发异常 (`LOGICAL_ERROR`) 。[#106931](https://github.com/ClickHouse/ClickHouse/pull/106931) ([Groene AI](https://github.com/groeneai)).
* 修复了 `arrayLevenshteinDistanceWeighted` 和 `arraySimilarity` 中的有符号整数溢出 (未定义行为) 问题，该问题会在权重数组包含较大整数值时出现。现在，对于整型权重，加权距离会累加到更宽的整数类型中，因此大整数权重不再溢出，并且仍能保持精确。[#106934](https://github.com/ClickHouse/ClickHouse/pull/106934) ([Groene AI](https://github.com/groeneai)).
* 修复了以下服务器崩溃问题 (空指针解引用) ：对 RocksDB 句柄已释放的 `EmbeddedRocksDB` 表执行 `TRUNCATE` 或 `DROP` 时会发生崩溃，例如先前执行过 `TRUNCATE` 导致数据目录被清空的 `read_only` 表。[#106940](https://github.com/ClickHouse/ClickHouse/pull/106940) ([Groene AI](https://github.com/groeneai)).
* 修复了从 `*Cluster` 表函数 (如 `urlCluster`) 读取数据时的异常 (被报告为 `LOGICAL_ERROR` 的 `std::length_error`) ，该问题会在 `max_streams_for_files_processing_in_cluster_functions` 设置过大时出现。现在，流数量会被限制在合理范围内。[#106946](https://github.com/ClickHouse/ClickHouse/pull/106946) ([Groene AI](https://github.com/groeneai)).
* 修复了以下服务器崩溃问题 (`DB::IConnections` 空指针解引用) ：当分布式查询恰好在发送到分片前被取消时，`RemoteQueryExecutor` 会发生崩溃。[#106950](https://github.com/ClickHouse/ClickHouse/pull/106950) ([Groene AI](https://github.com/groeneai)).
* 修复了异步 insert flush (`AsyncInsertFlush`) 查询在 `system.processors_profile_log` 和 `system.query_log` 中 `elapsed_us` 始终为 0，以及 `read_rows`/`read_bytes` 统计偏少的问题。[#106982](https://github.com/ClickHouse/ClickHouse/pull/106982) ([Christoph Wurm](https://github.com/cwurm)).
* 修复了在合并包含 `Variant` 列的已排序块时发生的崩溃 (`Source column is not Map` / `SIGSEGV`) ，该问题会在某个 `Map` 变体的本地存储顺序与全局顺序不一致时出现。[#107011](https://github.com/ClickHouse/ClickHouse/pull/107011) ([Groene AI](https://github.com/groeneai)).
* 修复了向 `ReplicatedMergeTree` 表同步插入时触发的逻辑错误 `conflicted_part_name.has_value()`：当插入块已被完全去重，且冲突分片的去重节点已经被移除时 (例如被并发的 `DROP PARTITION` 删除) ，就会出现该问题。[#107026](https://github.com/ClickHouse/ClickHouse/pull/107026) ([Groene AI](https://github.com/groeneai)).
* 修复了 `INSERT` 时发生的异常 (逻辑错误 `this->visited_views == right->visited_views`) ：当同一源表上的两个 materialized view 写入同一个目标表，且某个依赖视图又读取该目标表时，在启用 `materialized_views_squash_parallel_inserts` 的情况下会出现该问题。[#107027](https://github.com/ClickHouse/ClickHouse/pull/107027) ([Groene AI](https://github.com/groeneai)).
* 修复了 `Block structure mismatch in UnionStep stream` 逻辑错误 (在 debug/sanitizer 构建中会导致服务器中止，在 release 构建中表现为 `Code: 49`) ，该问题发生在 `UNION`/`INTERSECT`/`EXCEPT` 的某个分支以 `Sparse` 序列化形式读取某列，而同级分支将同一列读取为完整形式时 (例如在推送到 materialized view 时) 。[#107041](https://github.com/ClickHouse/ClickHouse/pull/107041) ([Groene AI](https://github.com/groeneai)).
* 修复了向 DeltaLake 表插入数据时出现的 `LOGICAL_ERROR` 异常：当列与其写入 schema 不匹配时 (例如会展平为子列的 `Nested` 列，或显式指定列子集的表函数) ，此类插入现在会返回面向用户的 `INCOMPATIBLE_COLUMNS` error，而不再是 `LOGICAL_ERROR`。关闭了 [#87402](https://github.com/ClickHouse/ClickHouse/issues/87402)。[#107058](https://github.com/ClickHouse/ClickHouse/pull/107058) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ORDER BY <numeric column> ... LIMIT n` 查询中的 `TYPE_MISMATCH` error ("Cannot convert string ... to type ...") ：当 lazy materialization 将另一列排在排序列之前时会触发该问题。现在 top-K threshold 会从正确的排序列中读取。[#107060](https://github.com/ClickHouse/ClickHouse/pull/107060) ([Groene AI](https://github.com/groeneai)).
* 修复了当 `SHOW ROW POLICIES` 或 `SHOW MASKING POLICIES` 后跟 `FORMAT`、`SETTINGS` 或 `INTO OUTFILE` 子句时出现的语法错误 (例如 `SHOW ROW POLICIES FORMAT TabSeparated`) 。[#107061](https://github.com/ClickHouse/ClickHouse/pull/107061) ([Groene AI](https://github.com/groeneai)).
* 修复了复合 `ALTER TABLE ... RENAME COLUMN a TO b, RENAME COLUMN c TO a` 在不同类型的列之间复用已释放列名 (即“交换”) 时的问题。materialized 分片记录了错误的列类型，导致后续 `SELECT` 失败并报出 `Conversion between numeric types and IPv6 is not supported` (或者在 debug 构建中加载分片时中止) 。[#107064](https://github.com/ClickHouse/ClickHouse/pull/107064) ([Groene AI](https://github.com/groeneai)).
* 修复了当边界数组包含 `NaN` 时，`roundDown` 函数结果具有非确定性的问题。相同的输入值可能会因批次中周围的行不同而返回有限边界或 `NaN`。现在会忽略 `NaN` 边界，因此结果只取决于有限边界。[#107065](https://github.com/ClickHouse/ClickHouse/pull/107065) ([Groene AI](https://github.com/groeneai)).
* 修复了 `quantileTDigest` 和 `quantileTDigestWeighted` 在 `Date` 和 `DateTime` argument 上，当插值后的 quantile 为小数但仍在范围内时抛出 `DECIMAL_OVERFLOW` 的问题 (例如 `quantileTDigestWeighted(date, weight)` 用于所有值都适配该类型的情况) 。现在小数结果会被截断为结果类型，与 `quantilesTDigestWeighted` 保持一致；真正超出范围的值仍会抛出 error。关闭了：[#106722](https://github.com/ClickHouse/ClickHouse/issues/106722)。[#107066](https://github.com/ClickHouse/ClickHouse/pull/107066) ([Groene AI](https://github.com/groeneai)).
* 修复了 `trimLeft`、`trimRight` 和 `trimBoth` (以及别名 `ltrim`、`rtrim`、`trim`) 在自定义 trim character set 长度超过 16 个字符时抛出 `TOO_LARGE_STRING_SIZE` 的问题。现在再次支持任意长度的 trim 集合。[#107071](https://github.com/ClickHouse/ClickHouse/pull/107071) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复了 `Enum8`/`Enum16` 类型定义中超出范围的整数值被静默截断的问题。`Enum8('a' = 200)` 现在会抛出 `ARGUMENT_OUT_OF_BOUND`，而不是静默创建 `Enum8('a' = -56)`。[#107081](https://github.com/ClickHouse/ClickHouse/pull/107081) ([Groene AI](https://github.com/groeneai)).
* 修复了多列 `ORDER BY ... LIMIT` 查询在按 `Nullable` 列排序时、当多行在前导列上并列时出现的行顺序错误问题 (以及 debug 构建中的 `LOGICAL_ERROR` "Rows are not sorted with permutation") 。[#107094](https://github.com/ClickHouse/ClickHouse/pull/107094) ([Groene AI](https://github.com/groeneai)).
* 修复在对通过基于 `Dynamic` 的 JOIN 构造出的 `Dynamic` 列执行函数时出现的 `LOGICAL_ERROR` (`Expected the argument N to have X rows, but it has Y`) 问题 (例如 `RIGHT`/`FULL JOIN` 中未匹配到的行，或被去关联改写为 join 的相关 `EXISTS` 子查询) 。[#107095](https://github.com/ClickHouse/ClickHouse/pull/107095) ([Groene AI](https://github.com/groeneai)).
* 修复配置重载时误重新创建 ZooKeeper 会话的问题。[#107096](https://github.com/ClickHouse/ClickHouse/pull/107096) ([Azat Khuzhin](https://github.com/azat)).
* 修复在刷新访问 entities 时，在 ZooKeeper 读取期间一直持有互斥锁的问题。[#107097](https://github.com/ClickHouse/ClickHouse/pull/107097) ([Azat Khuzhin](https://github.com/azat)).
* 修复向 `MergeTree` 表执行 `INSERT` 时，如果 `adaptive_write_buffer_initial_size` 设置得过大，会触发 `Logical error: Too large size passed to allocator` 异常的问题。现在自适应写入缓冲区的初始大小会被限制为不超过缓冲区最大值。[#107104](https://github.com/ClickHouse/ClickHouse/pull/107104) ([Groene AI](https://github.com/groeneai)).
* 修复当包含 `LowCardinality` 成员的 `Variant` 常量与键列比较时出现的 `LOGICAL ERROR` (`Bad cast from type DB::ColumnString to DB::ColumnLowCardinality`) 问题；其中该键列的键表达式是非单调确定性函数 (例如基于 `sipHash64(col)` 的 `minmax` 跳过索引) 。[#107111](https://github.com/ClickHouse/ClickHouse/pull/107111) ([Groene AI](https://github.com/groeneai)).
* 修复当限定 asterisk (`t.*`) 作用于 `JOIN ... USING` 键并传给 aggregate function，且 OUTER JOIN 另一侧的键为 `Nullable` (并且 `join_use_nulls = 0`) 时出现的 `Bad cast from type DB::IColumn const* to DB::ColumnNullable const*` logical error。[#107129](https://github.com/ClickHouse/ClickHouse/pull/107129) ([Groene AI](https://github.com/groeneai)).
* 修复 `ALTER TABLE ... ON CLUSTER` 批处理中混用 `MODIFY SETTING`/`RESET SETTING` 与注释变更 (例如 `MODIFY COMMENT 'x', MODIFY SETTING old_parts_lifetime = 123`) 时，只会应用到 leader 副本、导致其他副本状态不一致的问题。同时还修复了将带位置参数或按列 `SETTINGS` 的 `MODIFY COLUMN ... COMMENT` 误判为仅本地注释元数据变更的问题；这会导致列重排未写入 replicated metadata，并可能在副本重启时引发 `INCOMPATIBLE_COLUMNS`。[#107142](https://github.com/ClickHouse/ClickHouse/pull/107142) ([Groene AI](https://github.com/groeneai)).
* 修复当限定星号匹配器 (例如 `x.*`) 在自身递归项中按名称引用递归 CTE 时触发的 `LOGICAL_ERROR` ("Table expression ... data must be initialized") 。现在，这类匹配器会像该位置上的限定列 (`x.a`) 或非限定匹配器 (`*`) 一样，展开递归表的列。[#107144](https://github.com/ClickHouse/ClickHouse/pull/107144) ([Groene AI](https://github.com/groeneai)).
* 修复查询条件缓存导致返回错误查询结果的问题：当即时变更 (`apply_mutations_on_fly`) 或补丁分区片段在 `PREWHERE` 之前过滤行时，就会出现该问题。使用 `apply_mutations_on_fly = 1` 读取的查询可能会污染缓存，导致后续使用 `apply_mutations_on_fly = 0` 且具有相同 predicate 的查询跳过本应读取的 marks，从而返回过少的行。同一修复也涵盖行级安全策略，这些策略会作为 `PREWHERE` 之前的过滤器 预先添加：在受限行策略下运行的查询，可能会污染后续未使用该策略但使用相同 predicate 的查询缓存。[#107145](https://github.com/ClickHouse/ClickHouse/pull/107145) ([Groene AI](https://github.com/groeneai)).
* 修复了从 `BACKUP` 到 `AzureBlobStorage` 的复制问题：在备份内复制数据文件时，目标对象会被写到备份目录之外。现在，对 `S3` 目标端中 Backup 对象是否存在的检查改为使用精确的 `HeadObject` 请求，而不是按前缀列举，从而避免将前缀相似的键误判为匹配。[#107153](https://github.com/ClickHouse/ClickHouse/pull/107153) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了 `quantileExactExclusive`、`quantilesExactExclusive`、`quantileExactInclusive` 和 `quantilesExactInclusive` 中的有符号整数溢出问题；当 `Int64` 输入跨度很大时，该问题可能导致结果错误。[#107154](https://github.com/ClickHouse/ClickHouse/pull/107154) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 `LOGICAL_ERROR` ("Unexpected exception in refresh scheduling") ：当可刷新materialized view 存在 `REFRESH ... DEPENDS ON <name>` 依赖，且其非限定名称与某个临时表或 CTE 名称匹配时，重启后该错误可能导致服务器进入崩溃循环。[#107156](https://github.com/ClickHouse/ClickHouse/pull/107156) ([Groene AI](https://github.com/groeneai)).
* 确保在重新加载配置时不会运行启动脚本，因为这在语义上是错误的，也不符合用户预期——并且已知容易引发错误。[#107187](https://github.com/ClickHouse/ClickHouse/pull/107187) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 限制预留时 `queue_size` 的最大值。[#107205](https://github.com/ClickHouse/ClickHouse/pull/107205) ([Elian Gidoni](https://github.com/eliangidoni)).
* 修复了在启用 `group_by_use_nulls` 设置时，使用 `grouping` 函数的查询会报出 `Argument ... of GROUPING function is not a part of GROUP BY clause` 错误的问题。[#107206](https://github.com/ClickHouse/ClickHouse/pull/107206) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了在启用 `optimize_read_in_order` 且由于 `max_streams_for_union_step` 设置导致 union pipeline 被收窄时，`UNION ALL` 上 `ORDER BY` 的结果顺序不正确的问题；现在，如果执行计划依赖已排序的 UNION 输出流，则会跳过收窄。关闭 [#106880](https://github.com/ClickHouse/ClickHouse/issues/106880)。[#107208](https://github.com/ClickHouse/ClickHouse/pull/107208) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在服务器后期关闭阶段解析代理配置时，可能发生的空指针解引用问题。[#107231](https://github.com/ClickHouse/ClickHouse/pull/107231) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了在非复制表 `MergeTree` 表上启用旧版并行副本时，lightweight `UPDATE` 查询的问题。[#107246](https://github.com/ClickHouse/ClickHouse/pull/107246) ([Groene AI](https://github.com/groeneai)).
* 修复了向 `Iceberg` 表执行 insert 时服务器异常中止的问题 (`std::out_of_range` logical error) ：当其写入块的列名与最新 schema 的字段 id 不匹配时 (例如在 `iceberg_metadata_staleness_ms` 窗口内，并发写入方重命名了某一列之后) ，会触发该问题。现在，insert 会以明确的查询错误失败，而不会导致服务器崩溃。[#107279](https://github.com/ClickHouse/ClickHouse/pull/107279) ([Groene AI](https://github.com/groeneai)).
* 修复了 `server` 和 `local` 在关闭时卡住的问题：如果 `max_*_thread_pool_free_size > 0`，静态线程池会无限期保留空闲线程。[#107291](https://github.com/ClickHouse/ClickHouse/pull/107291) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 `s3` table function 会静默忽略小写位置参数 `partition_strategy` (例如 `hive`) 的问题。[#107297](https://github.com/ClickHouse/ClickHouse/pull/107297) ([Julia Kartseva](https://github.com/jkartseva)).
* 修复了并行块编组中 `low_cardinality_allow_in_native_format=0` 的处理问题。[#107319](https://github.com/ClickHouse/ClickHouse/pull/107319) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在启用 `use_skip_indexes_for_top_k` 优化，并且排序列所在的某个 part 带有 `minmax` 跳过索引、且其中部分行已通过 lightweight `DELETE` 删除时，`ORDER BY <col> LIMIT n` 返回错误结果 (通常为空) 的问题。现在，该优化不会再将经过 lightweight 删除的 part 的过期 minmax 排在包含有效 top 行的 part 之前。[#107320](https://github.com/ClickHouse/ClickHouse/pull/107320) ([Groene AI](https://github.com/groeneai)).
* 修复了 ClickHouse Keeper 中的一个 bug：通过 `last_snapshot` (以及 `mntr` 中的 `zk_latest_snapshot_size`) 报告的 snapshot metadata，在安装过期或重复的 snapshot 后可能会回退；这还可能导致同一索引的本地 snapshot 在仍向对等节点流式传输或上传到 S3 时，原地覆盖已注册的 snapshot file。[#107321](https://github.com/ClickHouse/ClickHouse/pull/107321) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了读取深度嵌套的 schema 或 `MsgPack`、`BSON`、`ORC`、`Parquet`、`JSON`、`DeltaLake`、`Iceberg` 和 `Paimon` formats 中的值时，可能发生的 server 栈 overflow (崩溃) 问题。现在，这类深度嵌套的输入会被直接拒绝，并抛出异常。[#107341](https://github.com/ClickHouse/ClickHouse/pull/107341) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `SYSTEM SYNC DATABASE REPLICA ... STRICT` 中可能出现的 logical error，并使 `STRICT` modifier 真正对 database replicas 生效。[#107344](https://github.com/ClickHouse/ClickHouse/pull/107344) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了在 debug/sanitizer 构建中读取 `DeltaLake` 表时 server 异常中止的问题：当 ClickHouse schema 中声明了 Delta 列映射中不存在的列时 (例如某列已在 Delta log 中被重命名或删除) ，就会触发该问题。现在，这类查询会改为失败并返回可捕获的 `INCORRECT_DATA` 错误。[#107347](https://github.com/ClickHouse/ClickHouse/pull/107347) ([Groene AI](https://github.com/groeneai)).
* 修复了当填充列之前的某个 `ORDER BY` 列使用 `COLLATE` collation 时，`ORDER BY ... WITH FILL` 会生成额外行的问题。现在会使用该 collation 按 sorting prefix 对行进行分组，与 sort order 保持一致。[#107365](https://github.com/ClickHouse/ClickHouse/pull/107365) ([Groene AI](https://github.com/groeneai)).
* 修复了读取 Iceberg table 时的崩溃问题 (在 debug 构建中表现为 `LOGICAL_ERROR`) 以及静默产生错误结果的 bug (在 release 构建中) ：当其 metadata 在不同 metadata 版本之间将现有 `schema-id` 重新绑定到不同的 schema 时，就会出现该问题。现在，这类 metadata 会因 `ICEBERG_SPECIFICATION_VIOLATION` 而被拒绝。[#107370](https://github.com/ClickHouse/ClickHouse/pull/107370) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一种 `LOGICAL_ERROR` (`Variant N (T) has size X, but expected Y`) ：当 `toString` 或 `concat` 等函数应用于 `Variant` 或 `Dynamic` 列，且该列包含单个非空 variant 和若干 NULL，同时函数原样返回其输入列时，就会触发该错误。[#107374](https://github.com/ClickHouse/ClickHouse/pull/107374) ([Groene AI](https://github.com/groeneai)).
* 修复了并行副本场景下可能出现的 `Logical error: 'Duplicate announcement received for replica number N'`：当某个 scalar subquery 包含读取同一表的嵌套 subqueries 时，就可能触发该问题。[#107381](https://github.com/ClickHouse/ClickHouse/pull/107381) ([Groene AI](https://github.com/groeneai)).
* 修复了 `getServerSetting`，使其对可在 runtime 中修改的 server settings (如 `max_server_memory_usage`、`mark_cache_size`、`max_concurrent_queries`、thread pool 大小等) 返回当前实际生效的值，与 `system.server_settings` 报告的内容保持一致。[#107388](https://github.com/ClickHouse/ClickHouse/pull/107388) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `arrayResize` 使用 `Decimal` 类型的大小参数时的问题：现在会按其实际值解释大小 (例如 `arrayResize([1, 2, 3], 1.5::Decimal(2, 1))` 返回 1 个元素) ，而不是按原始未缩放表示来解释。[#107389](https://github.com/ClickHouse/ClickHouse/pull/107389) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在启用 `use_strict_insert_block_limits` 时，向 `Alias` 表执行异步 `INSERT` 会触发 `LOGICAL_ERROR` (`block.rows() == getRows()`) 的问题。[#107400](https://github.com/ClickHouse/ClickHouse/pull/107400) ([Groene AI](https://github.com/groeneai)).
* 修复一个逻辑错误 (`Unexpected return type from equals. Expected Nullable(UInt8). Got UInt8`) ：当析取 (部分谓词) 下推优化把条件下推到一个因 JOIN 而扩宽类型的 `USING` 键上时会触发。还修复了解析器中的 server 崩溃 (段错误) ：在解析 `JOIN ... USING` 查询中的标识符时，如果查询中包含引用未知标识符且可做常量折叠的 `if`/`multiIf` 分支，就会发生该问题。[#107407](https://github.com/ClickHouse/ClickHouse/pull/107407) ([Groene AI](https://github.com/groeneai)).
* 修复了 `windowFunnel` 中的堆缓冲区溢出 (server 崩溃) 问题：使用超出范围的事件类型完成一个精心构造的聚合函数状态时会触发，任何用户只需一次 `SELECT` 即可触达该路径。[#107412](https://github.com/ClickHouse/ClickHouse/pull/107412) ([uwezkhan](https://github.com/uwezkhan)).
* 修复了一个未定义行为：当把非有限浮点值 (如 `nan` 或 `inf`) 作为 `prometheusQuery` / `prometheusQueryRange` table functions 的 timestamp/duration 参数传入时会发生。现在这类参数会报出 `BAD_ARGUMENTS`，而不是生成无效的 timestamp。[#107417](https://github.com/ClickHouse/ClickHouse/pull/107417) ([Groene AI](https://github.com/groeneai)).
* 修复 `MaterializedPostgreSQL` 在 PostgreSQL 数据库名或表名包含大写字母时，会静默停止复制变更的问题 (`pgoutput` 消费者请求了一个未加引号且被转换为小写的 publication 名称，因此与保留大小写的 publication 不匹配) 。[#107423](https://github.com/ClickHouse/ClickHouse/pull/107423) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复一个异常 (`Logical error: Not-ready Set is passed as the second argument for function 'in'`) ：当某个键表达式 (`ORDER BY`、`PRIMARY KEY`、`PARTITION BY` 或 skip `INDEX`) 包含右侧为表的 `IN` operator 时会触发，例如 `ORDER BY (x IN some_table)`。现在这类键表达式会在建表时被拒绝。[#107424](https://github.com/ClickHouse/ClickHouse/pull/107424) ([Groene AI](https://github.com/groeneai)).
* 修复 `optimize_rewrite_aggregate_function_with_if` 优化对保留 `NULL` 载荷值的 aggregate functions 产生错误结果的问题 (即 `*_respect_nulls` 系列：`anyRespectNulls`、`first_value_respect_nulls`、`anyLast_respect_nulls`、`last_value_respect_nulls`) 。现在对于这类函数，该优化不再将 `f(if(cond, x, NULL))` Rewrite 为 `-If` 形式。[#107430](https://github.com/ClickHouse/ClickHouse/pull/107430) ([Groene AI](https://github.com/groeneai)).
* 修复在列出本地磁盘 object storage 目录 (例如 `local` disk 上的 Iceberg 表) 时，文件正被并发替换会导致误报 `filesystem error: in last_write_time: No such file or directory` 异常的问题。现在，并发删除的条目会在列表结果中被忽略，而不是导致列出操作中止。[#107432](https://github.com/ClickHouse/ClickHouse/pull/107432) ([Groene AI](https://github.com/groeneai)).
* 修复在 `optimize_if_transform_strings_to_enum = 1`，且优化后的基于字符串字面量的 `if`/`transform` 表达式作为 Distributed 表或并行副本上的 `GROUP BY` 或 `ORDER BY` 键时出现的 `THERE_IS_NO_COLUMN` 错误。[#107455](https://github.com/ClickHouse/ClickHouse/pull/107455) ([Groene AI](https://github.com/groeneai)).
* 修复了 `DISTINCT` 处理过程中的一个罕见服务器崩溃问题：在初始化 distinct 键集合时，如果发生 allocation 失败 (例如触及 memory limit) ，就可能触发该问题。[#107467](https://github.com/ClickHouse/ClickHouse/pull/107467) ([Groene AI](https://github.com/groeneai)).
* 修复了在表上使用 `apply_mutations_on_fly = 1` 时出现的 `LOGICAL_ERROR: Unexpected return type from materialize` (以及类似的类型不匹配错误) ：如果存在一个待处理的即时 `UPDATE`，并且其目标列在更早的即时 `UPDATE` 中也被作为函数输入读取，且这一切发生在 `ALTER MODIFY COLUMN ... LowCardinality(...)` 变更之前，就会触发该问题。[#107475](https://github.com/ClickHouse/ClickHouse/pull/107475) ([Groene AI](https://github.com/groeneai)).
* 修复了通过 `S3` 读取 `DeltaLake` 表时 AWS STS credentials 过期的问题：现在，该 engine 在刷新快照时会保留使用最新 credentials 的 `S3` client，因此长时间运行的读取在 STS token's TTL 到期后不再失败。STS assume-role credentials provider 现在也会对任何通过 STS 访问 `S3` 的场景正确处理 credential 刷新。[#107480](https://github.com/ClickHouse/ClickHouse/pull/107480) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 修复了在通过 `CREATE TABLE ... CLONE AS`、`ATTACH PARTITION ... FROM` 或 `MOVE PARTITION ... TO TABLE` 将分片从普通 `MergeTree` 引入 `ReplacingMergeTree`、`SummingMergeTree` 或 `AggregatingMergeTree` 后，`SELECT ... FINAL` 和 `OPTIMIZE TABLE ... FINAL` 返回 duplicate rows 的问题。现在，当源 engine 与目标端 engine 不同时，引入分片的合并级别会重置为 0，这样目标端会在下一次 merge 时对其去重。[#107481](https://github.com/ClickHouse/ClickHouse/pull/107481) ([Groene AI](https://github.com/groeneai)).
* 修复了 PostgreSQL wire protocol parser 中的一个整数 underflow 问题：当消息的长度字段小于 4 时，会导致 `size - 4` 回绕，并产生过大的 `resize`/`ignore`。[#107485](https://github.com/ClickHouse/ClickHouse/pull/107485) ([uwezkhan](https://github.com/uwezkhan)).
* 现在，在 ReplicatedMergeTree 中等待 quorum 时，对查询取消的跟踪更加完善了。[#107513](https://github.com/ClickHouse/ClickHouse/pull/107513) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了查询带有 `PARTITION BY` 键的表时出现的 `Not-ready Set is passed as the second argument for function 'in'` (`LOGICAL_ERROR`) 问题；当 `IN`/`NOT IN` 子查询被包裹在更大的 expression 中时，例如 `WHERE (c0 IN (SELECT ...)) != 0`，就会触发该问题。[#107515](https://github.com/ClickHouse/ClickHouse/pull/107515) ([Groene AI](https://github.com/groeneai)).
* 修复了 `currentUser()`、`user()`、`SESSION_USER` 和 `authenticatedUser()` 在 asynchronous insert 刷新路径上 (即 `async_insert = 1` 时) 求值为空字符串的问题。这会影响引用这些函数的 `DEFAULT`/`MATERIALIZED` 列 expressions 和 materialized views；此前它们会静默存储空字符串，而不是执行 inserting 的用户。[#107541](https://github.com/ClickHouse/ClickHouse/pull/107541) ([Groene AI](https://github.com/groeneai)).
* 在 `enable_analyzer = 1` (默认值) 时，如果按裸名称查询某个表，而该表实际上只存在于另一个数据库中，现在会提示正确的 right table，例如 `SELECT * FROM functions` 会报告 `Maybe you meant system.functions?`。此前，新的 analyzer 只会给出不带提示的 `Unknown table expression identifier` error，而旧的 analyzer 已经能够提供这个有用的建议。[#107550](https://github.com/ClickHouse/ClickHouse/pull/107550) ([Groene AI](https://github.com/groeneai)).
* 现在会将 rapidjson 库 (在 `prettyPrintJSON`、`JSONMergePatch` 和 rapidjson JSON parser 中) 使用的内存计入 memory tracker，因此异常输入会以 `MEMORY_LIMIT_EXCEEDED` 被拒绝，而不是无限制地持续分配内存。[#107555](https://github.com/ClickHouse/ClickHouse/pull/107555) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在启用 `optimize_prewhere_after_pushdown` 时，查询 `file()`、`url()` 或对象存储 source 且同时使用显式 `PREWHERE` 和 `WHERE` 时触发的 `LOGICAL_ERROR` (`updateFormatPrewhereInfo called more than once`) 。[#107568](https://github.com/ClickHouse/ClickHouse/pull/107568) ([Groene AI](https://github.com/groeneai)).
* 修复了在本地执行 distributed query plan (`make_distributed_plan` + `distributed_plan_execute_locally`) 且 `log_formatted_queries = 1` 时可能发生的崩溃 (空指针解引用) 。[#107570](https://github.com/ClickHouse/ClickHouse/pull/107570) ([Groene AI](https://github.com/groeneai)).
* 修复了在清理 distributed-plan 查询 (`make_distributed_plan = 1`) 期间发生的 server 中止问题 (`std::terminate`，信号 6) ：当 worker 状态检查未能重新调度下一次检查时 (例如关闭期间出现 `CANNOT_SCHEDULE_TASK` 或 `MEMORY_LIMIT_EXCEEDED`) 。现在查询会正常失败，server 会继续运行。[#107575](https://github.com/ClickHouse/ClickHouse/pull/107575) ([Groene AI](https://github.com/groeneai)).
* 在 Elf 和 DWARF 解析中补充了缺失的 bounds 检查。[#107579](https://github.com/ClickHouse/ClickHouse/pull/107579) ([Michael Kolupaev](https://github.com/al13n321)).
* 在 ORC 读取器中补充了缺失的 bounds 检查。[#107580](https://github.com/ClickHouse/ClickHouse/pull/107580) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了在 `Replicated` database 中，对包含 `TimeSeries` 表的对象执行 `RENAME TABLE`、`RENAME DATABASE` 或 `CREATE OR REPLACE TABLE` 时可能发生的异常 (`Digest does not match` logical error) 。现在已支持重命名 `TimeSeries` 表。[#107583](https://github.com/ClickHouse/ClickHouse/pull/107583) ([Groene AI](https://github.com/groeneai)).
* 修复了 MySQL protocol 端口上一个未经身份验证即可触发的内存耗尽型拒绝服务问题。[#107599](https://github.com/ClickHouse/ClickHouse/pull/107599) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `Replicated` database 中 `TimeSeries` 表的 `DROP TABLE` 问题；此前该操作会泄漏内部表，并导致后台 drop task 无限重试 (`DROP TABLE ... SYNC` 会一直挂起) 。[#107604](https://github.com/ClickHouse/ClickHouse/pull/107604) ([Groene AI](https://github.com/groeneai)).
* 修复了 replicated part 拉取 protocol 中的两个路径遍历问题，这些问题可能允许恶意副本将文件写入 part directory 之外。[#107606](https://github.com/ClickHouse/ClickHouse/pull/107606) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了通过 Azure 读取 Delta Lake table 时出现的 'Account must be specified error' 问题。[#107620](https://github.com/ClickHouse/ClickHouse/pull/107620) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复了普通 `MergeTree` 表上的 `ALTER TABLE ... REPLACE PARTITION` 在 server 重启后会让被替换掉的分片重新出现的问题，导致该表同时返回替换后的行和过期的旧行。[#107623](https://github.com/ClickHouse/ClickHouse/pull/107623) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用 `enable_analyzer = 0` 运行查询时，读取目标为 `Distributed` 表的 materialized view 会导致 server 崩溃的问题。[#107653](https://github.com/ClickHouse/ClickHouse/pull/107653) ([Groene AI](https://github.com/groeneai)).
* 当同一用户或角色被分配了多个 quotas 时，现在会同时对所有 quotas 生效 (只要其中任意一个超限，查询就会被拒绝) ，而不再只是以非确定性方式选择并执行其中一个 quota。`SHOW QUOTA` 和 `system.quota_usage` 现在会显示对 current user 生效的所有 quotas。[#107664](https://github.com/ClickHouse/ClickHouse/pull/107664) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当键值参数重复时，`s3` 和其他 object storage 表函数抛出 `LOGICAL_ERROR` 而不是 `BAD_ARGUMENTS` 的问题，例如 `s3('http://...', format = 'CSV', format = 'TSV')`。 [#107670](https://github.com/ClickHouse/ClickHouse/pull/107670) ([Groene AI](https://github.com/groeneai)).
* 修复了 MySQL interface 在 `MySQL Connector/J` 8.2.0 及更高版本 (包括 9.x) 中无法使用的问题。`OK` 数据包的 `info` 字段现在改为长度编码，与 MySQL 服务器保持一致，因此 JDBC 驱动现已可以连接。 [#107693](https://github.com/ClickHouse/ClickHouse/pull/107693) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当带有 `make_distributed_plan = 1` 的查询在函数包装的键上进行 join，且两侧没有共同类型时出现的 `LOGICAL_ERROR` ("Input nodes size mismatch in dag") 问题 (例如右侧键为 `UInt64` 时，使用 `ON intDiv(-1, t1.key) = t2.key`) 。 [#107701](https://github.com/ClickHouse/ClickHouse/pull/107701) ([Groene AI](https://github.com/groeneai)).
* 读取由 Apache Arrow Java \< 19.0.0 (包括 Apache Spark) 生成的、含有空 `String`/`Binary` 列的 Arrow/ArrowStream 数据时，不再抛出 `INCORRECT_DATA`。 [#107764](https://github.com/ClickHouse/ClickHouse/pull/107764) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `countmin` 列统计信息估算中的 `BAD_GET` 异常 ("Bad get: has String, requested UInt64") ：当查询将某列与一个未预先强制转换且类型不同的 literal 进行比较时，例如 `numeric_col IN (SELECT '5')` 或 `string_col IN (SELECT 5)`。 [#107793](https://github.com/ClickHouse/ClickHouse/pull/107793) ([Groene AI](https://github.com/groeneai)).
* 修复了在推断远程表结构期间，如果 bridge 失去响应，`odbc` 和 `jdbc` 表函数会卡住数分钟并忽略查询取消 (`KILL QUERY`、`max_execution_time`) 的问题。 [#107809](https://github.com/ClickHouse/ClickHouse/pull/107809) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在格式化格式错误的查询时出现的异常 (`Logical error: 'index >= result.start'`) ：该查询混用了 `s3`/`gcs` 表函数 secret 参数的按位置和按名称两种写法，例如 `s3('url', 'a', 'b', secret_access_key = 'c')`。 [#107818](https://github.com/ClickHouse/ClickHouse/pull/107818) ([Groene AI](https://github.com/groeneai)).
* 修复了 Set 跳过索引在 `LowCardinality` 列上无法剪枝粒度的问题。 [#107868](https://github.com/ClickHouse/ClickHouse/pull/107868) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了在 server setting `insert_deduplication_version = new_unified_hash` 下，insert deduplication 对 `String` 和 `Array` 列计算出错误哈希的问题：相同的 inserts 可能无法去重，因为去重哈希依赖于该行在插入块中的位置。 [#107915](https://github.com/ClickHouse/ClickHouse/pull/107915) ([Sema Checherinda](https://github.com/CheSema)).
* 修复了在 macOS (Apple Silicon) 上，对 `Nullable` 列使用多个排序键执行 `ORDER BY` 时结果不正确的问题，原因是 JIT-compiled 排序比较器中缺少符号扩展。 [#107973](https://github.com/ClickHouse/ClickHouse/pull/107973) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了使用多个 threads 读取 `Dynamic` 列时的性能回退问题。由 [#100730](https://github.com/ClickHouse/ClickHouse/pull/100730) 引入。关闭 [#107942](https://github.com/ClickHouse/ClickHouse/issues/107942)。 [#107997](https://github.com/ClickHouse/ClickHouse/pull/107997) ([Pavel Kruglov](https://github.com/Avogar)).
* 已弃用的数据湖设置 `storage_catalog_url` 现在会被 catalog guard 正确拦截 (此前只检查 `storage_catalog_type` 和 `storage_aws_access_key_id`) ，而且错误消息会列出所有已弃用的设置。[#108040](https://github.com/ClickHouse/ClickHouse/pull/108040) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当 `LIKE` 查询通过 direct-read 回退路径从 `text` 索引读取以稀疏方式存储的列时，出现的 `Bad cast from type DB::ColumnSparse to DB::ColumnVector<char8_t>` logical error。[#108068](https://github.com/ClickHouse/ClickHouse/pull/108068) ([Groene AI](https://github.com/groeneai)).
* 即使批次为空，也始终运行访问缓存的批次完成 handlers。[#108124](https://github.com/ClickHouse/ClickHouse/pull/108124) ([Azat Khuzhin](https://github.com/azat)).
* 修复了某些包含 `UNION ALL` 的查询中的 `LOGICAL_ERROR` (`Column identifier is already registered`) 。[#100770](https://github.com/ClickHouse/ClickHouse/pull/100770) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 server 关闭期间 workload storage mutex 的 use-after-free 问题。[#101447](https://github.com/ClickHouse/ClickHouse/pull/101447) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了 `Shared` catalog 中 `ALTER DATABASE MODIFY COMMENT` 的死锁问题。[#103683](https://github.com/ClickHouse/ClickHouse/pull/103683) ([Nikolay Degterinsky](https://github.com/evillique)).
* 空的 Unicode 引号标识符现在会引发 `SYNTAX_ERROR`，而不再是 `CANNOT_PARSE_QUOTED_STRING`。[#104173](https://github.com/ClickHouse/ClickHouse/pull/104173) ([leonard9893](https://github.com/leonard9893)).
* 保留 `timeSeries*` 聚合函数的原始 parameter 类型，以确保 `AggregateFunction` type 在表重新 Attach 以及并行副本场景下都能正确 round-trip。[#104812](https://github.com/ClickHouse/ClickHouse/pull/104812) ([Vitaly Baranov](https://github.com/vitlibar)).
* 修复了在并行副本下，启用 `serialize_query_plan` 时 materialized CTE 的 `LOGICAL_ERROR`。[#104896](https://github.com/ClickHouse/ClickHouse/pull/104896) ([Igor Nikonov](https://github.com/devcrafter)).
* 修复了当 staleness (window) parameter 接近 `INT64_MAX` 时，`timeSeries*ToGrid` 函数中的有符号整数溢出问题。[#105319](https://github.com/ClickHouse/ClickHouse/pull/105319) ([Groene AI](https://github.com/groeneai)).
* `compatibility` 设置值不再把 `apply_row_policy_after_final` 恢复为 `false`，因此在使用 `FINAL` 时始终能正确应用行策略。[#105637](https://github.com/ClickHouse/ClickHouse/pull/105637) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 通过让 `posix_spawn` stub 遵循 `SETPGROUP`/`RESETIDS`/`SETSIGDEF`，修复了 `clickhouse chdig client`。[#105858](https://github.com/ClickHouse/ClickHouse/pull/105858) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在 merge/mutate executor 未初始化时，对 projections 执行 merge-tree 健全性检查期间发生的异常。[#105919](https://github.com/ClickHouse/ClickHouse/pull/105919) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 在对 projections 进行索引分析时，`minmax` 索引现在会从 projection 本身加载，而不是从父 part 加载，从而得到正确结果。[#105940](https://github.com/ClickHouse/ClickHouse/pull/105940) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复了 `materialize(monotonic_chain(...))` 中 `addMonotonicChain` 的异常。[#106050](https://github.com/ClickHouse/ClickHouse/pull/106050) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了 `RESTORE` 在包含 `MASKING POLICY` 依赖对象的备份上失败的问题。[#106086](https://github.com/ClickHouse/ClickHouse/pull/106086) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 修复了启用 `prefer_column_name_to_alias` 时，展开 SQL 用户自定义函数可能导致内存损坏的问题。[#106121](https://github.com/ClickHouse/ClickHouse/pull/106121) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 现在，使用 bridge 连接的字典会在服务器重启后重新加载并重新建立连接。关闭了 [#106151](https://github.com/ClickHouse/ClickHouse/issues/106151)。[#106152](https://github.com/ClickHouse/ClickHouse/pull/106152) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 修复了 `LocalObjectStorage` 的文件系统缓存问题。[#106239](https://github.com/ClickHouse/ClickHouse/pull/106239) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了启用 `use_delayed_remote_source` 时表函数的延迟远程 source 问题。[#106470](https://github.com/ClickHouse/ClickHouse/pull/106470) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了 `timeSeriesLastToGrid` 对网格起始时间之前及窗口外时间戳的处理问题。[#106504](https://github.com/ClickHouse/ClickHouse/pull/106504) ([Vitaly Baranov](https://github.com/vitlibar)) 。[#106577](https://github.com/ClickHouse/ClickHouse/pull/106577) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了函数名中包含查询参数时触发的 `LOGICAL_ERROR` (`Inconsistent AST formatting`) 问题。[#106635](https://github.com/ClickHouse/ClickHouse/pull/106635) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了在分布式查询计划任务反序列化前删除表时出现的逻辑错误。[#106944](https://github.com/ClickHouse/ClickHouse/pull/106944) ([Alexander Gololobov](https://github.com/davenger)) 。
* 对 `Nullable` `GROUP BY` 键使用精确比较。[#107050](https://github.com/ClickHouse/ClickHouse/pull/107050) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了当表函数参数不是列表达式时触发的 `LOGICAL_ERROR` (`Trying to get name of not a column`) 问题 (例如来自 `multiIf`/`CASE` 的未解析 `*` 匹配器) 。[#107411](https://github.com/ClickHouse/ClickHouse/pull/107411) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了处理大量不同的无效时区名称时，时区缓存 (`DateLUT`) 无界增长的问题。[#107464](https://github.com/ClickHouse/ClickHouse/pull/107464) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在将普通 `MergeTree` 变更标记为完成前，先写入 `part_log` 条目。[#107741](https://github.com/ClickHouse/ClickHouse/pull/107741) ([Azat Khuzhin](https://github.com/azat)) 。
* `arrayFold` 现在会对其 Array 参数执行健全性检查，以防输入格式错误。[#107932](https://github.com/ClickHouse/ClickHouse/pull/107932) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了 `MergeTree` 分片中缓存的 skip-index archive reader 上罕见的数据竞争以及可能的释放后使用问题；当查询读取 skip indices 而该分片正在被移动或重命名时，可能会触发该问题。[#107995](https://github.com/ClickHouse/ClickHouse/pull/107995) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `PREWHERE` 与 `Map` 子列一起使用时的性能回退问题。[#107988](https://github.com/ClickHouse/ClickHouse/pull/107988) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了带时区的 `parseDateTimeBestEffort` 在 `toString(Nullable(DateTime64))` 的 NULL 行上抛出 `CANNOT_PARSE_DATETIME` 的问题。[#108310](https://github.com/ClickHouse/ClickHouse/pull/108310) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 `ArrowFlight` 表函数和引擎在使用省略可选 `dataset` 键的命名集合时，会报出 `No such key 'dataset'` 错误并拒绝该集合的问题。[#108041](https://github.com/ClickHouse/ClickHouse/pull/108041) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 `CODEC` 或引擎声明中使用无参数窗口函数时出现的 `Inconsistent AST formatting` 逻辑错误 (例如 `CODEC(cume_dist() OVER (...))`) ；现在这类函数会保留括号，因此查询可以顺利经过 format/parse round-trip。[#107806](https://github.com/ClickHouse/ClickHouse/pull/107806) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `hasToken` 在 needle 包含分隔符时，静默地通过 text index 返回结果，而不是抛出 `BAD_ARGUMENTS` 的问题。[#108189](https://github.com/ClickHouse/ClickHouse/pull/108189) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 现在可通过 `compatibility` setting 将设置 `use_skip_indexes_on_data_read` 恢复为 26.1 之前的默认值 (`false`) ，作为性能回退时的兜底方案；此前在 on-data-read 路径下，`minmax`/`set`/`bloom_filter` 跳过索引的 mark-range pruning 会失效。[#108330](https://github.com/ClickHouse/ClickHouse/pull/108330) ([egor romanov](https://github.com/egor-click)).
* 修复了当传递给 `remote`/`remoteSecure` 的命名集合中的 `database`/`db` 覆盖项不是常量数据库名称时，可能发生的崩溃 (空指针解引用) 问题，例如 `remote(nc, database = (SELECT 1))`。现在查询会返回明确的错误，而不是直接崩溃。[#108271](https://github.com/ClickHouse/ClickHouse/pull/108271) ([Groene AI](https://github.com/groeneai)).
* 修复了可刷新materialized view 在错误时机丢失 ZooKeeper connection 时可能卡住的问题。[#108234](https://github.com/ClickHouse/ClickHouse/pull/108234) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了读取值由默认值填充的 `Array(Tuple(...))` 列时出现的 `Bad cast from type DB::ColumnVector<...> to DB::ColumnTuple` 问题，例如在动态应用 `ALTER TABLE ... ADD COLUMN` 之后，或在未完成的 `ALTER TABLE ... CLEAR COLUMN` mutation 之后。[#107232](https://github.com/ClickHouse/ClickHouse/pull/107232) ([Groene AI](https://github.com/groeneai)).
* 修复了当显式引用共同超类型为 `Dynamic` 的 `JOIN ... USING` 键，并将其传递给聚合函数时出现的 `Bad cast from type DB::ColumnDynamic to DB::ColumnNullable` 逻辑错误，例如 `count(t.key) IGNORE NULLS`。[#107289](https://github.com/ClickHouse/ClickHouse/pull/107289) ([Groene AI](https://github.com/groeneai)).
* 修复了普通 (非复制表) `MergeTree` 在对仍有未应用 lightweight `UPDATE` patch 的分区执行 `REPLACE PARTITION`、`MOVE PARTITION`、`DETACH PARTITION` 或 `DETACH PART` 时，可能发生静默数据丢失的问题。现在这些操作会直接拒绝该命令，与 `ReplicatedMergeTree` 的现有行为一致。[#107386](https://github.com/ClickHouse/ClickHouse/pull/107386) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `Dynamic` 键的 `Map` 上，使用 `LowCardinality` 类型的查找参数执行 `has` 时发生的崩溃问题 (release 构建中为 SIGSEGV，debug 构建中为类型不匹配断言) ，例如 `has(map('a'::Dynamic, ...), toLowCardinality('b'))`。[#107956](https://github.com/ClickHouse/ClickHouse/pull/107956) ([Groene AI](https://github.com/groeneai)).
* 修复了向 materialized view 插入数据时出现的 `LOGICAL_ERROR` (“Block structure mismatch ... between `ConvertingTransform` and `RemovingReplicatedColumnsTransform`”) ：当其 `TO` 目标表中声明的某列使用了比视图 `SELECT` 结果更宽的 `Enum` 时，会触发该问题。现在会正确应用合法的 `Enum` 扩宽。 [#107648](https://github.com/ClickHouse/ClickHouse/pull/107648) ([Groene AI](https://github.com/groeneai)).
* 修复了查询 `Distributed` 表 (或使用并行副本) 时的 `NUMBER_OF_COLUMNS_DOESNT_MATCH` 错误：当存在多个会展开为同一表达式的 `ALIAS` 列，并在 `ORDER BY`/`GROUP BY`/`HAVING` 中同时引用它们时，就会触发该问题。 [#107913](https://github.com/ClickHouse/ClickHouse/pull/107913) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 修复了 `detectCharset` 和 `detectLanguageUnknown` 函数中的未定义行为 (向 `memcpy` 传入空指针) ：当输入字符串超过 32768 字节且无法检测到任何字符集时会触发该问题。 [#108250](https://github.com/ClickHouse/ClickHouse/pull/108250) ([Groene AI](https://github.com/groeneai)).
* 修复了 `dateDiff` 在使用 `hour` 和 `minute` 单位时的 `signed integer overflow` (未定义行为) 问题，该问题会在接近 `Int64` 取值范围边界的极端 `DateTime64` 值上发生。 [#108229](https://github.com/ClickHouse/ClickHouse/pull/108229) ([Groene AI](https://github.com/groeneai)).
* 修复了空 merged part 上文本索引触发的 `Too many marks` 问题。 [#106867](https://github.com/ClickHouse/ClickHouse/pull/106867) ([Azat Khuzhin](https://github.com/azat)).
* 修复了以下场景下读取列时出现的 `LOGICAL_ERROR` (“Unexpected return type from if”) ：在 `apply_mutations_on_fly = 1` 的情况下，先执行带有非常量条件或 false 条件的 `ALTER UPDATE col = ... WHERE <cond>`，再执行 `ALTER MODIFY COLUMN col <new type>`。 [#108128](https://github.com/ClickHouse/ClickHouse/pull/108128) ([Groene AI](https://github.com/groeneai)).
* 修复了将 `Array(Dynamic)` 或 `Array(Variant)` 通过 `accurateCastOrNull` 转换为 `QBit` 时导致 server 中止的问题 (`IColumn::insertFrom` 中的 `Logical error`) ，例如 `accurateCastOrNull(CAST(range(114), 'Array(Dynamic)'), 'QBit(Float32, 114)')`。 [#108288](https://github.com/ClickHouse/ClickHouse/pull/108288) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `DESCRIBE TABLE (...) AS ...` 中，子查询后跟别名时会出现的语法错误。 [#100205](https://github.com/ClickHouse/ClickHouse/pull/100205) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* `getClientHTTPHeader` 现在会被正确视为非确定性，因此其结果不再被查询结果缓存错误地复用。 [#108029](https://github.com/ClickHouse/ClickHouse/pull/108029) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* 使用 `default-engine-native-tls` feature 构建 `delta-kernel-rs`，以便其自身的 HTTP 客户端 (`reqwest`) 能复用 ClickHouse 已链接的 OpenSSL。这只是对 `native-tls` 的部分启用：`object_store` 仍会强制使用 `reqwest/rustls-tls-native-roots`，因此 `reqwest` 最终会同时带上 `native-tls` 和 `rustls` 两种后端。`delta-kernel-rs` 目前在 MSan 下仍保持禁用，因为 `ring` 仍会通过 `object_store` 被编译进来 (既会经由 `rustls` 的传递依赖引入，也会直接用于 AWS request HMAC signing) ，而其手写汇编不会生成 MSan 所需的符号 (上游跟踪见 [arrow-rs-object-store#585](https://github.com/apache/arrow-rs-object-store/pull/585)) 。[#96856](https://github.com/ClickHouse/ClickHouse/pull/96856) ([Austin Bonander](https://github.com/abonander)).
* 为 `clickhouse` binary 添加 PGO (profile 引导优化) 和 BOLT (Binary Optimization and Layout Tool) 链接后优化。profiles 从 CI workloads 中收集，并在 release builds 期间以尽力而为的方式应用——如果 profile 已过时或不兼容，这两个 stage 都会回退到未优化的输出。截至目前，PGO 还未带来收益。[#100938](https://github.com/ClickHouse/ClickHouse/pull/100938) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse keeper-bench` 添加 `--storage` mode，用于对 `KeeperStorage` 进行 in-process benchmark (无网络、无 raft、无 state machine) ，并使用与网络 mode 相同的 `setup`/`generator` config sections。[#103081](https://github.com/ClickHouse/ClickHouse/pull/103081) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复 `ENABLE_AWS_S3=OFF` 时的构建问题。[#105390](https://github.com/ClickHouse/ClickHouse/pull/105390) ([Yue Ni](https://github.com/niyue)).
* 将 `mongo-cxx-driver` 更新至 r4.3.0。[#105522](https://github.com/ClickHouse/ClickHouse/pull/105522) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复与 RapidJSON 的构建兼容性问题。[#105674](https://github.com/ClickHouse/ClickHouse/pull/105674) ([Ilya Golshtein](https://github.com/ilejn)).
* 通过移除广泛使用的 base/ 请求头中的传递包含，并从 vendored `Poco/Logger.h` 中剥离未使用代码，加快构建速度。[#105702](https://github.com/ClickHouse/ClickHouse/pull/105702) ([Raúl Marín](https://github.com/Algunenano)).
* 将 `libxml2` 从 2.15.1 更新至 2.15.3。[#105985](https://github.com/ClickHouse/ClickHouse/pull/105985) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 在 Poco 内部使用 `expat` 2.8.1。[#105988](https://github.com/ClickHouse/ClickHouse/pull/105988) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 `thrift` 升级至 `v0.23.0`。[#105993](https://github.com/ClickHouse/ClickHouse/pull/105993) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 使用 `postgres` 标签 `REL_18_4`。[#105994](https://github.com/ClickHouse/ClickHouse/pull/105994) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 `krb5` 升级至 1.22.2。[#106076](https://github.com/ClickHouse/ClickHouse/pull/106076) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将捆绑的 `curl` 更新至 8.20.0。[#106077](https://github.com/ClickHouse/ClickHouse/pull/106077) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 `mariadb-connector-c` 升级到 3.1.29。保留了所有与 ClickHouse 相关的补丁。 [#106287](https://github.com/ClickHouse/ClickHouse/pull/106287) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 更新 distroless 基础 image 的摘要，以修复 libssl3t64 的 CVE 漏洞。 [#106360](https://github.com/ClickHouse/ClickHouse/pull/106360) ([Rahul Nair](https://github.com/motsc)).
* 使用 `wasmtime` v45.0.1。 [#106836](https://github.com/ClickHouse/ClickHouse/pull/106836) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 `openssl` 升级到 3.5.7。 [#106844](https://github.com/ClickHouse/ClickHouse/pull/106844) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Distroless Docker 构建现在也会更新 `:X.Y-distroless` 和 `:X.Y.Z-distroless` 这两个浮动标签，而不再只更新完整版本标签。 [#106932](https://github.com/ClickHouse/ClickHouse/pull/106932) ([Rahul Nair](https://github.com/motsc)).
* 禁用未使用的 `curl` 功能，例如 NTLM 认证、cookies、alt-svc、HSTS、DNS-over-HTTPS、netrc、MIME、AWS SigV4。 [#107226](https://github.com/ClickHouse/ClickHouse/pull/107226) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 更新了 `NuRaft`，修复了当 snapshot IO 在后台线程中运行时出现的 snapshot-install 活锁问题。`nuraft_use_bg_thread_for_snapshot_io` 这个 Keeper setting 默认仍处于禁用状态；CI 现在会将其随机化，以覆盖两种模式。 [#107338](https://github.com/ClickHouse/ClickHouse/pull/107338) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了当 ClickHouse checkout path 中包含与某个 header extension 匹配的子串时，`abseil` 构建失败的问题。 [#107349](https://github.com/ClickHouse/ClickHouse/pull/107349) ([zhiqiang](https://github.com/zhiqiang-hhhh)).
* 在 x86\_64 上，改为通过 `CPUID` 确定 L2 cache size，而不是使用 glibc 特有的 `sysconf(_SC_LEVEL2_CACHE_SIZE)`，因为后者在 musl libc 下不可用。 [#107469](https://github.com/ClickHouse/ClickHouse/pull/107469) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 musl 构建的栈大小增加到 8 MiB，以支持深度嵌套的查询。 [#107470](https://github.com/ClickHouse/ClickHouse/pull/107470) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Rust 静态库中被本地化的 C library symbols 集合，现改为根据实际的 reference libraries 推导，而不是依赖手动维护的允许列表，这样就能覆盖所有 compiler-rt builtins 和平台 libm 函数。 [#107571](https://github.com/ClickHouse/ClickHouse/pull/107571) ([Raúl Marín](https://github.com/Algunenano)).
* 将 distroless server 和 keeper images 切换到 `gcr.io/distroless/base-nossl-debian13`，这样它们只会包含 ClickHouse 实际链接的库，不再带入那些我们自行静态链接的库。 [#107837](https://github.com/ClickHouse/ClickHouse/pull/107837) ([Rahul Nair](https://github.com/motsc)).
* 在 macOS (`arm_darwin`) 上重新启用此前因过时而被跳过的 50 个 stateless tests，并在 macOS 上使用 `fsync` 而不是 `F_FULLFSYNC` 来同步 directory。 [#107887](https://github.com/ClickHouse/ClickHouse/pull/107887) ([Raúl Marín](https://github.com/Algunenano)).

<div id="265">
  ### ClickHouse 26.5 版本发布，2026-05-21。 [演示文稿](https://presentations.clickhouse.com/2026-release-26.5/), [视频](https://www.youtube.com/watch?v=P1IDAvsi7p8)
</div>

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

* 将 `date_time_input_format` 和 `cast_string_to_date_time_mode` 的默认值从 `basic` 改为 `best_effort`。此前无法解析非 basic 日期时间字符串 (例如 `2024 April 4`、`Apr 15, 2020 10:30:00`) 的查询，现在默认可能会成功。若要保持原先的严格解析行为，请将这些设置设为 `basic` (或使用 `compatibility`) 。[#89334](https://github.com/ClickHouse/ClickHouse/pull/89334) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在禁止将 Tuple 元素命名为 `null`，因为它会与 Nullable 的 null Map 使用的子列名称冲突，导致子列解析产生歧义。[#98377](https://github.com/ClickHouse/ClickHouse/pull/98377) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增设置 `dynamic_disk_allow_from_env`、`dynamic_disk_allow_from_zk` 和 `dynamic_disk_allow_include`，用于禁止在动态 disk 中使用 `from_env`、`from_zk` 和 `include`。这是一项向后不兼容的变更，因为它默认禁止了此前默认允许的行为。[#99138](https://github.com/ClickHouse/ClickHouse/pull/99138) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 不能再使用已废弃的基于 Arrow 的 Parquet reader 和 writer，系统将改用原生实现。[#100949](https://github.com/ClickHouse/ClickHouse/pull/100949) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `SHOW CREATE TABLE t` 现在会在同时存在名为 `t` 的永久表和 temporary table 且未指定 database 时，优先选择 temporary table，这与现有的 `DESCRIBE TABLE` 行为一致。此外，现已支持 `DESCRIBE TEMPORARY TABLE` 语法。[#100966](https://github.com/ClickHouse/ClickHouse/pull/100966) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将默认的 `http_max_fields` 从 1,000,000 降至 1,000，并将 `http_max_field_name_size` 从 128 KB 降至 4 KB，以限制 HTTP connections 在身份验证前的内存使用量。新增了 `http_max_request_header_size` 和 `http_headers_read_timeout` 设置。依赖先前较高限制的用户可通过设置将其恢复。[#103285](https://github.com/ClickHouse/ClickHouse/pull/103285) ([Sema Checherinda](https://github.com/CheSema)).
* 为 `system.metric_log` 新增了一个 `histograms` 嵌套列，用于在每一行中记录所有已注册 histogram metric 的快照，并新增 `system_metric_log_show_zero_values_in_histograms` 设置以控制是否输出零值。这意味着 `system.histogram_metric_log` 表已被弃用。[#103770](https://github.com/ClickHouse/ClickHouse/pull/103770) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 现在，在未显式指定 time zone 的情况下，将 `CAST` 转换为 `DateTime` 或 `DateTime64` 时，会保留源 argument 的 time zone (前提是源值为带显式 time zone 的 `DateTime`/`DateTime64`) ，与 `toDateTime`/`toDateTime64` 函数的行为一致。关闭 [#55072](https://github.com/ClickHouse/ClickHouse/issues/55072)。[#104433](https://github.com/ClickHouse/ClickHouse/pull/104433) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 移除了 `kql` table function。请使用 `SET dialect = 'kusto'` 以 KQL 方言运行查询。[#105101](https://github.com/ClickHouse/ClickHouse/pull/105101) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* window functions `RANK` 和 `DENSE_RANK` 现在会拒绝 arguments，并抛出 `NUMBER_OF_ARGUMENTS_DOESNT_MATCH`，以符合 SQL 标准。此前，诸如 `RANK(x) OVER (ORDER BY id)` 这样的查询会被静默接受，但其中的 argument 会被忽略。若要恢复先前较宽松的行为，请设置 `allow_rank_dense_rank_arguments = 1`。关闭 [#49526](https://github.com/ClickHouse/ClickHouse/issues/49526)。[#104324](https://github.com/ClickHouse/ClickHouse/pull/104324) ([Groene AI](https://github.com/groeneai)).

<div id="267-new-feature">
  #### 新特性
</div>

* 新增设置 `max_bytes_ratio_before_external_join`，与 `max_bytes_ratio_before_external_group_by` 和 `max_bytes_ratio_before_external_sort` 相对应。它将哈希 JOIN 的落盘阈值表示为可用内存的一个比例；与绝对值 `max_bytes_before_external_join` 结合使用时，将采用两者中较小的阈值。[#103862](https://github.com/ClickHouse/ClickHouse/pull/103862) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。新的 `max_bytes_ratio_before_external_join` 设置现已默认启用，默认值为 0.5，与 `max_bytes_ratio_before_external_group_by` 和 `max_bytes_ratio_before_external_sort` 保持一致。哈希 JOIN 会在右侧数据超过可用系统内存一半时自动落盘到 grace hash join (在配置了内存限制时) 。[#104285](https://github.com/ClickHouse/ClickHouse/pull/104285) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增表函数 `filesystem`。它可将目录结构表示为一张表，从而用 SQL 查询文件的元数据和内容。最初由 @perst20 在 [#42039](https://github.com/ClickHouse/ClickHouse/pull/42039) 中提出。参见 [#42039](https://github.com/ClickHouse/ClickHouse/issues/42039)。参见 [#50208](https://github.com/ClickHouse/ClickHouse/issues/50208)。[#53610](https://github.com/ClickHouse/ClickHouse/pull/53610) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 允许将裸函数名传递给高阶函数，如 `arrayMap`、`arrayFilter` 等。例如，`arrayMap(negate, [1, 2, 3])` 现在等价于 `arrayMap(x -> negate(x), [1, 2, 3])`。[#101033](https://github.com/ClickHouse/ClickHouse/pull/101033) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增设置 `send_table_structure_on_insert_with_inline_data` 和客户端选项 `--inline-insert-data`，允许服务器通过原生协议自行解析内联 INSERT 数据，从而避免为了接收表结构而发生一次往返通信，并提升大量小批量插入的性能。[#101034](https://github.com/ClickHouse/ClickHouse/pull/101034) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `tokenizeQuery` 和 `highlightQuery` 函数，用于 SQL 查询的标记化和语法高亮。`tokenizeQuery` 返回带有字节偏移和标记类型的词法分析标记；`highlightQuery` 返回基于解析器的语法高亮范围及高亮类别 (keyword、identifier、function、number、string 等) 。[#101054](https://github.com/ClickHouse/ClickHouse/pull/101054) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `url_base` 设置，用于在 `url` 表函数和 `URL` 表引擎中解析相对 URL，并遵循 RFC 3986 语义。[#101113](https://github.com/ClickHouse/ClickHouse/pull/101113) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `LIMIT BY` 子句现支持负值，以便从每个分组的*末尾*而非开头选取行。例如，`LIMIT -2 BY id` 会返回每个 `id` 的最后两行。还支持负偏移量 (`LIMIT -1 OFFSET -1 BY id`) 以及混合符号 (`LIMIT -2 OFFSET 1 BY id`) 。[#103222](https://github.com/ClickHouse/ClickHouse/pull/103222) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* `json_value` 函数现支持以 `tuple` 和 `array` 形式输出，以提升多个 JSON 查询的性能。[#78362](https://github.com/ClickHouse/ClickHouse/pull/78362) ([kevinyhzou](https://github.com/KevinyhZou)) 。`JSON_VALUE`、`JSON_EXISTS` 和 `JSON_QUERY` 现支持多路径 `Tuple`/`Array` JSONPath 参数，由 @KevinyhZou 提供。[#101102](https://github.com/ClickHouse/ClickHouse/pull/101102) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `kafka_autodetect_client_rack` 参数。设置后，会通过云平台能力探测可用区，并将其作为 `librdkafka` 的 `client.rack` 参数传递，以避免跨可用区通信。[#81323](https://github.com/ClickHouse/ClickHouse/pull/81323) ([Ilya Golshtein](https://github.com/ilejn)) 。
* 为 `system.blob_storage_log` 新增 `Read` 事件类型，用于跟踪对象存储读取操作，由新设置 `enable_blob_storage_log_for_read_operations` 控制。[#96867](https://github.com/ClickHouse/ClickHouse/pull/96867) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在，用户可以通过新的 `system.zookeeper_watches` 表查看 `clickhouse-server` 发出的 ZooKeeper watches。[#99277](https://github.com/ClickHouse/ClickHouse/pull/99277) ([Den Kalantaevskii](https://github.com/Diskein)) 。
* 新增 `Shards` profile event，用于统计分布式查询中涉及的分片数量，并对所有表的结果求和。[#99470](https://github.com/ClickHouse/ClickHouse/pull/99470) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `WASM` UDF 现可声明为 `DETERMINISTIC`，并可参与常量折叠。[#100005](https://github.com/ClickHouse/ClickHouse/pull/100005) ([Vasily Chekalkin](https://github.com/bacek)) 。
* 新增 `parallel_replicas_prefer_local_replica` 设置：禁用时，并行副本将完全由负载均衡算法选择，因此即使 `max_parallel_replicas = 1` 的查询也可能被路由到另一台主机。[#100139](https://github.com/ClickHouse/ClickHouse/pull/100139) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `{disk,storage,http}_connections_rcvbuf` 和 `{disk,storage,http}_connections_sndbuf` 服务器设置，用于控制出站 HTTP 连接的 TCP socket buffer 大小，让运维人员能够覆盖内核 autotuning，并限制每个连接的内存使用量。[#100478](https://github.com/ClickHouse/ClickHouse/pull/100478) ([Sema Checherinda](https://github.com/CheSema)) 。
* 支持 `CREATE OR REPLACE MATERIALIZED VIEW`，其原子交换语义与 `CREATE OR REPLACE TABLE` 相同。适用于内部表、`TO` 表、`POPULATE`、`REFRESH` 和 `ON CLUSTER`。[#100539](https://github.com/ClickHouse/ClickHouse/pull/100539) ([DQ](https://github.com/il9ue)) 。
* 新增 `s3_read_request_duration_microseconds` 和 `s3_read_request_bytes` 直方图指标，用于观测 S3 GET 请求连接生命周期及消耗的字节数，可在 `system.histogram_metrics` 和 Prometheus 端点中查看。[#102058](https://github.com/ClickHouse/ClickHouse/pull/102058) ([Sema Checherinda](https://github.com/CheSema)) 。
* 新增 `Paimon`、`PaimonS3`、`PaimonAzure`、`PaimonHDFS` 和 `PaimonLocal` 表引擎，支持基于 Keeper 快照进度跟踪的增量读取。增量模式仅返回自上一个已提交快照以来的新行。可通过 `paimon_target_snapshot_id` 执行定向快照增量读取，并通过 `max_consume_snapshots` 为每个查询设置快照上限。后台元数据刷新可通过 `paimon_metadata_refresh_interval_sec` 配置。该功能受 `allow_experimental_paimon_storage_engine` 控制。[#102343](https://github.com/ClickHouse/ClickHouse/pull/102343) ([XiaoBinMu](https://github.com/Binnn-MX)) 。
* 新增 Kafka 表设置 `kafka_map_virtual_columns_on_write`。启用后，Kafka 表 schema 中名为 `_key`、`_timestamp`、`_headers.name` 和 `_headers.value` 的列会在 `INSERT` 时映射为对应的 Kafka 消息 key、timestamp 和 headers，并从消息负载中排除。[#103243](https://github.com/ClickHouse/ClickHouse/pull/103243) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为可刷新materialized view 新增了 `SYSTEM PAUSE VIEW [db.]name` 和 `SYSTEM PAUSE VIEWS` 查询。与 `SYSTEM STOP VIEW` 不同，`SYSTEM PAUSE VIEW` 不会中断当前正在进行的刷新——进行中的刷新会正常完成，只会阻止后续刷新。可通过 `SYSTEM START VIEW` 或 `SYSTEM START VIEWS` 恢复，这两个命令现在都会统一清除 stopped 和 paused 两种状态。[#103252](https://github.com/ClickHouse/ClickHouse/pull/103252) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 新增函数 `regexpPosition` (以及与 PostgreSQL 兼容的别名 `regexpInstr` 和 `regexp_instr`) ，用于返回字符串中第 N 次 Regex 匹配的字节位置。支持起始偏移、匹配后返回模式、Regex 标志以及捕获组选择。[#104172](https://github.com/ClickHouse/ClickHouse/pull/104172) ([Abhinav Agarwal](https://github.com/aagarwal-gtr)).
* 新增用于质数判断的函数 `isPrime` 和 `isProbablePrime`。`isPrime` 可对最大至 `UInt64` 的无符号整数返回精确结果。`isProbablePrime` 还支持 `UInt128` 和 `UInt256`；对于这些更宽的类型，`0` 表示确定为合数，`1` 表示可能为质数。`isProbablePrime` 的可选第二个参数 `rounds` 用于控制置信度 (上限为 `256`) ；默认 `25` 轮可将随机合数的假阳性率控制在 `10^-15` 以下，并且 `isProbablePrime` 支持取消。[#104234](https://github.com/ClickHouse/ClickHouse/pull/104234) ([Nihal Z. Miaji](https://github.com/nihalzp)). [#104639](https://github.com/ClickHouse/ClickHouse/pull/104639) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#104806](https://github.com/ClickHouse/ClickHouse/pull/104806) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* `clear` 和 `/clear` 现在会清空 clickhouse 命令行工具中的终端，而不再被误当作查询执行。[#104318](https://github.com/ClickHouse/ClickHouse/pull/104318) ([Tyler Hannan](https://github.com/tylerhannan)).
* 允许 `file` 表函数在 `SELECT` 查询中接受路径数组 `Array(String)`。[#104442](https://github.com/ClickHouse/ClickHouse/pull/104442) ([Yue](https://github.com/niyue)).
* 向 `system.functions` 表新增了 `deterministic` 和 `higher_order` 列。[#104479](https://github.com/ClickHouse/ClickHouse/pull/104479) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 为 `bech32Encode` 新增可选的编码 Variant 参数 (`bech32` / `bech32m`) ，并为 `bech32Decode` 新增原始解码模式，用于非 SegWit 地址编码 (例如 Cosmos SDK、Injective、Osmosis) 。[#98986](https://github.com/ClickHouse/ClickHouse/pull/98986) ([Yash ](https://github.com/Onyx2406)).
* 现在可以写入 `AvroConfluent` 格式的数据，而它此前仅支持输入。这使得可以直接从 ClickHouse 生成带有 Confluent Schema Registry 帧的 Avro 消息，例如在写入 Kafka 时。schema 会自动注册到 registry。可使用新的 `output_format_avro_confluent_subject` 设置来指定 subject 名称。[#101935](https://github.com/ClickHouse/ClickHouse/pull/101935) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 新增 `prettyPrintJSON` 函数，可将 JSON 字符串格式化为便于阅读的形式。适用于仪表盘或报告，因为此前这类美化通常需要在客户端额外处理一步。关闭了 [#62523](https://github.com/ClickHouse/ClickHouse/issues/62523)。[#102594](https://github.com/ClickHouse/ClickHouse/pull/102594) ([Dmitry Prokofyev](https://github.com/prokofyevDmitry)).
* 新增 `STRING_AGG`，作为 `groupConcat` 的不区分大小写别名，以兼容 PostgreSQL / SQL 标准。[#105125](https://github.com/ClickHouse/ClickHouse/pull/105125) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在可以在特定子查询上使用 `SETTINGS use_query_cache = true`，从而单独缓存各个子查询的结果，而无需缓存整个外层查询。新设置 `query_cache_for_subqueries = true` 可将 `use_query_cache` 批量应用到所有子查询。注意：外层查询上的 `use_query_cache` 现在不再自动传播到子查询。[#99804](https://github.com/ClickHouse/ClickHouse/pull/99804) ([Vincent Voyer](https://github.com/vvo)) 。
* 为 Web UI (`play.html`) 中的查询编辑器新增了基于词法分析的语法高亮，颜色风格参照 `clickhouse-client`。[#105105](https://github.com/ClickHouse/ClickHouse/pull/105105) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* 新增了一个 Experimental 的 Web 终端界面，位于 `/webterminal`，可通过 WebSocket 在浏览器中提供交互式 `clickhouse-client` 会话。默认禁用；可通过 `allow_experimental_webterminal` 服务器设置启用。可在[这里](https://play.clickhouse.com/webterminal?user=play)查看。 [#100277](https://github.com/ClickHouse/ClickHouse/pull/100277) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#105191](https://github.com/ClickHouse/ClickHouse/pull/105191) ([Alexey Milovidov](https://github.com/alexey-milovidov)). [#105059](https://github.com/ClickHouse/ClickHouse/pull/105059) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `Kafka2` 引擎 (Experimental，使用基于 Keeper 的 offset 存储) 现已支持直接 `SELECT` 查询以及 `kafka_commit_on_select` 设置。 [#100276](https://github.com/ClickHouse/ClickHouse/pull/100276) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `WASM` UDFs 现在可强制转换更多数值类型：较小的整数可转换为更宽的整数 (例如 `Int8` 到 `UInt64`) ，任意整数都可转换为浮点数 (例如 `Int32` 到 `Float32`) 。 [#100435](https://github.com/ClickHouse/ClickHouse/pull/100435) ([Vasily Chekalkin](https://github.com/bacek)).
* 支持在 `DELETE FROM system.webassembly_modules` 查询中使用 `LIKE` 函数。 [#104397](https://github.com/ClickHouse/ClickHouse/pull/104397) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 为 `Iceberg` 增加了对 Geo 类型的支持。 [#103113](https://github.com/ClickHouse/ClickHouse/pull/103113) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 为 ArrowFlight SQL server 添加了预处理语句功能。 [#103047](https://github.com/ClickHouse/ClickHouse/pull/103047) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 通过在 KQL 解析器各阶段之间保留解析深度和回溯计数器，提升了 KQL 解析器 (用于支持 Kusto 语言) 的稳健性，从而能够对复杂 KQL 查询一致地跟踪解析器限制。 [#103528](https://github.com/ClickHouse/ClickHouse/pull/103528) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).

<div id="267-performance-improvement">
  #### 性能提升
</div>

* 通过 `file` 表函数或 `File` 表引擎读取本地 Parquet 文件时，可复用 Parquet 页脚元数据缓存。此前，该缓存仅会用于对象存储后端。[#104260](https://github.com/ClickHouse/ClickHouse/pull/104260) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当排序键只引用 join 保留侧的列时，可将 `ORDER BY ... LIMIT n` 下推到 `LEFT`/`RIGHT` join 之下，从而限制保留侧输入在连接前需要产出的行数。该行为由新设置 `query_plan_top_k_through_join` 控制 (默认启用) 。[#104268](https://github.com/ClickHouse/ClickHouse/pull/104268) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认启用 `use_top_k_dynamic_filtering` 和 `use_skip_indexes_for_top_k` 设置，以提升 `ORDER BY ... LIMIT N` 查询的性能。[#99537](https://github.com/ClickHouse/ClickHouse/pull/99537) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。默认将 `use_top_k_dynamic_filtering` 限制为仅适用于定长排序列，以避免在 `ORDER BY <var-length-column> LIMIT N` 查询中出现性能回退，因为逐行进行阈值比较的成本会超过节省的 I/O 开销。此前的行为仍可通过新设置 `use_top_k_dynamic_filtering_for_variable_length_types` 启用。[#104216](https://github.com/ClickHouse/ClickHouse/pull/104216) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使用 `jemalloc` 的 oversize-arena 特性来减少缺页错误。[#103958](https://github.com/ClickHouse/ClickHouse/pull/103958) ([Nikita Taranov](https://github.com/nickitat)) 。
* 限制 `UNION ALL` 中同时活跃的流，以降低峰值内存占用。[#100176](https://github.com/ClickHouse/ClickHouse/pull/100176) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 对用户态页缓存进行了小幅优化。[#100300](https://github.com/ClickHouse/ClickHouse/pull/100300) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。现在，用户态页缓存始终优于 OS page cache。
* 通过用户态页缓存 (`use_page_cache_for_object_storage = 1`) 读取对象存储中的冷数据时，现在速度显著提升，因为连续的缓存未命中会被合并为一次 HTTP 请求，而不是每个 `page_cache_block_size` 块发起一次请求。[#104230](https://github.com/ClickHouse/ClickHouse/pull/104230) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 加快涉及类型转换和函数应用的索引分析。修复 [#55653](https://github.com/ClickHouse/ClickHouse/issues/55653)。[#100366](https://github.com/ClickHouse/ClickHouse/pull/100366) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 加快在包含大量底层表的 `Merge` 表上执行超大查询的速度。修复 [#32465](https://github.com/ClickHouse/ClickHouse/issues/32465)。[#100369](https://github.com/ClickHouse/ClickHouse/pull/100369) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 从设置字段类型中移除 vtable，将 `Settings` 的拷贝大小减少约 28 倍，并通过适用于所有设置类型的类型化数组布局提升缓存局部性。[#102269](https://github.com/ClickHouse/ClickHouse/pull/102269) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增 `max_threads_min_free_memory_per_thread` 和 `max_insert_threads_min_free_memory_per_thread` 设置，以便在服务器可用内存不足时自动降低查询并行度。[#100383](https://github.com/ClickHouse/ClickHouse/pull/100383) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 降低低内存系统 (\< 4 GiB) 上的内存占用。[#100389](https://github.com/ClickHouse/ClickHouse/pull/100389) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `OptimizeTrivialGroupByLimitPass`。对于简单的 `SELECT ... FROM t GROUP BY k LIMIT n` 查询 (不含 `HAVING`、`ORDER BY` 或窗口函数) ，analyzer 现在会设置 `max_rows_to_group_by = n + offset` 和 `group_by_overflow_mode = 'any'`，因此 aggregation 会在产出 `n` 个不同键后停止，而不是对整个输入完成分组。由新设置 `optimize_trivial_group_by_limit_query` 控制 (默认启用) 。[#104473](https://github.com/ClickHouse/ClickHouse/pull/104473) ([Amos Bird](https://github.com/amosbird)) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `_part_offset` 和 `_block_number` 虚拟列新增粒度级隐式 min-max 索引，也包括 projections。可基于虚拟列谓词快速对粒度进行 pruning。[#103952](https://github.com/ClickHouse/ClickHouse/pull/103952) ([Mikhail Artemenko](https://github.com/Michicosun)). [#104746](https://github.com/ClickHouse/ClickHouse/pull/104746) ([Mikhail Artemenko](https://github.com/Michicosun)). [#105137](https://github.com/ClickHouse/ClickHouse/pull/105137) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 对于 `prealloc_serialized` 家族的 aggregation 方法，在批次序列化阶段预先计算每行的哈希，并将其用于：(a) 在 `emplaceKey`/`findKey` 中跳过重复哈希计算，以及 (b) 对下一行的 bucket 执行软件预取。通过隐藏哈希表缓存未命中延迟，加速多键字符串/序列化 aggregation。[#104475](https://github.com/ClickHouse/ClickHouse/pull/104475) ([Amos Bird](https://github.com/amosbird)) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `Iceberg` 表新增查询条件缓存。[#102115](https://github.com/ClickHouse/ClickHouse/pull/102115) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 优化 `cramersV`、`cramersVBiasCorrected`、`theilsU` 和 `contingency` 与窗口函数配合使用时的性能。关闭 [#83521](https://github.com/ClickHouse/ClickHouse/issues/83521)。[#93384](https://github.com/ClickHouse/ClickHouse/pull/93384) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 新增一项查询优化，将 `tupleElement(dictGet('dict', ('a', 'b', 'c'), key), N)` 重写为 `dictGet('dict', 'a', key)`，避免拉取不必要的字典属性。由 `optimize_dictget_tuple_element` 设置控制 (默认启用) 。[#100186](https://github.com/ClickHouse/ClickHouse/pull/100186) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为带排序的分布式查询，在发起端的排序步骤启用缓冲。[#100661](https://github.com/ClickHouse/ClickHouse/pull/100661) ([Nikita Taranov](https://github.com/nickitat)).
* 提升 `partial_merge` JOIN 的性能。[#100945](https://github.com/ClickHouse/ClickHouse/pull/100945) ([Artem Zuikov](https://github.com/4ertus2)).
* 略微减少了 `partial_merge` JOIN 中的内存过量分配。[#100963](https://github.com/ClickHouse/ClickHouse/pull/100963) ([Artem Zuikov](https://github.com/4ertus2)).
* 通过缓存 sampling settings 而不是遍历整个 memory-tracker 层级，优化分配/释放操作。[#101267](https://github.com/ClickHouse/ClickHouse/pull/101267) ([Azat Khuzhin](https://github.com/azat)).
* 通过预分配内部跟踪容器，降低 S3 分段上传期间的内存分配开销。[#101799](https://github.com/ClickHouse/ClickHouse/pull/101799) ([Gagan Dhakrey](https://github.com/gagandhakrey)).
* 在 hash join 探测阶段添加软件预取，以降低大型哈希表的内存访问延迟，由设置 `enable_software_prefetch_in_join` 控制。[#102444](https://github.com/ClickHouse/ClickHouse/pull/102444) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* 优化 `MemoryTracker` 布局，性能提升约 25%。[#103464](https://github.com/ClickHouse/ClickHouse/pull/103464) ([Azat Khuzhin](https://github.com/azat)).
* 在索引分析前重写 `coalesce(a, b, ...) <op> const` 和 `ifNull(a, b) <op> const` 谓词，使每个参数对应列上的主键和跳过索引都能裁剪粒度。由新设置 `allow_key_condition_coalesce_rewrite` 控制 (默认开启) 。[#103468](https://github.com/ClickHouse/ClickHouse/pull/103468) ([Manuel](https://github.com/raimannma)).
* 通过优化转义斜杠的处理，显著提升了读取带有大型 JSON 元数据文件的 Iceberg 目录时的查询性能。[#103998](https://github.com/ClickHouse/ClickHouse/pull/103998) ([Mohaidoss](https://github.com/mohaidoss)).
* 在缓存被禁用时，避免了索引未压缩缓存的额外开销 (server setting `index_uncompressed_cache_size = 0`，默认即为此值) 。[#104063](https://github.com/ClickHouse/ClickHouse/pull/104063) ([Michael Kolupaev](https://github.com/al13n321)).
* 修复了 `ORDER BY ... LIMIT` 查询在搭配非选择性 `WHERE` 过滤器且 limit 较小时会读取过多粒度的问题。此前，按序读取之上的任何过滤器都会禁用按 mark range 拆分任务，因此管道无法在粒度之间取消，并会为每个 stream 读取整个分片。[#104112](https://github.com/ClickHouse/ClickHouse/pull/104112) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 修复了在重新调整 JOIN 两侧顺序后，未能复用 hash table 大小缓存的问题。[#104131](https://github.com/ClickHouse/ClickHouse/pull/104131) ([Nikita Taranov](https://github.com/nickitat)).
* 启用 `fsync_after_insert` 后，现在会通过 IO thread pool 并行对分片文件执行 fsync，从而加快宽表上 insert 的收尾过程。完整的 ClickBench `hits` 载入速度提升约 22%。[#104137](https://github.com/ClickHouse/ClickHouse/pull/104137) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在 AArch64 上使用 NEON 对 `find_first_symbols`、`find_first_not_symbols`、`find_last_symbols_or_null`、`find_last_not_symbols_or_null` 和 `splitInto` 进行了向量化。此前这些 helpers 仅在 x86 (SSE2 / SSE4.2) 上有 SIMD 路径，在 ARM 上则会退回到标量循环。在 ClickBench `hits` 数据集上，TSV parsing 提速约 2 倍，URL functions 和 `splitByChar` 提速约 1.3 倍；而对于非常密集的 JSON parsing (字段间隔小于 16 字节) ，性能会略有下降，这与现有 SSE2 的权衡一致。[#104228](https://github.com/ClickHouse/ClickHouse/pull/104228) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，通过简单 `ALIAS` 列读取数据 (例如 `some_alias['key']`，其中 `some_alias ALIAS m`) 时，会走与直接引用底层列相同的按 subcolumn 读取路径，从而重新获得 `Map`、`Array`、`Tuple` 和 `Nullable` 别名列可带来的大量 I/O 节省。[#104245](https://github.com/ClickHouse/ClickHouse/pull/104245) ([Raúl Marín](https://github.com/Algunenano)).
* 通过将每个查询的 `AsyncReadCounters` 改为无锁实现，降低了异步远程 FS 读取路径上的锁竞争。[#104374](https://github.com/ClickHouse/ClickHouse/pull/104374) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 小幅优化了 projections 按序扫描的查询计划。[#103723](https://github.com/ClickHouse/ClickHouse/pull/103723) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 扩展 `optimizeUseNormalProjections`，使其也能处理这样一种特定情况：虽然没有过滤掉任何内容，但 projection 的 sorting key 可以从查询计划中去掉排序步骤。[#104680](https://github.com/ClickHouse/ClickHouse/pull/104680) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 允许 `json.path[]` 语法糖和显式类型提示在带类型的 `JSON` 路径上正常工作。[#99179](https://github.com/ClickHouse/ClickHouse/pull/99179) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 将 `json.path[N].nested.path` (会展开为 `tupleElement(tupleElement(json.path[N], 'nested'), 'path')`) 优化为 `json.path[].nested.path[N]`，从而减少读取的数据量。[#99802](https://github.com/ClickHouse/ClickHouse/pull/99802) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 通过将数据库级别的 grant 检查移出逐表循环，优化 `system.parts` 中的 `SHOW TABLES` 访问检查。[#100860](https://github.com/ClickHouse/ClickHouse/pull/100860) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 移除 `system.tables` 中 `SELECT name` / `SELECT database, name` 快速路径里冗余的逐表 `SHOW TABLES` 访问检查。[#100881](https://github.com/ClickHouse/ClickHouse/pull/100881) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 在 macOS 上启用 JIT 编译。[#100947](https://github.com/ClickHouse/ClickHouse/pull/100947) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当行策略仅依赖排序键列且具有确定性时，跳过在 `FINAL` 之后延后应用该行策略；同时跳过该情况下由行策略强制触发的相应 `PREWHERE` 延后处理。[#102884](https://github.com/ClickHouse/ClickHouse/pull/102884) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 新增支持将 `hasAny` 和 `hasAll` 作为文本索引中的过滤谓词。[#103266](https://github.com/ClickHouse/ClickHouse/pull/103266) ([Anton Popov](https://github.com/CurtizJ)) 。
* 将长期存在的 MergeTree 堆状态 (每个 parts 和每张表的元数据) 分配到专用的 jemalloc arena 中，并通过 `jemalloc.mergetree_arena.*` 异步指标对外暴露。这样可以减少稳定运行状态下默认 arena 的碎片化，并避免每个 parts 中长期存活的对象占住原本可衰减回收的页。[#104136](https://github.com/ClickHouse/ClickHouse/pull/104136) ([Raúl Marín](https://github.com/Algunenano)) 。
* 改进高负载下 ZooKeeper 客户端的超时处理，适用于单个会话上有大量请求以管道化方式发送的场景。ZooKeeper 客户端现在使用基于进度的超时机制：只要在 `session_timeout_ms` 内从服务端收到任何数据，就会延长等待时间。每个请求仍受 `3 * session_timeout_ms` 的硬上限约束，以限制调用方延迟。关闭 [#100466](https://github.com/ClickHouse/ClickHouse/issues/100466)。[#104351](https://github.com/ClickHouse/ClickHouse/pull/104351) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 将每个事件的 trace 标志移到单独的数组中，并按需延迟分配，从而降低 `ProfileEvents` tracing 的开销。[#105030](https://github.com/ClickHouse/ClickHouse/pull/105030) ([Azat Khuzhin](https://github.com/azat)) 。
* 为 `ColumnDecimal` 添加 `compareTrackAt`，提升 `Decimal` 列的比较性能。[#105110](https://github.com/ClickHouse/ClickHouse/pull/105110) ([Artem Zuikov](https://github.com/4ertus2)) 。
* 新增 `MD5` 的 SIMD 实现 (`AVX2` / `AVX512`) ，可并行计算多个输入的哈希，从而提升吞吐量。[#105161](https://github.com/ClickHouse/ClickHouse/pull/105161) ([Joanna Hulboj](https://github.com/jh0x)) 。

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

* 改进了所有 ClickHouse 应用程序的帮助输出：`--help` 现在会稳定返回退出码 `0`、输出到 `stdout`，并且顶层 `clickhouse --help` 会列出所有子命令。为 `clickhouse start` / `restart` 新增了 `--no-sudo` 选项 (在 Docker 中很有用) ，以及 `clickhouse help` 子命令。这是来自 @qoega 的 [#58244](https://github.com/ClickHouse/ClickHouse/issues/58244) 的后续工作。[#98148](https://github.com/ClickHouse/ClickHouse/pull/98148) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `input_format_column_name_matching_mode` 的默认值已从 `match_case` 更改为 `auto`。对于会将输入列名与表 schema 进行匹配的输入格式 (`JSONEachRow`、`CSVWithNames`、`JSONColumns`、`BSONEachRow`、`RowBinaryWithNames` 等) ，现在会先尝试区分大小写匹配；如果未匹配到，再回退为不区分大小写匹配。此前的严格行为会在 `compatibility` 模式下保留。[#104320](https://github.com/ClickHouse/ClickHouse/pull/104320) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `STDDEV`，作为 `stddevSamp` 的不区分大小写别名，以兼容 PostgreSQL/SQL 标准。[#105120](https://github.com/ClickHouse/ClickHouse/pull/105120) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `array_to_string`，作为 `arrayStringConcat` 的不区分大小写别名，以兼容 PostgreSQL。[#105121](https://github.com/ClickHouse/ClickHouse/pull/105121) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `unnest`，作为 `arrayJoin` 的不区分大小写别名，以兼容 PostgreSQL (函数调用形式) 。[#105124](https://github.com/ClickHouse/ClickHouse/pull/105124) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `clickhouse-client` 中的进度条现在会在 RAM 旁显示磁盘临时数据的使用情况 (例如外部排序、aggregation 或 JOIN) ，其中还包括分布式查询按 host 细分的信息。[#105190](https://github.com/ClickHouse/ClickHouse/pull/105190) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `system.predicate_statistics_log`，这是一个新的采样日志，用于记录每个查询的 predicate 过滤器选择性，以及 MergeTree 索引粒度剪枝。默认禁用；可通过 `predicate_statistics_sample_rate` server setting 启用。这是自动索引和 projection 推荐所必需的。[#98727](https://github.com/ClickHouse/ClickHouse/pull/98727) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 启用 `skip_unavailable_shards` 时，如果本地 shard 缺少表，则允许跳过该 shard。[#100141](https://github.com/ClickHouse/ClickHouse/pull/100141) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当 Linux mdraid 阵列正在重新同步或处于降级状态时，会添加启动警告 (可在 `system.warnings` 中查看) ，因为这两种情况都可能影响磁盘 I/O 性能，或表明磁盘存在故障。[#100941](https://github.com/ClickHouse/ClickHouse/pull/100941) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* WASM UDFs 现在会显示在 `system.functions` 中，并且其 `origin` (`WasmUserDefined`) 、`syntax`、`arguments` 和 `returned_value` 列会根据其 ClickHouse 类型元数据正确填充。此前它们要么缺失，要么因 `origin` 错误而作为重复项列出。[#101053](https://github.com/ClickHouse/ClickHouse/pull/101053) ([Vasily Chekalkin](https://github.com/bacek)) 。
* `generate_series` table function 现在支持使用负 step 值生成降序 sequence，例如 `SELECT * FROM generate_series(99, 0, -1)`。[#101056](https://github.com/ClickHouse/ClickHouse/pull/101056) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复某些函数 (`dotProduct`、`formatRow`、`structureToCapnProtoSchema`/`structureToProtobufSchema`、用户自定义函数) 在 `DEFAULT`/`MATERIALIZED` 表达式、表引擎设置等延迟执行路径中使用时抛出的 `Context has expired` 异常：在需要时确保这些函数持有强引用的上下文。[#101109](https://github.com/ClickHouse/ClickHouse/pull/101109) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复对零限制创建的优先级误报 `Cache limits violated` 逻辑错误的问题 (例如启用 `enable_filesystem_query_cache_limit` 时按查询划分的文件系统缓存优先级) 。[#101428](https://github.com/ClickHouse/ClickHouse/pull/101428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `s3express` 端点自动检测区域。[#101520](https://github.com/ClickHouse/ClickHouse/pull/101520) ([Pradeep Chhetri](https://github.com/chhetripradeep)).
* 支持在向 `Iceberg` 写入时为数据文件指定字段 ID。关闭 [#102322](https://github.com/ClickHouse/ClickHouse/issues/102322)。[#102362](https://github.com/ClickHouse/ClickHouse/pull/102362) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* web UI (`play.html`) 中的左侧面板现在支持独立滚动，页面滚动时仍保持可见，并且点击某个表后会滚动到查询区域。[#102498](https://github.com/ClickHouse/ClickHouse/pull/102498) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在可以通过 Ctrl/Cmd/Shift+单击或鼠标中键单击左侧面板中的 ClickHouse 徽标，在新选项卡中打开 Play UI。[#102501](https://github.com/ClickHouse/ClickHouse/pull/102501) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增指标，用于跟踪所有表中投影主键和投影索引粒度占用的内存。[#102587](https://github.com/ClickHouse/ClickHouse/pull/102587) ([Narasimha Pakeer](https://github.com/npakeer)).
* 将 `max_network_bandwidth_for_user` 和 `max_network_bandwidth_for_all_users` 应用于远程文件系统的读写。[#103080](https://github.com/ClickHouse/ClickHouse/pull/103080) ([Azat Khuzhin](https://github.com/azat)).
* 在 Refreshable Materialized Views 持续刷新的情况下，基于快照中表的状态而非全局状态进行决策，从而提升备份的健壮性。[#103384](https://github.com/ClickHouse/ClickHouse/pull/103384) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* `SELECT * FROM system.databases` 现在无论 `show_data_lake_catalogs_in_system_tables` 设置如何，都会始终列出数据湖 catalog 数据库。此前默认会隐藏它们，这与始终显示它们的 `SHOW DATABASES` 不一致。[#103444](https://github.com/ClickHouse/ClickHouse/pull/103444) ([Alsu Giliazova](https://github.com/alsugiliazova)).
* 使代码中的服务器设置 `concurrent_threads_soft_limit_ratio_to_cores` 默认值与随附 `config.xml` 中的值 (`2`) 保持一致，因此即使未使用随附的 `config.xml`，默认的 `max_min_fair` 并发线程调度器也会开箱即用地将查询处理线程限制为 CPU 核心数的 2 倍。[#103446](https://github.com/ClickHouse/ClickHouse/pull/103446) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 提升解析器和字符串函数在边界情况的 sanitizer 稳健性：在 `getURLScheme` 中处理空输入；在 `Lexer::nextToken` 的 `max_query_size` 检查中避免空指针算术运算；以及在解码前对空 haystack 的 UTF-8 子序列评估进行短路处理。[#103489](https://github.com/ClickHouse/ClickHouse/pull/103489) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 改进了对 `divide(0, x)` 和 `intDiv(0, x)` 的单调性推断准确性：此前这些函数会被无条件视为单调，但 `0 / x` 在任何包含 0 的范围内都是非单调的，因为 `0 / 0` 未定义 (对 `divide` 而言会得到 `NaN`/`Inf`，对 `intDiv` 而言则会抛出除零异常) 。这一错误判断会导致 `KeyCondition::applyMonotonicFunctionsChainToRange` 生成 `left > right` 的范围；当主键上的 `IN` / `NOT IN` 表达式将键包裹为 `divide(0, key)` 或 `intDiv(0, key)` 时，会在调试构建中触发 `LOGICAL_ERROR` `Invalid binary search result in MergeTreeSetIndex`。发布构建不受影响——该断言受 `#ifndef NDEBUG` 控制。[#103621](https://github.com/ClickHouse/ClickHouse/pull/103621) ([Groene AI](https://github.com/groeneai)).
* 将 `HTTPConnectionPool*TCP{Rcv,Snd}BufBytes_{p50,p75,p90,p95}` 异步指标替换为 `system.histogram_metrics` 中基于 bucket 的直方图 `http_pool_tcp_buf_bytes` (标记为 `group`、`direction`) 。各组的异步指标总量仍予以保留。[#103704](https://github.com/ClickHouse/ClickHouse/pull/103704) ([Sema Checherinda](https://github.com/CheSema)).
* `system.server_settings` 现会将服务器设置 `{disk,storage,http}_connections_{rcvbuf,sndbuf}` 标记为可在无需重启的情况下修改。其值可通过 `SYSTEM RELOAD CONFIG` 更新；运行时生效路径自 [#100478](https://github.com/ClickHouse/ClickHouse/issues/100478) 起就已具备。[#103772](https://github.com/ClickHouse/ClickHouse/pull/103772) ([Sema Checherinda](https://github.com/CheSema)).
* 在 `flameGraph` 中新增对已解析符号 (`Array(String)`) 的支持。[#103816](https://github.com/ClickHouse/ClickHouse/pull/103816) ([Azat Khuzhin](https://github.com/azat)).
* CLI 客户端现在可以在其配置中指定 `<rainbow_parentheses>false</rainbow_parentheses>`，用于终端颜色与括号显示冲突的环境 (类似地，`clickhouse format` 现在也支持 `--no_rainbow_parentheses`) 。[#103851](https://github.com/ClickHouse/ClickHouse/pull/103851) ([Larry Snizek](https://github.com/larry-cdn77)).
* 修复了 `MultiVolnitsky` 的 UTF-8 不区分大小写搜索：在失败时回滚部分 `putNGram` 插入，并将失败的 needles 切换为 fallback searcher，从而避免状态不一致。[#103864](https://github.com/ClickHouse/ClickHouse/pull/103864) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* 在与 glibc 兼容的 musl 中，通过 `rseq` TLS 实现 `sched_getcpu`。[#104016](https://github.com/ClickHouse/ClickHouse/pull/104016) ([Azat Khuzhin](https://github.com/azat)).
* APPEND 模式下的 Replicated 可刷新materialized view 在刷新期间如果与 ZooKeeper 的连接短暂中断，将不再发生重复刷新两次的问题。[#104051](https://github.com/ClickHouse/ClickHouse/pull/104051) ([Michael Kolupaev](https://github.com/al13n321)).
* 允许未显式指定列列表的分布式表根据推断出的远程表结构来校验分片键。[#104111](https://github.com/ClickHouse/ClickHouse/pull/104111) ([Yue](https://github.com/niyue)).
* 修复带有 `Azure` `abfss` 路径的 REST catalog。[#104120](https://github.com/ClickHouse/ClickHouse/pull/104120) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 在 Keeper S3 snapshot client 中支持 `role_arn` 和 `role_session_name` 身份验证设置，使 snapshot 上传能够使用基于 STS `AssumeRole` 的身份验证。[#104140](https://github.com/ClickHouse/ClickHouse/pull/104140) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了运行带有 `MATERIALIZED` CTE 的查询时出现的内存泄漏问题。[#104153](https://github.com/ClickHouse/ClickHouse/pull/104153) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `lowerUTF8` / `upperUTF8` 在处理大型非 ASCII 数据集时 (例如构建文本索引期间) 抛出异常的问题：当累计输出缓冲区超过 2 GiB 时会出错；现在会以明确的错误信息拒绝超长单行。[#104229](https://github.com/ClickHouse/ClickHouse/pull/104229) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 增强了 MergeTree 列统计信息加载在瞬时 I/O 故障下的健壮性，避免受影响的 parts 永久禁用基于统计信息的优化。[#104372](https://github.com/ClickHouse/ClickHouse/pull/104372) ([zoomxi](https://github.com/zoomxi)).
* `INSERT INTO ... SELECT FROM input(...)` 不再需要 `CREATE TEMPORARY TABLE` grant。[#104470](https://github.com/ClickHouse/ClickHouse/pull/104470) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增 MergeTree setting `concurrent_part_removal_threshold_for_remote_disk` (默认值为 `16`) ：当待删除的 parts 中至少有一个存储在远程 disk 上时，将使用该设置替代 `concurrent_part_removal_threshold`。此前的阈值 `100` 可能导致对象存储后端上的 `DROP TABLE` 及其他 part 删除操作卡顿数十秒，因为即使每次删除都是一次独立的网络往返，这些删除仍会串行执行。新 setting 会让远程存储更早进入并行删除路径，同时保持本地 disk 的行为不变。[#104676](https://github.com/ClickHouse/ClickHouse/pull/104676) ([Groene AI](https://github.com/groeneai)).
* 新 setting `defer_partition_pruning_after_final` (默认值为 `1`) 使 26.3 中引入的在 `FINAL` 下跳过 partition pruning 的行为变为可选择退出。将其设为 `0` 可恢复 26.3 之前的 partition pruning——对于相同 PK 的行不会跨分区的事件日志 workload，速度会明显更快。`compatibility = '26.2'` 会自动将其切换为 `0`。[#104705](https://github.com/ClickHouse/ClickHouse/pull/104705) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复了 `intExp2` 对超出范围的输入返回错误结果的问题 (包括 JIT 下 `>= 64` 的移位，以及两条代码路径中绝对值超过 `INT_MAX` 的整数) 。[#105054](https://github.com/ClickHouse/ClickHouse/pull/105054) ([Raúl Marín](https://github.com/Algunenano)).
* 在 `clickhouse install` 和 `clickhouse git-import` 中，为基于 CLI 选项和解析后输入构建的 shell arguments 添加引号，从而能够正确处理包含空白字符或 shell 元字符的路径、用户/组名称以及 commit 哈希。[#105232](https://github.com/ClickHouse/ClickHouse/pull/105232) ([Raúl Marín](https://github.com/Algunenano)).
* `Alias` table engine 现已不再属于 Experimental，无需 `allow_experimental_alias_table_engine` setting 即可使用。[#103488](https://github.com/ClickHouse/ClickHouse/pull/103488) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 `clickhouse-benchmark` 添加了 `--queries-format` 选项，可在默认的制表符转义、每行一条查询的输入格式 (`tsv`) 与将标准输入解析为由 `;` 分隔的多查询脚本 (`script`) 之间进行选择。[#99972](https://github.com/ClickHouse/ClickHouse/pull/99972) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* 逐元素的 Tuple operators `tuplePlus`、`tupleMinus`、`tupleMultiply`、`tupleDivide`、`tupleModulo`、`tupleIntDiv` 和 `tupleIntDivOrZero` 现在支持可变参数，可接受两个或更多大小相同的 tuples，并以左折叠方式逐元素应用。此前它们只能接受恰好两个参数。[#104659](https://github.com/ClickHouse/ClickHouse/pull/104659) ([Aruj Bansal](https://github.com/arujbansal)).
* 在 `/processors-profile` 新增了一个内置 Web UI，可将任意历史 `SELECT` 查询的管道以热力图形式可视化，数据来自 `system.query_log` 和 `system.processors_profile_log`。每个处理器都会根据其 `elapsed_us` 着色，并在悬停时显示该处理器的统计信息 (行数、字节数、等待时间) 。[#104614](https://github.com/ClickHouse/ClickHouse/pull/104614) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* 设置 `query_plan_use_logical_join_step` (及其别名 `query_plan_use_new_logical_join_step`) 现已废弃且不再生效；现在始终使用逻辑 join 步骤。[#104017](https://github.com/ClickHouse/ClickHouse/pull/104017) ([Vladimir Cherkasov](https://github.com/vdimir)).
* `play.html` 以及其他内置网页 (`dashboard.html`、`jemalloc.html`、`merges.html`、`binary.html`、`webterminal.html`) 中的 `user` 输入框不再预填字面文本 `default`。现在会显示 `user` 占位提示，且默认留空。留空时，页面不会发送 `user=` URL 参数 (WebTerminal 的认证 JSON 也会省略 `user` 字段) ，因此服务器会按其常规回退逻辑使用 `default` 用户——而且通过其他渠道提供的 HTTP 凭据 (`X-ClickHouse-User`、HTTP Basic、每个 handler 的 `<handler><user>` configuration) 也不再会被覆盖。[#105254](https://github.com/ClickHouse/ClickHouse/pull/105254) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `ORC` reader：将基于偏移量的读取 (`readBigAt`) 与 `use_prefetch` 解耦，因此 `HDFS` 上经过 EC 编码的数据即使在 `use_prefetch = false` 时 (例如由 Gluten 设置) 也能被正确读取。[#103348](https://github.com/ClickHouse/ClickHouse/pull/103348) ([zhanglistar](https://github.com/zhanglistar)).
* 现在，从 `play.html` 以 `CSVWithNames` 格式下载的文件会使用 `.csv` 文件扩展名。[#103737](https://github.com/ClickHouse/ClickHouse/pull/103737) ([JackFielding](https://github.com/JackFielding)).
* 为 BigLake catalog 增加了更多输入校验。[#105117](https://github.com/ClickHouse/ClickHouse/pull/105117) ([Konstantin Vedernikov](https://github.com/scanhex12)).

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

* 通过记住表达式是否带括号，修复格式不一致的问题。[#92340](https://github.com/ClickHouse/ClickHouse/pull/92340) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `Decimal` 与 Float 类型之间无法准确比较的问题。[#94293](https://github.com/ClickHouse/ClickHouse/pull/94293) ([zoomxi](https://github.com/zoomxi)).
* 允许在分布式查询中使用位置参数。[#94359](https://github.com/ClickHouse/ClickHouse/pull/94359) ([simonmichal](https://github.com/simonmichal)).
* 修复删除并重新创建同名 materialized view 时，`DatabaseCatalog::updateDependencies` 中出现的断言失败；同时修复在引用依赖为空时，`RENAME TABLE` 或 `EXCHANGE TABLES` 过程中视图依赖被静默丢失的问题。[#98779](https://github.com/ClickHouse/ClickHouse/pull/98779) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复一个服务器中止问题 (`DatabaseCatalog::getTableImpl` 中的断言失败) ：当通过 `ON CLUSTER` 创建表，且其 UUID 与现有数据库的 UUID 相同时，会触发该问题。[#98861](https://github.com/ClickHouse/ClickHouse/pull/98861) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复启用设置 `use_skip_indexes_on_data_read` 时，数据读取阶段使用跳过索引以及处理由轻量级更新创建的现有补丁分区片段时的问题。[#99543](https://github.com/ClickHouse/ClickHouse/pull/99543) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复当查询优化器将带有 `IN (subquery)` 的过滤器下推到 PREWHERE 时出现的 "Not-ready Set" 异常。[#100375](https://github.com/ClickHouse/ClickHouse/pull/100375) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在单条 `ALTER TABLE` 语句中同时使用 `ADD COLUMN` 和 `RENAME COLUMN` 时出现的 "Cannot find column" 错误。[#100387](https://github.com/ClickHouse/ClickHouse/pull/100387) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复视图在混合使用 `UNION` 和 `INTERSECT`/`EXCEPT` 运算符时，于 `DETACH`/`ATTACH` 或服务器重启后返回错误结果的问题。[#100390](https://github.com/ClickHouse/ClickHouse/pull/100390) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在 IN 子句中出现关联子查询时，使用 AST fuzzer 进行压力测试期间可能发生的 "Trying to execute PLACEHOLDER action" 异常。[#100398](https://github.com/ClickHouse/ClickHouse/pull/100398) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复向按 `year`、`month` 或 `day` transform 分区、且包含 `Date` 列的 Iceberg table 插入数据时出现的 logical error 异常。[#100404](https://github.com/ClickHouse/ClickHouse/pull/100404) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在 `ALTER TABLE MODIFY COLUMN` 更改列类型后，跳过索引仍用于不兼容数据的问题，这可能导致 sanitizer 构建中的服务器崩溃或查询结果错误。[#100526](https://github.com/ClickHouse/ClickHouse/pull/100526) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `paimonCluster`、`paimonS3Cluster`、`paimonAzureCluster` 和 `deltaLakeS3` table function 在 `query_log` 中泄露凭据的问题。[#100529](https://github.com/ClickHouse/ClickHouse/pull/100529) ([JIaQi Tang](https://github.com/JiaQiTang98)).
* 修复 Kafka 引擎表执行 `DROP TABLE` 时，因 `rd_kafka_consumer_close` 中的死锁而可能无限期挂起的问题。[#100604](https://github.com/ClickHouse/ClickHouse/pull/100604) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将硬编码的 `source_table_engines` 列表替换为通过 `StorageFactory` 和 `DatabaseFactory` 在 runtime 中查找。为 `DatabaseFactory::EngineFeatures` 添加 `source_access_type`，使使用源引擎 (PostgreSQL、MySQL、S3 等) 的 `CREATE DATABASE` 与 `CREATE TABLE` 一样需要相同的源授权。修复了在 `table_engines_require_grant=false` 时 `GRANT TABLE ENGINE ON *` 执行失败的问题。关闭 [#71544](https://github.com/ClickHouse/ClickHouse/issues/71544)。[#100746](https://github.com/ClickHouse/ClickHouse/pull/100746) ([pufit](https://github.com/pufit)).
* 修复了读取某些表时可能发生的 server crash：这些表的 `ALIAS` 列中包含嵌套在函数调用内的关联子查询 (例如 `ALIAS toString(intDivOrZero(x, (SELECT ...)))`) 。现在，`CREATE TABLE` 和 `ALTER TABLE` 会以 `THERE_IS_NO_DEFAULT_VALUE` 拒绝出现在 `DEFAULT` / `ALIAS` / `MATERIALIZED` 列表达式中、任意嵌套深度的任何子查询。此前，浅层校验会放过嵌套子查询，因此关联场景会在读取时崩溃，而嵌套的非关联场景虽然看似可用，却可能导致异常行为；现在这两类情况都会在 DDL 阶段被拒绝。[#100753](https://github.com/ClickHouse/ClickHouse/pull/100753) ([Groene AI](https://github.com/groeneai)).
* 修复了一个 server crash (`Logical error: Bad cast from type DB::FunctionNode to DB::ColumnNode`) ：当对带有 `CONSTRAINT ... ASSUME` 定义的表执行包含关联子查询的查询，且启用了 `optimize_substitute_columns` 和 `convert_query_to_cnf` settings 时，可能会触发该问题。[#100756](https://github.com/ClickHouse/ClickHouse/pull/100756) ([Groene AI](https://github.com/groeneai)).
* 修复了向 JSON column 插入一行时可能出现的异常：该行在引入新动态字段的同时，还为某个类型化字段提供了不兼容的值，并且该列随后被用作 GROUP BY 键。[#100758](https://github.com/ClickHouse/ClickHouse/pull/100758) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复了通过 `DiskObjectStorageTransaction` 路径进行的 S3/对象存储写入会被静默绕过 workload IO scheduling 的问题 (该路径用于 `s3_with_keeper` disks，以及在 `use_fake_transaction=false` 时显式使用) 。此前，向这类 disk 上的 MergeTree tables 执行 INSERT 写入时，会忽略 `CREATE RESOURCE` / `CREATE WORKLOAD` throttling，因为事务性写入路径从未将资源链接注入 `WriteSettings`。[#100777](https://github.com/ClickHouse/ClickHouse/pull/100777) ([JIaQi Tang](https://github.com/JiaQiTang98)).
* 修复了 `Protobuf` 与 `ProtobufList` 共用 schema-cache 时的冲突问题：先以 `FORMAT Protobuf` 读取消息，再以 `FORMAT ProtobufList` 读取时可能失败，因为 `ProtobufList` 会强制将缓存的 schema 转换为其 envelope 形式。现在，当没有可用的 envelope schema 时，`ProtobufList` 会回退到缓存的消息类型。[#100849](https://github.com/ClickHouse/ClickHouse/pull/100849) ([Callum Cooper](https://github.com/callumc34)).
* 修复了 Rust CXX bridge 中因 `std::exception` ABI 不匹配导致的 heap-buffer-overflow。[#100931](https://github.com/ClickHouse/ClickHouse/pull/100931) ([Azat Khuzhin](https://github.com/azat)).
* `FunctionVariantAdaptor` 现在会在所有 `Variant` 备选类型都与函数不兼容时抛出 `ILLEGAL_TYPE_OF_ARGUMENT`，而不是静默返回 `Nullable(Nothing)`。此前，如果没有任何备选类型兼容，`WHERE function(variant_col)` predicate 会在不报错的情况下返回 0 行，而等效的 `SELECT` 上下文则已经会正确抛出错误。[#100939](https://github.com/ClickHouse/ClickHouse/pull/100939) ([Vasily Chekalkin](https://github.com/bacek)).
* 当 database 中包含视图时，`TRUNCATE ALL TABLES` 不再失败。[#100943](https://github.com/ClickHouse/ClickHouse/pull/100943) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `optimize_rewrite_array_exists_to_has` 优化，使其能够正确处理类型不兼容的情况 (如 Date 与 String) ，并默认重新启用该优化。[#100944](https://github.com/ClickHouse/ClickHouse/pull/100944) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 S3 设置优先级：`storage_configuration` 的磁盘设置现在会覆盖全局 `<s3>` 部分，而用户/profile/查询级别的设置会覆盖前两者。[#100975](https://github.com/ClickHouse/ClickHouse/pull/100975) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 BFloat16、Float32 和 Float64 列在稀疏序列化过程中丢失负零 (-0.0) 符号的问题。[#100983](https://github.com/ClickHouse/ClickHouse/pull/100983) ([Takumi Hara](https://github.com/takumihara)).
* 修复读取 WKT 编码的 GeoParquet 和 Arrow 文件时所用 WKT 几何解析器中的两个 bug：`MULTILINESTRING` 几何对象此前会被错误解析为 `Polygon` (导致类型化列抛出异常，并使混合 `Geometry` 列发生静默数据损坏) ；此外，不包含类型关键字的格式错误 WKT 字符串此前会触发未定义行为，而不是返回明确的错误。[#100997](https://github.com/ClickHouse/ClickHouse/pull/100997) ([Vasily Chekalkin](https://github.com/bacek)).
* 修复单个 shard 上分布式表的 `grouping`/`GROUPING SETS` 查询失败，并报错 "Method executeImpl is not supported for 'grouping' function" 的问题。[#101030](https://github.com/ClickHouse/ClickHouse/pull/101030) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 planner 中的 `LOGICAL_ERROR` "Column identifier is already registered"，该问题可能在同一个表表达式被多次处理时出现。[#101048](https://github.com/ClickHouse/ClickHouse/pull/101048) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在 `additional_result_filter` 设置与 UNION 或 EXCEPT 查询一起使用时出现的 LOGICAL\_ERROR 异常 "Column identifier is already registered"。[#101051](https://github.com/ClickHouse/ClickHouse/pull/101051) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复将 `* APPLY` 与 aggregate functions 以及 `group_by_use_nulls=1` 配合 GROUPING SETS、ROLLUP 或 CUBE 使用时发生的 server crash (Logical error: Bad cast from ColumnVector to ColumnNullable) 。[#101062](https://github.com/ClickHouse/ClickHouse/pull/101062) ([Groene AI](https://github.com/groeneai)).
* 修复当 `input_format_csv_skip_first_lines` 或 `input_format_tsv_skip_first_lines` 超过文件总行数时出现的无限循环问题。[#101111](https://github.com/ClickHouse/ClickHouse/pull/101111) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 lazy materialization optimization 中的越界访问问题，该问题可能会在调试构建中导致异常。[#101144](https://github.com/ClickHouse/ClickHouse/pull/101144) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复递归 CTE 中的 type inference：现在会通过 `getLeastSupertype` 在 `UNION ALL` 的非递归部分和递归部分之间迭代扩展列类型，直到收敛，从而避免 `x + 1` 这类表达式中的整数 overflow。[#101155](https://github.com/ClickHouse/ClickHouse/pull/101155) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 MergeTree 压缩块大小设置 (max\_compress\_block\_size、min\_compress\_block\_size、marks\_compress\_block\_size、primary\_key\_compress\_block\_size) 限制为 256 MiB，以防止通过 CREATE TABLE SETTINGS 设置极端值时发生 server crash。[#101159](https://github.com/ClickHouse/ClickHouse/pull/101159) ([Groene AI](https://github.com/groeneai)).
* 修复当 ROW POLICY 在其 `USING` clause 中使用标量子查询 (例如 `USING (SELECT 1)`) 时，`QueryAnalyzer::resolve()` 发生的 LOGICAL\_ERROR 崩溃。关闭 [#100695](https://github.com/ClickHouse/ClickHouse/issues/100695)。[#101263](https://github.com/ClickHouse/ClickHouse/pull/101263) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `MergeTreeDataPartWriterCompact::cancel` 在流分配失败时的未定义行为。[#101292](https://github.com/ClickHouse/ClickHouse/pull/101292) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 ALTER 语句中赋值时未包含时区的情况。关闭 [#101328](https://github.com/ClickHouse/ClickHouse/issues/101328)。相关：[https://github.com/ClickHouse/ClickHouse/pull/100647。\[#101403](https://github.com/ClickHouse/ClickHouse/pull/100647。\[#101403)]\([https://github.com/ClickHouse/ClickHouse/pull/101403](https://github.com/ClickHouse/ClickHouse/pull/101403)) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复当 SELECT 管道产生多个流时，带有 ORDER BY ALL 的 INSERT SELECT 查询会导致服务器崩溃 (LOGICAL\_ERROR) 。[#101443](https://github.com/ClickHouse/ClickHouse/pull/101443) ([Groene AI](https://github.com/groeneai)) 。
* 修复因 join 重排序将 INNER JOIN 过滤器 (仅引用 outer join 的保留侧) 推入 outer join 的 ON 子句而导致的错误查询结果。[#101504](https://github.com/ClickHouse/ClickHouse/pull/101504) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 对包含 arrayJoin 的执行计划跳过应用 lazy materialization，否则可能导致 LIMIT 未生效。关闭 [#101608](https://github.com/ClickHouse/ClickHouse/issues/101608)。[#101644](https://github.com/ClickHouse/ClickHouse/pull/101644) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复 `mergeFilterIntoJoinCondition` 优化在静默丢弃类型不匹配的 WHERE 等值条件时，导致 JOIN 查询结果错误的问题。[#101652](https://github.com/ClickHouse/ClickHouse/pull/101652) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 修复 `error` 测试提示对 syntax/parsing error 不生效的问题——此前，对于格式错误的查询，使用 `-- { error SYNTAX_ERROR }` 会报出 "Expected server error"，而不是匹配客户端 parse error。[#101675](https://github.com/ClickHouse/ClickHouse/pull/101675) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `INTO OUTFILE ... TRUNCATE` 实际并未使用原子重命名的问题——数据会直接写入原始文件，而不是临时文件，因此查询失败时原有内容会被破坏。现在数据会先写入临时文件，只有成功后才会重命名。[#101884](https://github.com/ClickHouse/ClickHouse/pull/101884) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复读取 schema 包含 varchar(n) 或 char(n) 列类型的 Delta Lake 表时出现的异常 `Unsupported DeltaLake type: varchar(n)`。这些类型现在会映射为 String，这与 Delta Lake 协议在 Parquet 中将其存储为普通字节数组的方式一致。[#101973](https://github.com/ClickHouse/ClickHouse/pull/101973) ([Flavio Malavazi](https://github.com/flaviomalavazi)) 。
* 修复从 S3 读取 tar 归档且 `schema_inference_mode=union` 并包含异构 Parquet schema 时发生的静默数据丢失问题——Parquet 元数据缓存错误地将第一个文件的元数据复用于归档中的后续所有文件。[#101990](https://github.com/ClickHouse/ClickHouse/pull/101990) ([Ahaan Limaye](https://github.com/ahaanlimaye)) 。
* 修复在同一服务器生命周期内，如果某个 Iceberg 表此前未执行过 SELECT 或 INSERT，则对其执行 ALTER TABLE UPDATE/DELETE 会导致服务器崩溃 (LOGICAL\_ERROR) 的问题。[#102113](https://github.com/ClickHouse/ClickHouse/pull/102113) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在内存数据库中的表 (例如临时表) 上执行 ALTER 查询时可能发生崩溃的问题。[#102360](https://github.com/ClickHouse/ClickHouse/pull/102360) ([Den Kalantaevskii](https://github.com/Diskein)).
* 修复了 `formatQuery` 在格式化同一 source 上向后兼容的 READ/WRITE 授权时，会生成重复授权 (如 `GRANT FILE ON *.*, FILE ON *.* TO x`) 而非 `GRANT FILE ON *.* TO x` 的问题。[#102411](https://github.com/ClickHouse/ClickHouse/pull/102411) ([Groene AI](https://github.com/groeneai)).
* 修复了当 `max_streams_to_max_threads_ratio` 大于 1 时，read-in-order 查询后的聚合失去并行性的问题。[#102467](https://github.com/ClickHouse/ClickHouse/pull/102467) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了从 Buffer 表引擎中选择子列 (例如 Nullable 的 `.null`、Array 的 `.size0`、Tuple 元素或 map 键/值) 时发生的崩溃问题 (`LOGICAL_ERROR: Unknown virtual column`) 。[#102470](https://github.com/ClickHouse/ClickHouse/pull/102470) ([Groene AI](https://github.com/groeneai)).
* 修复了在 join 重排优化中，当带有 `join_use_nulls` 的 LEFT/RIGHT JOIN 与其他涉及两个以上表的 JOIN 组合时出现的异常 "Cannot fold actions for projection"。[#102516](https://github.com/ClickHouse/ClickHouse/pull/102516) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 numericIndexedVector 上标量按元素操作 (例如 `numericIndexedVectorPointwiseAdd`) 在标量超出范围时的静默溢出问题。现在这类输入会抛出 `INCORRECT_DATA`，而不是返回损坏的值。[#102546](https://github.com/ClickHouse/ClickHouse/pull/102546) ([FriendLey](https://github.com/FriendLey)).
* 修复了带有 SAMPLE 和查询级 OFFSET 的 INSERT 语句 AST 格式不一致的问题。关闭 [#102523](https://github.com/ClickHouse/ClickHouse/issues/102523)。[#102547](https://github.com/ClickHouse/ClickHouse/pull/102547) ([zoomxi](https://github.com/zoomxi)).
* 修复了 `groupConcat` 在反序列化格式错误的 aggregate function 状态时触发 `LOGICAL_ERROR` 异常的问题。[#102558](https://github.com/ClickHouse/ClickHouse/pull/102558) ([Christoph Wurm](https://github.com/cwurm)).
* 现在，当 `input_format_csv_use_default_on_bad_values=0` 时，不再接受 Time64 CSV 值末尾的垃圾内容。关闭 [#102490](https://github.com/ClickHouse/ClickHouse/issues/102490)。[#102596](https://github.com/ClickHouse/ClickHouse/pull/102596) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了向具有 Enum 类型路径的 JSON 列插入默认值时出现 UNKNOWN\_ELEMENT\_OF\_ENUM 异常的问题。关闭 [#102359](https://github.com/ClickHouse/ClickHouse/issues/102359)。[#102687](https://github.com/ClickHouse/ClickHouse/pull/102687) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在某些情况下，列重命名期间 `columns&#95;substreams.txt` 损坏的问题。关闭 [#102259](https://github.com/ClickHouse/ClickHouse/issues/102259)。[#102689](https://github.com/ClickHouse/ClickHouse/pull/102689) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 JSON 解析期间向 Time 数据类型插入数据的问题。关闭 [#102016](https://github.com/ClickHouse/ClickHouse/issues/102016)。[#102690](https://github.com/ClickHouse/ClickHouse/pull/102690) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了缓存的 schema 文件名中内容样本十六进制编码的问题。关闭 [#101904](https://github.com/ClickHouse/ClickHouse/issues/101904)。[#102703](https://github.com/ClickHouse/ClickHouse/pull/102703) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `SummingMergeTree` merge 期间的排序顺序违例问题：当 `ORDER BY` 键是基于包含 signaling NaN 值的 `Float32` 列的哈希表达式时，会在 debug 版本中崩溃、在 release 版本中静默导致数据损坏。[#102791](https://github.com/ClickHouse/ClickHouse/pull/102791) ([Groene AI](https://github.com/groeneai)).
* 使 `DETACH DATABASE ... SYNC` 以及其他调用 `waitDetachedTableNotInUse` 的操作可通过 `KILL QUERY` 取消，并能响应服务器关闭，从而避免并发查询持有表引用时无限期挂起。[#102804](https://github.com/ClickHouse/ClickHouse/pull/102804) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 `ANY RIGHT JOIN` 可能返回错误结果的问题。[#102893](https://github.com/ClickHouse/ClickHouse/pull/102893) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了 S3 请求失败后未进行重试、而是直接报出 `ios_base::clear: unspecified iostream_category error` 的问题，原因是 Poco 的 `BufferedStreamBuf::flushBuffer` 未处理来自套接字层的短写入。[#102894](https://github.com/ClickHouse/ClickHouse/pull/102894) ([Sema Checherinda](https://github.com/CheSema)).
* 修复了 `input('auto')` 表函数在 INSERT SELECT 查询中通过 HTTP 接口调用时失败的问题。[#102902](https://github.com/ClickHouse/ClickHouse/pull/102902) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 在存在行策略/additional\_table\_filters 时禁用简单的 LIMIT 优化 (以支持并行索引分析) 。[#102921](https://github.com/ClickHouse/ClickHouse/pull/102921) ([Azat Khuzhin](https://github.com/azat)).
* 在 `HMAC` SQL 函数中隐藏 secret key。修复 [#102927](https://github.com/ClickHouse/ClickHouse/issues/102927)。[#102997](https://github.com/ClickHouse/ClickHouse/pull/102997) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 修复了启用 `optimize_syntax_fuse_functions` 时，分布式查询中多次引用同一个 `quantile` 调用 (例如在 `SELECT`、`HAVING` 和 `ORDER BY` 中) 会触发 `MULTIPLE_EXPRESSIONS_FOR_ALIAS` 异常的问题。[#103014](https://github.com/ClickHouse/ClickHouse/pull/103014) ([tanner-bruce](https://github.com/tanner-bruce)).
* 修复了 CI 发现的一种情况：当过滤器依赖左侧列时，传入了一个尚未就绪的 Set。关闭 [#102966](https://github.com/ClickHouse/ClickHouse/issues/102966)。[#103029](https://github.com/ClickHouse/ClickHouse/pull/103029) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 castOrNull 在某些情况下转换为 JSON 时的问题。关闭 [#101818](https://github.com/ClickHouse/ClickHouse/issues/101818)。[#103036](https://github.com/ClickHouse/ClickHouse/pull/103036) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `SELECT DISTINCT` 静默返回不完整结果的问题：当聚合 projection 与查询匹配，但表中的某些 parts 没有 projection 数据时 (例如在表中已有数据后才添加 projection，且未运行 `MATERIALIZE PROJECTION`) 。关闭 [#102951](https://github.com/ClickHouse/ClickHouse/issues/102951)。[#103052](https://github.com/ClickHouse/ClickHouse/pull/103052) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了 analyzer 在进行公共表达式提取时，如果 `WHERE` predicate (例如 `AND(OR(A, A), A)`) 折叠为单个顶层 argument，会触发 `TOO_FEW_ARGUMENTS_FOR_FUNCTION` 异常的问题。[#103072](https://github.com/ClickHouse/ClickHouse/pull/103072) ([Peng](https://github.com/fastio)).
* 修复对包含 `QBit` 元素的 tuple、map 或 array 求值 `if`/`ifNull` 时触发的逻辑错误 `Function writeSlice expects same column types for GenericArraySlice and GenericArraySink`。`ColumnQBit::structureEquals` 错误地将一个 `QBit` 列的内部 tuple 与另一个 `QBit` 列的外层包装进行比较，导致结构相同的 `QBit` 列被误判为不同。[#103084](https://github.com/ClickHouse/ClickHouse/pull/103084) ([Groene AI](https://github.com/groeneai)).
* 修复在持有表引用时，启用 `database_atomic_wait_for_drop_and_detach_synchronously` 的 `DETACH DATABASE` 不响应 `KILL QUERY`、而是无限期挂起的问题。[#103095](https://github.com/ClickHouse/ClickHouse/pull/103095) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复使用非标识符 predicate (例如 `WHERE 1=1`) 删除 WASM 模块时发生的 segfault。[#103101](https://github.com/ClickHouse/ClickHouse/pull/103101) ([Joe Redfern](https://github.com/JosephRedfern)).
* 修复向较新 server 通过 `remote()` 或分布式表执行 insert 时的向后兼容性问题：由于 `processInsertQuery` 末尾无条件调用 `sendProgress`，旧客户端会报 `UNEXPECTED_PACKET_FROM_SERVER` 错误而失败。[#103148](https://github.com/ClickHouse/ClickHouse/pull/103148) ([Sema Checherinda](https://github.com/CheSema)).
* 当 IN 的第二个参数是非常量 tuple 时，不得将 tuple 元素 CAST 为更窄的 LHS 类型，否则可能导致 overflow。关闭 [#103055](https://github.com/ClickHouse/ClickHouse/issues/103055)。[#103169](https://github.com/ClickHouse/ClickHouse/pull/103169) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复 protocol function 中使用未初始化值的问题。[#103187](https://github.com/ClickHouse/ClickHouse/pull/103187) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 MergeTree 索引分析期间出现的 `LOGICAL_ERROR` (`Bad cast … to ColumnLowCardinality`) ：当 `WHERE` 子句将 `LowCardinality` 键列与一个 CAST 为包含嵌套 `LowCardinality` 的类型的常量进行比较时 (例如 `Variant(LowCardinality(Date), String)`) 。[#103211](https://github.com/ClickHouse/ClickHouse/pull/103211) ([Groene AI](https://github.com/groeneai)).
* 修复 `timeSeries*ToGrid` aggregate function 家族 (例如 `timeSeriesResampleToGridWithStaleness`、`timeSeriesChangesToGrid`、`timeSeriesResetsToGrid`、`timeSeriesRateToGrid`) 在使用极端 timestamp 参数调用时出现的 `Logical error: 'index < bucket_count'`。这类参数会在计算 bucket count 时导致有符号 64 位算术 overflow。同时将 grid buckets 总数限制为最多 1600 万，以防止对抗性输入意外触发大内存分配。[#103223](https://github.com/ClickHouse/ClickHouse/pull/103223) ([Groene AI](https://github.com/groeneai)).
* 修复 `ReplacingMergeTree` 的 lazy `FINAL` 路径中，在管道扩展期间抛出的 `Logical error: 'Port is already connected'` 异常。该 bug 会影响设置了 `query_plan_optimize_lazy_final = 1` 的查询：当 `ReadFromMergeTree::initializePipeline` 插入内部 transforms (例如 `Resize`) 并将子管道中的 processors 连接起来时，`LazyUnorderedReadFromMergeTreeSource::expandPipeline` 会尝试再次连接已经连接的输出 ports。[#103230](https://github.com/ClickHouse/ClickHouse/pull/103230) ([Groene AI](https://github.com/groeneai)).
* 修复当输入是已排序 subqueries 的 `UNION ALL` 时，`LIMIT BY` 和 `DISTINCT` 返回错误结果的问题。查询计划优化器错误地将这类 union 视为全局有序，因此返回了额外的行。[#103231](https://github.com/ClickHouse/ClickHouse/pull/103231) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复在启用 lazy replication 的 Map type 上计算 statistics 时可能发生的崩溃。关闭 [#102390](https://github.com/ClickHouse/ClickHouse/issues/102390)。[#103273](https://github.com/ClickHouse/ClickHouse/pull/103273) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 ClickHouse、MySQL、PostgreSQL 和 XDBC 字典源中的一个数据竞争问题：`clone() const` 会读取同一个 `invalidate_query_response` 字符串，而 `isModified() const` 会向其写入。 [#103277](https://github.com/ClickHouse/ClickHouse/pull/103277) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复 `Date32` 的单调性检测错误。关闭 [#101265](https://github.com/ClickHouse/ClickHouse/issues/101265)。 [#103283](https://github.com/ClickHouse/ClickHouse/pull/103283) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 将认证前 TCP Hello 数据包中的字符串限制为 64 KB，并新增 `handshake_timeout_milliseconds` 服务器设置来限制总握手时间，防止未认证客户端占用过多内存或无限期占用线程。 [#103284](https://github.com/ClickHouse/ClickHouse/pull/103284) ([Sema Checherinda](https://github.com/CheSema)).
* 修复 Parquet ColumnIndex 统计信息中 String 列出现 `min_value > max_value` 的问题。 [#103334](https://github.com/ClickHouse/ClickHouse/pull/103334) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)).
* 修复 `flattenTuple` 和 `tupleToNameValuePairs` 在处理 `Nullable(Tuple(...))` 输入时对 NULL 行处理不正确的问题。`flattenTuple` 现在会保留外层 null map，因此 NULL 行会保持为 NULL。`tupleToNameValuePairs` 现在会在输入为 `Nullable(Tuple(...))` 时，尽可能将结果的值类型改为 `Nullable(T)`，这样 NULL 行会生成 `[('a', NULL), ('b', NULL)]`，而不是 `[('a', 0), ('b', 0)]`。当元素类型无法包装为 `Nullable` (例如 `Array`) 时，将使用默认值而非 NULL。关闭 [#103312](https://github.com/ClickHouse/ClickHouse/issues/103312)。 [#103383](https://github.com/ClickHouse/ClickHouse/pull/103383) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 在 Native format 中检查格式错误的展平 Dynamic 数据。 [#103392](https://github.com/ClickHouse/ClickHouse/pull/103392) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复快照同步后因过时 RPC 导致复制停滞的问题。 [#103406](https://github.com/ClickHouse/ClickHouse/pull/103406) ([Seva Potapov](https://github.com/seva-potapov)).
* 修复一个会导致 server 中止的 `LOGICAL_ERROR` “Cannot pop N rows from X” 问题 (出现在 debug / sanitizer 构建中) ：此前在读取格式错误的 BSON 文档时，如果其中某个值的 BSON 类型与 `Nullable(T)` 或 `Array(Nullable(T))` 列内的目标列类型不兼容，就会触发该错误。现在，这类格式错误的行会按预期产生明确的 `ILLEGAL_COLUMN` 异常。 [#103418](https://github.com/ClickHouse/ClickHouse/pull/103418) ([Groene AI](https://github.com/groeneai)).
* 修复 `arrayFill` 和 `arrayReverseFill` 应用于首行为空的 `Array(String)` 列且配合恒为 false 的 lambda 时导致的 server 中止问题。聚合 / 子数组循环中，`size_t` 索引发生 underflow 变为 `SIZE_MAX`，随后在 `ColumnString::doInsertManyFrom` 内部导致越界读取。属于与 [#12263](https://github.com/ClickHouse/ClickHouse/issues/12263) 相同的 bug 家族。 [#103424](https://github.com/ClickHouse/ClickHouse/pull/103424) ([Groene AI](https://github.com/groeneai)).
* 修复以下问题：当上游 REPLACE RMV 的 EXCHANGE 在解析过程中途切换目标存储 identity 时，下游带有 SQL SECURITY DEFINER 的 APPEND RMV 中会出现 ACCESS\_DENIED / UNKNOWN\_TABLE。 [#103427](https://github.com/ClickHouse/ClickHouse/pull/103427) ([Alexander Gololobov](https://github.com/davenger)).
* 从 `url` table function 填充 `_time` 列。 [#103437](https://github.com/ClickHouse/ClickHouse/pull/103437) ([Nikita Taranov](https://github.com/nickitat)).
* 修复在处理位宽无效的畸形输入时，`ALP` codec 解压路径中可能出现的越界读取。 [#103457](https://github.com/ClickHouse/ClickHouse/pull/103457) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了一个 bug：`SYSTEM SYNC FILESYSTEM CACHE '<name>' ON CLUSTER ...` 在格式化查询时可能丢失缓存名称，导致远程节点同步所有文件系统缓存，而不只是请求的那个缓存。 [#103469](https://github.com/ClickHouse/ClickHouse/pull/103469) ([Asish Kumar](https://github.com/officialasishkumar)).
* 修复 `deltaLakeAzure` 中对 URL 编码路径的处理。关闭 [#103509](https://github.com/ClickHouse/ClickHouse/issues/103509)。 [#103525](https://github.com/ClickHouse/ClickHouse/pull/103525) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复将 `AggregateFunction` 状态与整数相乘时的 heap-use-after-free 问题 (例如 `quantilesExactState(...) * N`) 。平方求幂循环会将该状态与自身合并，而当聚合函数的 `merge` 重新分配其内部存储时，这种行为是未定义的。关闭 STID 0988-40af。 [#103536](https://github.com/ClickHouse/ClickHouse/pull/103536) ([Groene AI](https://github.com/groeneai)).
* 修复了一个罕见问题：在 `ReplicatedMergeTree` 表启动期间，如果磁盘上两个空的异常 parts 的 block 范围发生重叠但互不包含，就会触发 `LOGICAL_ERROR` "Part X intersects previous part Y"。该异常会中止表 attach 线程，导致表无法启动。 [#103537](https://github.com/ClickHouse/ClickHouse/pull/103537) ([Groene AI](https://github.com/groeneai)).
* 修复 `Logical error: Incorrect mark rows for part ...` (仅在调试版本中触发的断言) 的问题。该问题由 `MergeTree` 表上的 mutations 触发：这些表使用非自适应索引粒度 (`index_granularity_bytes = 0`) ，且最后一个数据标记不完整 (最可靠的复现方式是先执行 `DETACH`/`ATTACH`，再执行 lightweight `DELETE`) 。 [#103538](https://github.com/ClickHouse/ClickHouse/pull/103538) ([Groene AI](https://github.com/groeneai)).
* 修复 `clickhouse-local` 通过 `file()` table function 读取 `/proc` 和 `/sys` 伪文件时静默返回 0 行的问题 (例如 `SELECT * FROM file('/proc/cpuinfo', 'RawBLOB')`) 。 [#103548](https://github.com/ClickHouse/ClickHouse/pull/103548) ([Ashrith Bandla](https://github.com/ashrithb)).
* 修复 `GenerateRandom` 表引擎中 `max_string_length` 参数的处理。 [#103550](https://github.com/ClickHouse/ClickHouse/pull/103550) ([Alex Kuleshov](https://github.com/0xAX)).
* 修复在日志中屏蔽嵌套 credentials 的问题。 [#103552](https://github.com/ClickHouse/ClickHouse/pull/103552) ([Vitaly Baranov](https://github.com/vitlibar)).
* 修复在 SVE 不可用时仍使用 SVE 指令进行检测的问题。 [#103568](https://github.com/ClickHouse/ClickHouse/pull/103568) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 `GenerateRandom` 存储参数的解析。 [#103574](https://github.com/ClickHouse/ClickHouse/pull/103574) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复 `WITH FILL` 在数据以 ±inf 开头时出现无限循环的问题。 [#103580](https://github.com/ClickHouse/ClickHouse/pull/103580) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了 `JSONExtract` 提取到 `Variant` 类型时静默截断 JSON 小数的问题。此前，`JSONExtract('{"x": 3.14}', 'x', 'Variant(Int64, Float64)')` 返回 `Int64=3`，而 `JSONExtract('{"x": 3.14}', 'x', 'Variant(String, Int64)')` 返回 `Int64=3`，导致小数部分丢失。现在小数值可无损保留：如果存在 `Float64`/`Decimal` 成员，则由其接收该值；否则由 `String` 成员保留原始 JSON。仅包含整数成员的 `Variant` 类型 (例如 `Variant(Int64, Int32)`) 以及直接提取整数 (`JSONExtract(json, 'Int64')`、`JSONExtractInt` 等) 的行为不变。[#103620](https://github.com/ClickHouse/ClickHouse/pull/103620) ([Groene AI](https://github.com/groeneai)).
* 修复了不带参数的 `SYSTEM INSTRUMENT REMOVE` 会产生 `std::bad_optional_access` (错误码 1001) 而不是 `SYNTAX_ERROR` (错误码 62) 的问题。[#103622](https://github.com/ClickHouse/ClickHouse/pull/103622) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了 `windowID` 和 `tumble` window view 在将时区字符串作为第 3 个参数调用时出现的 logical error / 未定义行为。[#103641](https://github.com/ClickHouse/ClickHouse/pull/103641) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* S3 client 日志现在会将带有非空 x-amz-bucket-region 请求头的 HTTP 400 响应 (SigV4 签名区域错误) 视为信息性的区域错误场景，并输出更清晰的日志，而不是走通用的错误处理路径。只有在配置了 web identity 时，才会将 STS web identity credentials provider 添加到 S3 credentials chain 中，从而减少未使用该功能的部署中出现的无关警告。关闭 [#99140](https://github.com/ClickHouse/ClickHouse/issues/99140)。[#103673](https://github.com/ClickHouse/ClickHouse/pull/103673) ([MeltonSmith](https://github.com/MeltonSmith)).
* 修复了 `SYSTEM SYNC REPLICA <db>.<tbl> IF EXISTS` 在数据库不存在时静默成功，使其与表不存在时的现有行为以及 `DROP TABLE IF EXISTS` 所确立的先例保持一致。此前，尽管指定了 `IF EXISTS`，查询仍会抛出 `UNKNOWN_DATABASE`。关闭 [#103629](https://github.com/ClickHouse/ClickHouse/issues/103629)。[#103689](https://github.com/ClickHouse/ClickHouse/pull/103689) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一个问题：当 `MergeTree` 表的排序键中包含 `Array(LowCardinality(...))`，且 `WHERE` 子句对该列与元素类型不同的 `Array` 常量使用 `plus` / `minus` 时，`FunctionBinaryArithmetic::executeImpl2` 会抛出 logical error `Arguments of 'plus' have incorrect data types`。`KeyCondition::getMonotonicityForRange` 现在会在调用内部数值分发前递归去除 `LowCardinality`。[#103701](https://github.com/ClickHouse/ClickHouse/pull/103701) ([Groene AI](https://github.com/groeneai)).
* 修复了 26.1+ 中动态 cache 调整大小时的竞态问题。[#103702](https://github.com/ClickHouse/ClickHouse/pull/103702) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了一个问题：对于表达式中包含捕获常量的 lambda 的 `ALIAS` 列 (例如 `arrayMap((k, v) -> concat(k, '=', v), mapKeys(m), mapValues(m)))`) ，其上的 text 和 bloom\_filter 跳过索引会被静默忽略。[#103708](https://github.com/ClickHouse/ClickHouse/pull/103708) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了 `position` 和 `positionCaseInsensitive` 在 `start_pos` 接近 `UINT64_MAX` 时，因指针运算溢出而卡住或导致段错误的问题。[#103766](https://github.com/ClickHouse/ClickHouse/pull/103766) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了解析带有双重小数部分的 dateTime 时的未定义行为。[#103773](https://github.com/ClickHouse/ClickHouse/pull/103773) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了 26.x 中一个数据正确性回归问题：当 JIT 编译的 `if` 和 `multiIf` 的结果类型为 `Decimal`，且某个分支中包含非 `Decimal` (整数或浮点) 字面量时，会在无报错的情况下返回一个比正确值小 `10^scale` 倍的结果。慢速 (非 JIT) 路径不受影响。受影响版本的临时规避方法：`SET compile_expressions = 0`。[#103809](https://github.com/ClickHouse/ClickHouse/pull/103809) ([Groene AI](https://github.com/groeneai)).
* 修复了将分词器从文本索引传递给受支持函数的问题。[#103826](https://github.com/ClickHouse/ClickHouse/pull/103826) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 修复了 `numbers`、`generate_series` 以及类似遵循范围约束的源在 `WHERE` 子句中对某个元组使用 `IN` 或 `NOT IN`，且其元素去重后归并为单个键列时返回错误结果的问题 (例如，`WHERE tuple(number, number) NOT IN (tuple(1, 2))`) 。关闭 [#103660](https://github.com/ClickHouse/ClickHouse/issues/103660)。[#103835](https://github.com/ClickHouse/ClickHouse/pull/103835) ([Groene AI](https://github.com/groeneai)).
* 让自动 spilling 的 hash join 实际内存峰值保持在 `max_bytes_before_external_join` 之下。此前，由统计信息驱动的预分配、原地哈希表翻倍扩容，以及无界的 `GraceHashJoin` 内存桶都可能分别导致查询超出配置上限并触发 `MEMORY_LIMIT_EXCEEDED`。[#103838](https://github.com/ClickHouse/ClickHouse/pull/103838) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在配置系统日志 (如 `text_log` 或 `filesystem_cache_log`) 时，`clickhouse-local` 在关闭过程中卡住的问题。`SystemLogs::flushImpl` 会调用 `BaseDaemon::instance().flushTextLogs()`，而该调用在 `clickhouse-server` 之外会抛出 `std::bad_cast`，导致保存线程持续运行，直到 `pthread_cond_destroy` 阻塞了系统日志队列的销毁。[#103874](https://github.com/ClickHouse/ClickHouse/pull/103874) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，对于其 body 在不同引用中推断出不同列类型的 `MATERIALIZED` CTE 查询，会明确报出 `TYPE_MISMATCH` 错误并拒绝执行，而不再因 `Bad cast` `LOGICAL_ERROR` 导致 server 崩溃。此前，这种情况会在 CTE body 引用了外层作用域中的标识符 (例如调用方子查询投影中的别名) ，且这些标识符在每次引用时被内联为不同常量时发生。[#103879](https://github.com/ClickHouse/ClickHouse/pull/103879) ([Groene AI](https://github.com/groeneai)).
* 修复了 JOIN 转换查询计划优化器 (`tryConvertAnyOuterJoinToInnerJoin`、`tryConvertAnyJoinToSemiOrAntiJoin`) 中的未初始化值使用问题；当 `ANY` `OUTER` `JOIN` 上层的过滤器包含 `rand`、`now` 或 `rowNumberInAllBlocks` 等非确定性函数时会触发该问题。优化器现在不再尝试对此类过滤器进行常量折叠，并保持 JOIN 不变，这也避免了错误地将其转换为 `INNER`/`SEMI`/`ANTI JOIN` 而在无提示的情况下丢弃行。[#103880](https://github.com/ClickHouse/ClickHouse/pull/103880) ([Groene AI](https://github.com/groeneai)).
* 修复了 `StorageKafka2` 中的一个释放后使用问题：当 Keeper session 被替换，而消费者持有临时 topic-partition 锁时，可能导致 server 崩溃。[#103890](https://github.com/ClickHouse/ClickHouse/pull/103890) ([Groene AI](https://github.com/groeneai)).
* 修复了一个会抛出 `LOGICAL_ERROR`“Primary key type mismatch”的问题：当通过 `JOIN ... USING (key)` 将 `EmbeddedRocksDB` 表与一个 key 列类型 (例如 `Nullable(UInt64)`、`Int64`、`Decimal`) 不同于存储主键类型的子查询进行连接时，就会出现该错误。现在，planner 在类型不匹配时会拒绝 `DirectKeyValueJoin`，并回退到可处理类型转换的 `HashJoin`。[#103928](https://github.com/ClickHouse/ClickHouse/pull/103928) ([Groene AI](https://github.com/groeneai)).
* `SET max_threads = DEFAULT` (`max_final_threads` 和 `max_parsing_threads` 同样如此) 不再丢失自动状态。此前，重置这些设置之一后，`system.settings` 会显示解析后的 CPU 核心数 (例如 `32`) ，而不是 `'auto(32)'`，并且 server 会表现得像该值已被显式固定一样。[#103991](https://github.com/ClickHouse/ClickHouse/pull/103991) ([Groene AI](https://github.com/groeneai)) 。
* 修复了读取 `AggregateFunction(topK(N), String)` 列时出现 `SIZES_OF_ARRAYS_DONT_MATCH` 的问题；当其持久化的 `alpha_size` 因一次 25.12 之前的 deserialize+serialize 循环而增大时，就会触发该问题。[#104002](https://github.com/ClickHouse/ClickHouse/pull/104002) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 PostgreSQL、Cassandra 和 XDBC 字典源中的 SQL 注入漏洞：此前，包含单引号的字符串键会被转义为 `\'` (反斜杠) ，而这些 backend 会将其视为字面反斜杠，而不是转义序列，从而允许将任意 SQL 注入到字典 lookup 查询中。现在，`ExternalQueryBuilder` 会为这些 backend 生成符合 SQL 标准的 `''` 转义；ClickHouse 和 MySQL 字典源则继续使用反斜杠转义。[#104009](https://github.com/ClickHouse/ClickHouse/pull/104009) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复了聚合中的潜在类型不匹配问题；当列类型在 LowCardinality 与非 LowCardinality 之间变更，且 min-max projection 未重建时，就可能出现该问题。[#104013](https://github.com/ClickHouse/ClickHouse/pull/104013) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了因合并 expression 时未传递“防止移除未使用列”的标记而导致的查询优化无限循环问题。[#104083](https://github.com/ClickHouse/ClickHouse/pull/104083) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了批量重命名流式表 (S3Queue、Kafka、RabbitMQ) 时，`StreamingStorageRegistry::renameTable` 中出现的 `LOGICAL_ERROR`：改为使用基于 UUID 的 identity 跟踪，而不是基于名称的跟踪。[#104101](https://github.com/ClickHouse/ClickHouse/pull/104101) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了以下场景下的错误结果：由 `UNION ALL` 构造的 CTE 包含一个 `SELECT DISTINCT` 分支，而外层查询只投影该 CTE 的部分列。新的 analyzer 中的 `RemoveUnusedProjectionColumnsPass` 错误地从内部 `DISTINCT` projection 中移除了未被引用的列，导致原本应保持 distinct 的行 (投影列值相同，但被删除列值不同) 被合并成一行。[#104114](https://github.com/ClickHouse/ClickHouse/pull/104114) ([Groene AI](https://github.com/groeneai)) 。
* 修复了设置 `optimize_inverse_dictionary_lookup` 中多个边界场景下的正确性问题；在这些情况下，该优化可能会悄然丢弃行或抑制异常。关闭 [#103270](https://github.com/ClickHouse/ClickHouse/issues/103270)。关闭 [#103085](https://github.com/ClickHouse/ClickHouse/issues/103085)。[#104133](https://github.com/ClickHouse/ClickHouse/pull/104133) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了反序列化 `quantileTiming` 状态时发生的越界写入问题。[#104141](https://github.com/ClickHouse/ClickHouse/pull/104141) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了将越界的 `Float64` 值转换为宽整数类型 (`UInt64`、`Int64`、`Int128`、`UInt128`、`Int256`、`UInt256`) 时的未定义行为。此前，等于 `Float64(numeric_limits<T>::max())` 的值 (会向上舍入到一个超过实际最大值的值) 会绕过边界检查，并在后续类型转换中产生 UB。这会影响聚合函数参数解析 (`topK`、`histogram`、`uniqUpTo`、`groupArrayInsertAt` 等) 以及通过 `SET <setting> = <Float64>` 设置的整数类型配置项。关闭 [#103817](https://github.com/ClickHouse/ClickHouse/issues/103817)。[#104154](https://github.com/ClickHouse/ClickHouse/pull/104154) ([Groene AI](https://github.com/groeneai)) 。
* 修复了将嵌套的 `Tuple(Tuple(Nullable(...)))` (或更深层嵌套) 与 `String` 字面量比较时出现的 `LOGICAL_ERROR` 异常："Unexpected return type from comparison. Expected `UInt8`. Got `Const(Nullable(UInt8))`"。现在，比较结果的返回类型会被正确推断为 `Nullable(UInt8)`，与运行时行为一致。[#104171](https://github.com/ClickHouse/ClickHouse/pull/104171) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `query_plan_optimize_lazy_final = 1` 时，执行 `SELECT ... FROM <ReplacingMergeTree(version, is_deleted)> FINAL PREWHERE is_deleted = <expr> AND <other column expr>` 会导致 server 中止的问题 (`UndefinedBehaviorSanitizer: reference binding to null pointer`，并在 release 构建中发生 segfault) 。lazy-FINAL 的非相交读取步骤丢失了输出头信息中的 `is_deleted` 列，因为 prewhere 将其作为输入消耗后，没有重新将其作为输出暴露出来。随后，下游的 `addIsDeletedFilter` 步骤解引用了一个空的 `ActionsDAG::Node` 指针。[#104177](https://github.com/ClickHouse/ClickHouse/pull/104177) ([Groene AI](https://github.com/groeneai)).
* 修复了调用 system.failpoints 表时会使用一个 failpoint，从而可能将其禁用的问题。[#104237](https://github.com/ClickHouse/ClickHouse/pull/104237) ([Pedro Ferreira](https://github.com/PedroTadim)).
* 修复了当输入包含一个恰好在缓冲区边界结束的 UTF-8 字符时，`detectLanguage*` 函数中的 `MemorySanitizer: use-of-uninitialized-value` 问题。[#104257](https://github.com/ClickHouse/ClickHouse/pull/104257) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了一个逻辑错误 (`Bad cast from type DB::CachedObjectStorage to DB::S3ObjectStorage`) ：当对底层对象存储被文件系统缓存等装饰器包装的 disk 使用 `SETTINGS disk = '...'` 调用数据湖表函数和引擎 (`icebergS3`、`deltaLakeS3` 等) 时，该错误会中止参数解析。关闭 [#89300](https://github.com/ClickHouse/ClickHouse/issues/89300)。[#104258](https://github.com/ClickHouse/ClickHouse/pull/104258) ([Groene AI](https://github.com/groeneai)).
* 修复了对名为 `values` 的列使用带括号的下标表达式时的解析问题，例如 `(values['a'])`，使其不再被解释为 SQL 标准的 `VALUES` 表表达式。[#104312](https://github.com/ClickHouse/ClickHouse/pull/104312) ([Desel72](https://github.com/Desel72)).
* 修复了文件系统缓存后台逐出线程 (`SLRUFileCachePriority::collectEvictionInfo`) 中的 server 中止/`LOGICAL_ERROR`：当 `keep_free_space_size_ratio` 或 `keep_free_space_elements_ratio` 足够高，以至于在所有缓存条目都已提升到 SLRU protected queue (probationary 为空) 时触发逐出，就可能出现该问题。[#104313](https://github.com/ClickHouse/ClickHouse/pull/104313) ([Groene AI](https://github.com/groeneai)).
* 修复了将 projections 与 UNION ALL 视图、窗口函数或别名列名冲突一起使用时出现的异常 (`NOT_FOUND_COLUMN_IN_BLOCK`、`LOGICAL_ERROR`、`AMBIGUOUS_COLUMN_NAME`) 。这是由 [#88798](https://github.com/ClickHouse/ClickHouse/issues/88798) 引入的回归问题。[#104317](https://github.com/ClickHouse/ClickHouse/pull/104317) ([Amos Bird](https://github.com/amosbird)).
* 修复了解析 Postgres 数组时可能出现的 underflow 问题。[#104322](https://github.com/ClickHouse/ClickHouse/pull/104322) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* 返回非 `Nullable` 类型 (如 `Array`、`Tuple` 或 `Map`) 的函数现在也支持 `Nullable` 参数。受影响的函数包括 `extractAll`、`extractAllGroups`、`extractAllGroupsHorizontal`、`extractAllGroupsVertical`、`extractGroups`、`splitByChar`、`splitByString`、`splitByRegexp`、`splitByWhitespace`、`splitByNonAlpha` 和 `alphaTokens`。对于 `NULL` 输入行，现在会返回结果类型的默认值 (例如空数组) ，而不是抛出 "Nested type is not allowed inside Nullable type"。[#104326](https://github.com/ClickHouse/ClickHouse/pull/104326) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了带分区的 Iceberg 表的统计信息问题。此更改关闭了 [#104321](https://github.com/ClickHouse/ClickHouse/issues/104321)。[#104329](https://github.com/ClickHouse/ClickHouse/pull/104329) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了 macOS (以及类似的 jemalloc 构建) 上 server 启动时的一个致命 logical error：由于可选的 `background_thread` / `max_background_threads` mallctl 不存在，`Jemalloc::verifySetup` 会错误报告 `jemalloc_enable_background_threads` 不匹配；现在，如果这些 mallctl 不可用，则会跳过校验，且 `getValue` 在失败时也不再让输出保持未初始化状态。关闭了 [#102183](https://github.com/ClickHouse/ClickHouse/issues/102183)。[#104330](https://github.com/ClickHouse/ClickHouse/pull/104330) ([SAYON DEEP](https://github.com/sayondeep)).
* 修复了一个正确性回归问题：带有 `max_rows_to_read_leaf` 和 `read_overflow_mode_leaf = 'throw'` 的 `SELECT` 查询，即使跳过索引本可将读取量降到叶子节点上限以下，也可能错误抛出 `TOO_MANY_ROWS`。对应的非叶子节点设置 (`max_rows_to_read` / `read_overflow_mode`) 此前已正确处理。[#104331](https://github.com/ClickHouse/ClickHouse/pull/104331) ([Groene AI](https://github.com/groeneai)).
* `toUUID`、`toUUIDOrNull`、`toUUIDOrZero`、`toUUIDOrDefault`、到 `UUID` 和 `Nullable(UUID)` 的 `CAST`、到 `UUID` 的 `accurateCastOrNull`，以及从文本解析 UUID 的输入格式 (`Avro`、`MsgPack`、`JSONExtract` 等) 现在会拒绝长度正确但包含非十六进制字符的字符串。此前，这类输入会因为越过十六进制数字查找表末尾而被静默转换为伪造的 UUID；现在 `toUUID` 会抛出 `CANNOT_PARSE_UUID`，而 `Or*` 变体会返回 `NULL` / 零 UUID / 提供的默认值。[#104370](https://github.com/ClickHouse/ClickHouse/pull/104370) ([Groene AI](https://github.com/groeneai)).
* 修复了 `caseWithExpression` (以及 SQL `CASE expr WHEN ... THEN ... ELSE ...`) 中的 `Bad cast` `LOGICAL_ERROR`：当仅 THEN 分支的 supertype 与 (THEN + ELSE) 的 supertype 落在不同的 `ColumnDecimal` 存储中时，会触发该问题——例如 THEN 值为 `(UInt16, Int8)`，而 ELSE 为 `Decimal(9, 2)`。关闭了 [#104335](https://github.com/ClickHouse/ClickHouse/issues/104335)。[#104378](https://github.com/ClickHouse/ClickHouse/pull/104378) ([Groene AI](https://github.com/groeneai)).
* 通过 `logExceptionBeforeStart` 报告的内部故障 (asynchronous insert 刷写、materialized-view 刷新、内部查询期间抛出的解析错误) 现在会正确增加 `FailedInternalQuery`、`FailedInternalSelectQuery` 和 `FailedInternalInsertQuery` 这几个 ProfileEvents，同时也会增加用户可见的 `FailedQuery`、`FailedSelectQuery` 和 `FailedInsertQuery` 计数器。此前，这些内部计数器对于在查询执行开始前发生的故障始终保持为零，导致一大类内部故障被少计。[#104399](https://github.com/ClickHouse/ClickHouse/pull/104399) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `BACKUP` 或 `RESTORE` 语句的 `base_backup` setting 中使用查询参数时抛出的 `Code: 36. BAD_ARGUMENTS Expected literal, got {name:Type}` 错误 (例如 `BACKUP ... SETTINGS base_backup = S3({backup_name:String}, ...)`) 。该回归问题由 PR [#99205](https://github.com/ClickHouse/ClickHouse/issues/99205) 在 `26.1.5` 中引入。关闭 [#103324](https://github.com/ClickHouse/ClickHouse/issues/103324)。[#104413](https://github.com/ClickHouse/ClickHouse/pull/104413) ([Groene AI](https://github.com/groeneai)).
* 修复了 `IcebergLocal`/`IcebergS3` 写入时的 server 中止问题：当执行 `ALTER TABLE ... DROP COLUMN` 后，再执行一个 `iceberg_metadata_staleness_ms` 大于 0 的 `INSERT` 时会触发该问题。现在 `ALTER` 会使本地 Iceberg 元数据文件缓存失效，因此后续读写都能看到新的 schema。[#104419](https://github.com/ClickHouse/ClickHouse/pull/104419) ([Groene AI](https://github.com/groeneai)).
* 修复了 `DROP ROLE`、`DROP USER`、`DROP SETTINGS PROFILE`、`DROP ROW POLICY`、`DROP QUOTA` 和 `DROP MASKING POLICY`，使其在删除某个 entity 时，也会从所有引用该 entity 的其他 access entity 中移除相关引用 (例如用户的 `DEFAULT ROLE` 列表、settings profile 的 `TO` 列表、row policy 的 grantees) ，并将清理结果持久化到 disk。此前 `SHOW CREATE` 会过滤未知 UUID，因此内存状态看起来是正确的；但磁盘上的 `.sql` 文件仍保留了悬空的 `ID('<dropped-uuid>')` 条目，这些引用会在下次 server 重启时重新出现，并在 distributed query execution 期间表现为 `ACCESS_ENTITY_NOT_FOUND` 错误。[#104427](https://github.com/ClickHouse/ClickHouse/pull/104427) ([Groene AI](https://github.com/groeneai)).
* 修复了 `azureBlobStorage`、`AzureBlobStorage`-engine 以及 Azure 上的 DeltaLake 在使用 connection string 时可能触发的 server 中止问题：当其中 `BlobEndpoint` URL 的端口为空、非数字或超出范围时 (例如 `BlobEndpoint=http://host:abc/`) ，就会出现该问题。现在 server 会返回明确的 `BAD_ARGUMENTS` 错误，而不再在 debug/sanitizer 构建中中止。[#104460](https://github.com/ClickHouse/ClickHouse/pull/104460) ([Groene AI](https://github.com/groeneai)).
* 允许在 `remote` 和 `remoteSecure` table functions 中使用未加引号的标识符作为用户名，这与 database 和 table arguments 接受未加引号标识符的方式一致。此前，这类查询会因一条误导性的身份验证错误而失败，并错误地指向 `default` 用户。[#104465](https://github.com/ClickHouse/ClickHouse/pull/104465) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当 SQL 用户自定义函数的函数体中包含带括号的内部 `UNION ALL` 时触发的 `Logical error: Incorrect ASTSelectWithUnionQuery (modes: M, selects: N)` (例如 `CREATE FUNCTION f AS x -> (SELECT 1 UNION ALL (SELECT 1 UNION ALL SELECT 1))`) 。[#104477](https://github.com/ClickHouse/ClickHouse/pull/104477) ([Groene AI](https://github.com/groeneai)).
* 修复了 `uniqThetaIntersect` 的问题：当第二个 argument 为空 `uniqTheta` 状态时，它会返回第一个 argument 的 cardinality，而不是 `0`——例如 `uniqThetaMergeStateIf(s, predicate)` 的结果，其中 predicate 会排除所有行。[#104529](https://github.com/ClickHouse/ClickHouse/pull/104529) ([Groene AI](https://github.com/groeneai)).
* 修复了 `SHOW TABLES` 和 `system.tables` 在列出由 Iceberg REST 目录 (`iceberg-rest`、`onelake`、`biglake`) 支持的 `DataLakeCatalog` 数据库时静默截断列表的问题。当目录 server 对 list-tables 或 list-namespaces 响应进行分页时 (例如 Microsoft Fabric / OneLake 中每个命名空间超过约 50 张表时) ，后续页面中的表在 `SHOW TABLES` 和 `system.tables` 中会静默消失，尽管仍可通过直接 `SELECT` 查询。`RestCatalog` 现在会遵循 Iceberg REST OpenAPI 规范中定义的 `next-page-token` 延续标记，与 `PaimonRestCatalog` 和 `UnityCatalog` 的现有行为保持一致。[#104531](https://github.com/ClickHouse/ClickHouse/pull/104531) ([Groene AI](https://github.com/groeneai)).
* `input` table function 现在会在外围 `INSERT` 查询的 `FORMAT` clause 使用固定 schema 的 format (如 `LineAsString`、`RawBLOB`、`JSONAsString` 等) 时，从该子句推断其结构，因此用户不再需要为这些 format 重复写出 `input('line String')` 这样的结构定义。[#104532](https://github.com/ClickHouse/ClickHouse/issues/104532). [#104533](https://github.com/ClickHouse/ClickHouse/pull/104533) ([Groene AI](https://github.com/groeneai)).
* 将 Iceberg history 中字段的数据类型从 `Int32` 更新为 `Int64`。关闭 [#94176](https://github.com/ClickHouse/ClickHouse/issues/94176)。[#104579](https://github.com/ClickHouse/ClickHouse/pull/104579) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复了解析函数调用时 (当逗号后跟着 lambda 时) 出现的 `Inconsistent AST formatting` `LOGICAL_ERROR`，例如 ``SELECT substring(x, `x` -> `x`)``。parser 过去会静默地把前面的 arguments 合并到 lambda 的左侧，生成单参数调用，导致无法重新解析回相同的 AST。现在会保留函数原始的参数个数。[#104626](https://github.com/ClickHouse/ClickHouse/pull/104626) ([Groene AI](https://github.com/groeneai)).
* 当未给出 database 限定符时，`CHECK TABLE t` 现在会优先选择同名的 `TEMPORARY` 表，而不是永久表，这与 `SHOW CREATE TABLE`、`DESCRIBE TABLE`、`OPTIMIZE TABLE` 和 `ALTER TABLE` 已采用的优先级规则一致。此前 `CHECK TABLE t` 会完全跳过 temporary tables，因此即使这些引擎支持 `CHECK`，对 temporary `日志` 或 `File 表引擎` 表执行时仍会因 `UNKNOWN_TABLE` 而失败。这是对 [#100966](https://github.com/ClickHouse/ClickHouse/pull/100966) 的后续修复。[#104637](https://github.com/ClickHouse/ClickHouse/pull/104637) ([Groene AI](https://github.com/groeneai)).
* 修复了当向未配置 `<placement>` 的 Keeper 发送带有 `quorum_reads=true` 的 `get /keeper/availability_zone` 时，Keeper 终止并进入重启循环的问题。[#104663](https://github.com/ClickHouse/ClickHouse/pull/104663) ([myeongjun](https://github.com/myeongjjun)).
* 修复了 `FutureSetFromTuple::buildOrderedSetInplace` 中会导致 logical error 的 TOCTOU data race。[#104673](https://github.com/ClickHouse/ClickHouse/pull/104673) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了若干函数对相同输入会因 arguments 以列或常量形式传入而返回不同结果的问题：`bitRotateLeft` / `bitRotateRight` (边界移位计数) 、`length(FixedString)` / `concatWithSeparator` 配合 `LowCardinality(Nullable)` 输入、作用于 NaN 的 `roundDown`，以及作用于无效 UTF-8 的 `rightUTF8`。[#104710](https://github.com/ClickHouse/ClickHouse/pull/104710) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了当最频繁的值是列默认值且数据分布在多个 `MergeTree` parts 中时，`anyHeavy` 会返回非 heavy 值的问题 (稀疏列读取路径) 。[#104712](https://github.com/ClickHouse/ClickHouse/pull/104712) ([Raúl Marín](https://github.com/Algunenano)).
* 修复设置约束处理中的多个缺陷：声明在设置规范名称上的 `MergeTreeSettings` 约束，可通过写入该设置的别名来绕过；此外，`disallowed_values` 约束检查在 clamp 路径 (次级查询、`ON CLUSTER` 工作线程、`SQL SECURITY DEFINER` 视图) 上会抛出异常，而不是静默丢弃该更改。[#104737](https://github.com/ClickHouse/ClickHouse/pull/104737) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了惰性附加的 `Iceberg` / `IcebergLocal` / `DeltaLake` / `Hudi` 表在执行 `OPTIMIZE TABLE`、`ALTER TABLE ... DELETE`、`ALTER TABLE ... ADD COLUMN` 及其他 ALTER 变体时触发的 `LOGICAL_ERROR` 异常 (`Metadata is not initialized`) ：当时 metadata 尚未加载 (常见于 server 重启后，或之前 metadata 写入失败并在磁盘上留下损坏的 metadata 文件之后) 。现在，如果 metadata 成功加载，操作会正常继续；如果加载失败，则会将底层加载失败作为常规的用户可见异常抛出，而不再在 debug / sanitizer 构建中导致 server 中止。[#104738](https://github.com/ClickHouse/ClickHouse/pull/104738) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `AvroConfluentRowInputFormat` 中 use-after-free 缺陷导致的 segfault。[#104751](https://github.com/ClickHouse/ClickHouse/pull/104751) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* `numericIndexedVectorPointwiseMultiply`、`numericIndexedVectorPointwiseDivide`、`numericIndexedVectorPointwiseEqual` 和 `numericIndexedVectorPointwiseNotEqual` 的标量变体现在会在传入大于 `Int64::max` 的 `UInt64` 标量时抛出 `INCORRECT_DATA`。[#104784](https://github.com/ClickHouse/ClickHouse/pull/104784) ([FriendLey](https://github.com/FriendLey)) 。
* 修复一个问题：应用 `compatibility` 设置后，如果通过别名手动覆盖某个设置 (例如使用 `SET enable_analyzer = 1` 而不是 `SET allow_experimental_analyzer = 1`) ，则后续再修改 `compatibility` 设置时，可能会把该覆盖还原掉。[#104829](https://github.com/ClickHouse/ClickHouse/pull/104829) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复在 [https://github.com/ClickHouse/ClickHouse/commit/0e8ad4355c9d](https://github.com/ClickHouse/ClickHouse/commit/0e8ad4355c9d) 之后 AWS 日志记录器被禁用的问题。[#104837](https://github.com/ClickHouse/ClickHouse/pull/104837) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复另外三个函数的问题：同样的输入，结果会因 argument 是以列还是常量形式传入而不同：默认值为常量 `Date`/`Date32`/`Enum`/`FixedString` 的 `transform` (以及经由它调用的 `caseWithExpression`) 、`String` 与常量 `FixedString` 之间的比较运算符，以及条件为常量时带有 `FixedString` 分支的 `if`/`ifNull`/`nullIf`。[#104858](https://github.com/ClickHouse/ClickHouse/pull/104858) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 `MergeTree` 表在执行分区裁剪时出现的 `Bad cast from type DB::ColumnConst to DB::ColumnNullable` server 中止问题；当分区表达式中包含会折叠为单个常量值的函数事件链时，就会触发该问题 (例如 `floor(NULL, toRelativeYearNum(...))`) 。[#104861](https://github.com/ClickHouse/ClickHouse/pull/104861) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `ContextData` 复制构造函数中的一个 `ThreadSanitizer` data race：复制 `table_function_results` 时未获取 `table_function_results_mutex`，因此并发的 `Context::executeTableFunction` 写入可能会与复制构造函数中未同步的读取发生竞争。[#104879](https://github.com/ClickHouse/ClickHouse/pull/104879) ([Groene AI](https://github.com/groeneai)) 。
* 修复对具有动态结构的类型进行数据分区片段一致性检查的问题，并可检测损坏的 columns\_substreams.txt。这是对 [https://github.com/ClickHouse/ClickHouse/pull/103858](https://github.com/ClickHouse/ClickHouse/pull/103858) 的重新提交，包含额外更改。[#104888](https://github.com/ClickHouse/ClickHouse/pull/104888) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 DatabaseCatalog 中 `DROP` 与 `UNDROP` 之间的竞态问题。[#104915](https://github.com/ClickHouse/ClickHouse/pull/104915) ([Azat Khuzhin](https://github.com/azat)).
* 修复了文件系统缓存动态调整大小时对部分已下载分段的处理问题，包括在驱逐失败后恢复相关统计计数。[#104921](https://github.com/ClickHouse/ClickHouse/pull/104921) ([Antonio Andelic](https://github.com/antonio2368)).
* 现在，对 temporary table 执行 `DETACH TABLE` (不带 `TEMPORARY` 关键字) 时，会正确抛出 `SYNTAX_ERROR`，与 `DETACH TEMPORARY TABLE` 的行为一致。此前，它会静默设置内部 `is_detached` 标志并直接返回，不报错。要删除 temporary table，请使用 `DROP TEMPORARY TABLE` 或 `DROP TABLE` (后者会通过 `Context::ResolveExternal` 解析该 temporary table) 。关闭 [#103475](https://github.com/ClickHouse/ClickHouse/issues/103475)。[#104943](https://github.com/ClickHouse/ClickHouse/pull/104943) ([Groene AI](https://github.com/groeneai)).
* 使 `filesystem` table function 在加载文件内容时遵守 `max_memory_usage` / `max_server_memory_usage` 限制。此前，读取大型内容或进行大量并行内容读取时，可能会在未抛出 `MEMORY_LIMIT_EXCEEDED` 的情况下突破限制，最终被 OOM 杀死。[#104956](https://github.com/ClickHouse/ClickHouse/pull/104956) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了按 `uuid` 过滤 `system.detached_tables` 时抛出的 `LOGICAL_ERROR` (例如 `SELECT count() FROM system.detached_tables WHERE uuid = '...'`) 。现在，该查询会返回预期结果，而不是导致 server 中止。[#104979](https://github.com/ClickHouse/ClickHouse/pull/104979) ([Groene AI](https://github.com/groeneai)).
* 对嵌套结构仅包含空 `Tuple()` 叶子的 tuple 调用 `flattenTuple` 时，不再抛出 `LOGICAL_ERROR` (例如 `Tuple(c0 Array(Tuple()))` 或 `Tuple(c0 Tuple())`) 。现在，这类输入会产生面向用户的 `ILLEGAL_TYPE_OF_ARGUMENT` 异常，明确说明展平结果将是一个空 tuple。[#104989](https://github.com/ClickHouse/ClickHouse/pull/104989) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用 `GROUP BY` 查询 `loop(remote(...))` (或任何包装了可延迟 aggregation 的存储的 `loop()`) 时，会导致 server 中止以及静默返回错误结果的问题。外层 planner 之前会根据内层存储报告的 processing stage 添加 `MergingAggregatedStep`，但 `LoopSource` 总是以 `QueryProcessingStage::Complete` 物化其内部 select，并输出普通列 chunks，因此在 `enable_parallel_replicas = 1` 时，`MergingAggregatedTransform` 会触发 `LOGICAL_ERROR` (`Chunk info was not set for chunk in MergingAggregatedTransform`) ；在其他情况下，则会静默丢弃外层 aggregation。[#105001](https://github.com/ClickHouse/ClickHouse/pull/105001) ([Groene AI](https://github.com/groeneai)).
* `clickhouse-benchmark --reconnect` (裸用、不带值) 在 25.4 中因某项变更而被意外破坏：该变更将 `--reconnect` 改成了整数选项，必须提供值。现在，裸用形式已再次可用，并且等价于 `--reconnect=1` (每个查询都重新连接) 。[#105006](https://github.com/ClickHouse/ClickHouse/pull/105006) ([Groene AI](https://github.com/groeneai)).
* 修复了列名以不完整 UTF-8 序列结尾时导致 JSON 输出格式错误的问题。[#105012](https://github.com/ClickHouse/ClickHouse/pull/105012) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了对 materialized view 的 source table 执行 `EXCHANGE TABLES` 或 `CREATE OR REPLACE TABLE` 后出现的静默数据丢失问题。现在，`MV` 的 source-view dependency edge 会保留在原始名称上，因此仍会在 inserts 时触发。该回归由 [#98779](https://github.com/ClickHouse/ClickHouse/issues/98779) 引入；现已恢复到回归前的行为。[#105029](https://github.com/ClickHouse/ClickHouse/pull/105029) ([Sema Checherinda](https://github.com/CheSema)).
* 修复在 JIT 编译将 `Float` 转换为 `UInt128` 的表达式时出现的 `CANNOT_COMPILE_CODE Could not find symbol __fixunsdfti` 问题，例如 `toUInt128(<Float64 expression>)`。原因是 JIT 符号解析器中缺少用于无符号 128 位浮点转整数的 compiler-rt builtin 符号。关闭 [#105031](https://github.com/ClickHouse/ClickHouse/issues/105031)。[#105048](https://github.com/ClickHouse/ClickHouse/pull/105048) ([Raúl Marín](https://github.com/Algunenano))。
* 修复在设置 `send_logs_level` 时，`clickhouse-local` 不输出失败查询日志消息的问题。[#105067](https://github.com/ClickHouse/ClickHouse/pull/105067) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 修复同一 parameterized view 在同一个查询中以不同 argument values 被多次引用时结果不正确的问题。此前，analyzer 会将这些调用折叠成一个，静默丢弃除第一个过滤器外的所有过滤器。[#105170](https://github.com/ClickHouse/ClickHouse/pull/105170) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 修复 `play.html` web UI 中，`TOTALS` 行在结果表底部被渲染两次的问题。[#103803](https://github.com/ClickHouse/ClickHouse/pull/103803) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 在向量搜索期间拒绝非有限向量 (`NaN`、`±Inf`)  (无论是待搜索向量还是参考向量) ；此前它们会导致 `usearch` 中出现未定义行为。[#104079](https://github.com/ClickHouse/ClickHouse/pull/104079) ([Groene AI](https://github.com/groeneai))。
* PromQL：修复空向量上的 aggregation 运算符问题。[#104425](https://github.com/ClickHouse/ClickHouse/pull/104425) ([Vitaly Baranov](https://github.com/vitlibar))。
* PromQL：修复 Prometheus 查询 API 中的错误处理问题。[#104741](https://github.com/ClickHouse/ClickHouse/pull/104741) ([Vitaly Baranov](https://github.com/vitlibar))。
* 修复 `MergeTreeTransaction::afterCommit` 中的一个竞态问题：如果在将提交 `CSN` 写入 ZooKeeper 后、事务完成前 connection 丢失，`COMMIT` 响应可能会在新的 `creation_csn` / `removal_csn` 出现在 `system.parts` 中之前先到达 client。[#104708](https://github.com/ClickHouse/ClickHouse/pull/104708) ([Tuan Pham Anh](https://github.com/tuanpach))。
* 修复 KQL parser 在转换嵌套数组索引 (`arr[arr[arr[...]]]`) 时内存呈指数级增长的问题。[#105142](https://github.com/ClickHouse/ClickHouse/pull/105142) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 修复 `RIGHT ANY JOIN` 在右表每个键对应多行，且输出块因大小限制被拆分时结果不正确的问题。关闭 [#99431](https://github.com/ClickHouse/ClickHouse/issues/99431)。[#102064](https://github.com/ClickHouse/ClickHouse/pull/102064) ([Vladimir Cherkasov](https://github.com/vdimir))。
* 在嵌套类型反序列化期间，为 `Avro` 读取器增加栈溢出检查。[#102417](https://github.com/ClickHouse/ClickHouse/pull/102417) ([Pavel Kruglov](https://github.com/Avogar))。
* 修复 `MergeTree` settings 的 `system.completions` 中出现重复行的问题——每个 setting 名称都会出现两次，因为虽然两者的设置名称相同，`getMergeTreeSettings` 和 `getReplicatedMergeTreeSettings` 的结果仍都被转储了。关闭 [#102013](https://github.com/ClickHouse/ClickHouse/issues/102013)。[#102015](https://github.com/ClickHouse/ClickHouse/pull/102015) ([Groene AI](https://github.com/groeneai))。
* 修复 `StorageObjectStorageQueue` (`S3Queue`、`AzureQueue`) 在关闭时被阻塞的问题：此前必须等对象存储中部分已处理文件被完整读取后才能关闭。现在源会在关闭时立即中止读取；借助去重机制，关闭前已流式写入目标表的行，在下次启动重试该文件时不会重复。[#103126](https://github.com/ClickHouse/ClickHouse/pull/103126) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复对 `Alias` 表引擎使用 `insert_deduplication_token` 进行多块插入时只保留部分块的问题，现在会保留所有块。[#103246](https://github.com/ClickHouse/ClickHouse/pull/103246) ([Enric Calabuig](https://github.com/eclbg)) 。
* 修复原生 `JSON` 列上的 `JSONHas` 和 `JSONExtractBool` 返回提取出的值 (转换为 `UInt8`) 而不是 `0`/`1` 的问题。[#103313](https://github.com/ClickHouse/ClickHouse/pull/103313) ([zxuhan7](https://github.com/zxuhan)) 。
* 修复 `CustomSeparated` 输入格式在面对省略 `format_custom_row_after_delimiter` 的畸形或恶意数据时防护不足的问题。此前，标头检测、schema 推断以及可变列数的行会无限制累积字段，并可能在失败前分配数 GB 内存。现在，只要单行包含超过 1,000,000 个字段，读取就会以 `INCORRECT_DATA` 失败。[#103404](https://github.com/ClickHouse/ClickHouse/pull/103404) ([Groene AI](https://github.com/groeneai)) 。
* 修复复制 `MergeTree` 表执行 `RESTORE` 时的问题：恢复后的数据分片附加操作现在使用 `backup_restore_keeper_max_retries`，而不是常规插入的 Keeper 重试次数预算。[#104610](https://github.com/ClickHouse/ClickHouse/pull/104610) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复 `MergeTree` 表上 `WHERE p AND <LowCardinality(Nullable(int)) constant>` 返回错误结果的问题。此前，这类查询会返回零行，因为分片裁剪会从 `LowCardinality(Nullable(...))` 类型推导出默认 `NULL`，并构造出 `notEquals(x, NULL)` 保护条件，从而裁掉所有分片。[#104767](https://github.com/ClickHouse/ClickHouse/pull/104767) ([Groene AI](https://github.com/groeneai)) 。
* 修复按某列的非单射函数分组且该列同时又是分区键时，聚合结果错误的问题 (例如 `PARTITION BY a` 且 `GROUP BY intDiv(a, 2)` 或 `a % 2`) 。此前，来自不同分区但映射到同一分组的值不会被合并，导致在 `allow_aggregate_partitions_independently = 1` 下出现重复的分组行。[#104869](https://github.com/ClickHouse/ClickHouse/pull/104869) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复 `Keeper` 快照传输中的竞态问题：在向正在恢复的 follower 发送快照时，快照可能被删除或移动。[#104941](https://github.com/ClickHouse/ClickHouse/pull/104941) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复 `hilbertEncode` 和 `mortonEncode` 中一个静默产生错误结果的问题：当第一个参数 (范围掩码) 是非常量 `Tuple` 时，每一行的位移计算都会错误地使用第 0 行的值。现在，这些函数会按行计算掩码值，因此结果不再依赖输入是否为常量，也不再依赖块大小。[#104992](https://github.com/ClickHouse/ClickHouse/pull/104992) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `clickhouse-local` 在从 `./clickhouse-local.xml`、`~/.clickhouse-local/config.xml` 或 `/etc/clickhouse-local/config.xml` 自动发现配置文件时，会静默忽略用户级配置 (`profiles`、`users`、`quotas`、访问控制设置) 的问题。此前，只有传入 `--config-file` 或当前目录存在 `./config.xml` 时，这些设置才会生效；现在所有发现路径的行为都已保持一致。[#105008](https://github.com/ClickHouse/ClickHouse/pull/105008) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `BFloat16` 列与字符串字面量比较时静默返回零匹配的问题 (例如 `WHERE bf16_col = '49.9'`) 。[#105042](https://github.com/ClickHouse/ClickHouse/pull/105042) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `SummingMergeTree`、`AggregatingMergeTree` 和 `CoalescingMergeTree` 在合并过程中处理 `CLEAR COLUMN` 和 TTL 时的问题：当合并所需的列缺失或已过期时会出错。已关闭 [#101953](https://github.com/ClickHouse/ClickHouse/issues/101953)。[#105203](https://github.com/ClickHouse/ClickHouse/pull/105203) ([Antonio Andelic](https://github.com/antonio2368)).
* 通过在解引用 `shared->clusters_config` 前添加显式空值检查，修复了 `DNSCacheUpdater::run` 与 `Context::reloadClusterConfig` 之间的竞态问题。[#105220](https://github.com/ClickHouse/ClickHouse/pull/105220) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 修复了 `toDateTime64` 在 `ms` 和 `ns` 精度下的 `best_effort` 日期时间解析问题。[#105233](https://github.com/ClickHouse/ClickHouse/pull/105233) ([Kaviraj Kanagaraj](https://github.com/kavirajk)).
* 修复了 `OSIOWaitMicroseconds` 错误地上报线程生命周期的 I/O 等待时间，而不是每次查询的 I/O 等待时间的问题。[#105246](https://github.com/ClickHouse/ClickHouse/pull/105246) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* `Hudi` 表引擎现在在表目录中的 Parquet 文件不符合 Hudi `[FileId]_[FileWriteToken]_[Timestamp].[extension]` 命名约定时，会抛出 `INCORRECT_DATA` (普通的查询级异常) ，而不是 `LOGICAL_ERROR`。此前，这类文件名会在调试构建中触发异常。[#105266](https://github.com/ClickHouse/ClickHouse/pull/105266) ([Groene AI](https://github.com/groeneai)).
* 修复了 `ParallelFormattingOutputFormat` 在调度失败时的死锁问题：当 `scheduleFormatterThreadForUnitWithNumber` 抛出异常时 (例如 `CANNOT_SCHEDULE_TASK`) ，该单元会停留在 `READY_TO_FORMAT` 状态，且没有格式化线程继续处理，最终导致挂起。现在，调度调用已包装在 `try`/`catch` 中，任何失败都会通过 `onBackgroundException` 处理，从而让收集器正常退出。[#105275](https://github.com/ClickHouse/ClickHouse/pull/105275) ([Azat Khuzhin](https://github.com/azat)).
* 修复了 `Distributed` 异步插入在异常关闭后恢复时发生的静默数据丢失问题：如果保存的批次中最后一个 `.bin` 文件完好，但中间某个文件已损坏，`DistributedAsyncInsertBatch::recoverBatch` 过去只会校验最后一个文件的文件头，随后 `sendBatch` 会将整个批次——包括完好的文件——都标记为损坏，导致其中的行丢失。现在会逐个校验每个文件的文件头，因此只有实际损坏的文件会被移到 `broken/`，其余未损坏的行会发送到远程分片。[#105281](https://github.com/ClickHouse/ClickHouse/pull/105281) ([Groene AI](https://github.com/groeneai)).
* 修复了 `clickhouse extract-from-config --try` 中的一个回归问题：当配置使用 `from_env` 属性且没有 `include_from` 元素 (或该元素指向不存在的文件) 时，所有 `from_env` 替换都会被静默丢弃并返回空字符串。这破坏了 26.2.5 中 Docker 入口点的端口发现。已关闭 [#101704](https://github.com/ClickHouse/ClickHouse/issues/101704)。[#105283](https://github.com/ClickHouse/ClickHouse/pull/105283) ([Groene AI](https://github.com/groeneai)).
* 修复了向 `SQLite` 表执行 `INSERT INTO` 时因 SQLite 语法错误而失败的问题：当插入值为 `Enum`、`JSON` 或 `AggregateFunction`，且其文本表示中包含单引号时，就会触发该问题。现在，相应的序列化也会遵循 `output_format_values_escape_quote_with_quote` 设置 (此前只有 `String` 和 `FixedString` 支持该设置) 。[#105285](https://github.com/ClickHouse/ClickHouse/pull/105285) ([Groene AI](https://github.com/groeneai)).
* 修复了这样一个问题：在 `allow_push_predicate_ast_for_distributed_subqueries = 1` (默认值) 时，如果 `GLOBAL IN` 元组与一个投影中包含重复列名的子查询匹配，例如 `(x, y) GLOBAL IN (SELECT number, number FROM numbers(5))`，分布式查询会抛出 `Code: 44. ILLEGAL_COLUMN: Cannot add column ...: column with this name already exists`。[#105290](https://github.com/ClickHouse/ClickHouse/pull/105290) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `reinterpret` 应用于 `Array(LowCardinality(...))` 时在运行时返回令人困惑的 `NOT_IMPLEMENTED` 错误的问题；现在会在类型检查阶段返回 `ILLEGAL_TYPE_OF_ARGUMENT`。[#105301](https://github.com/ClickHouse/ClickHouse/pull/105301) ([Raúl Marín](https://github.com/Algunenano)) 。
* `minMap`/`maxMap` (数组形式) 和 `minMappedArrays`/`maxMappedArrays` 现在对 `NaN` 的处理与 `ORDER BY` 一致：`NaN` 被视为排在最后 (仅当所有值都是 `NaN` 时才会返回) 。此前，由于 IEEE 754 的无序比较语义，结果会受 `NaN` 在数据中位置的影响，并且与已在 [#100448](https://github.com/ClickHouse/ClickHouse/pull/100448) 中修复的 `minMap`/`maxMap` 的 `Map` 参数形式不一致。[#105331](https://github.com/ClickHouse/ClickHouse/pull/105331) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了带有 `Nested` 列的 `MergeTree` 家族表中按表划分的 `ColumnsDescription` 缓存内存泄漏问题。在 `share_nested_offsets = 1` (默认值) 时，条目在经历 `ALTER ADD COLUMN`/`DROP COLUMN` 循环后也从未被淘汰。[#105376](https://github.com/ClickHouse/ClickHouse/pull/105376) ([Groene AI](https://github.com/groeneai)) 。
* 修复了这样一个问题：当带有 `TYPE set(N)` 跳过索引的 `SELECT` 包含一个结果类型为 `Float`、`BFloat16` 或其他任意非整数类型的 `WHERE` 原子表达式时 (例如 `WHERE c0 + 0.1` 或 `WHERE log(c0)`) ，会抛出 `BAD_ARGUMENTS` 异常 "It's a bug! Only integer types are supported by `__bitWrapperFunc`"。现在在这种情况下，跳过索引会回退到常规过滤路径。[#105384](https://github.com/ClickHouse/ClickHouse/pull/105384) ([Groene AI](https://github.com/groeneai)) 。

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* 停止使用系统 `compiler-rt` 库和头文件。关闭 [#91475](https://github.com/ClickHouse/ClickHouse/issues/91475)。[#102857](https://github.com/ClickHouse/ClickHouse/pull/102857) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 更新 distroless Docker 基础镜像，以修复 `libssl3t64` 中的 OpenSSL CVE。[#103583](https://github.com/ClickHouse/ClickHouse/pull/103583) ([Rahul Nair](https://github.com/motsc)).
* 在发布过程中，通过串联多个 Ubuntu 密钥服务器来可靠获取 GPG 密钥，避免在 `keyserver.ubuntu.com` 上超时。[#103834](https://github.com/ClickHouse/ClickHouse/pull/103834) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* 移除并禁止构建时的 `CMake` 检查 (`check_*`、`try_compile`、`try_run`) 。由于编译器和工具链是固定的，因此没有必要在配置阶段进行功能检测；现在项目范围内已全面禁止此类做法，任何与特定版本相关的行为都必须显式以 `CMAKE_CXX_COMPILER_VERSION` 为条件控制。[#103980](https://github.com/ClickHouse/ClickHouse/pull/103980) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 `libarchive` 从 3.8.6 升级到 3.8.7。[#104047](https://github.com/ClickHouse/ClickHouse/pull/104047) ([Robert Schulze](https://github.com/rschu1ze)).
* 将 `mongo-c-driver` 更新到 2.3.0。[#104300](https://github.com/ClickHouse/ClickHouse/pull/104300) ([Raúl Marín](https://github.com/Algunenano)).
* 为 22.x 更新 LLVM 依赖项。[#104381](https://github.com/ClickHouse/ClickHouse/pull/104381) ([Joshua Carp](https://github.com/jmcarp)).
* 通过使用可移植的 POSIX `posix_openpt` / `grantpt` / `unlockpt`，并移除仅限 Linux 的 `#if` 保护，使 embedded-client 和 PTY 描述符类能够在 macOS 和 FreeBSD 上构建。[#104436](https://github.com/ClickHouse/ClickHouse/pull/104436) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 `librdkafka` 升级到 2.14.1 版本。[#105222](https://github.com/ClickHouse/ClickHouse/pull/105222) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).

<div id="264">
  ### ClickHouse 26.4 版本发布，2026-04-30。 [演示文稿](https://presentations.clickhouse.com/2026-release-26.4/), [视频](https://www.youtube.com/watch?v=9lSVy7k2EoI)
</div>

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

* `IN` 运算符现在对 `Bool` 类型采用精确值语义：集合中只有 `0` 和 `1` 才会与 `Bool` 值匹配。此前，与 `Bool` 比较时，`IN` 集合中大于 `255` 的数值会被错误地钳制为 true，因此 `SELECT CAST(1, 'Bool') IN (256)` 会返回 1。现在它会正确返回 `0`。关闭了 [#92980](https://github.com/ClickHouse/ClickHouse/issues/92980)。[#93115](https://github.com/ClickHouse/ClickHouse/pull/93115) ([Ashrith Bandla](https://github.com/ashrithb)) 。
* H3 库已更新到 v4，这提高了长度、面积等度量计算的精度。此更改不向后兼容，因为新结果与之前不同。[#100348](https://github.com/ClickHouse/ClickHouse/pull/100348) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 不再允许在 `WITH` 表达式列表元素中将 `SELECT` 用作裸标识符。[#101059](https://github.com/ClickHouse/ClickHouse/pull/101059) ([Aruj Bansal](https://github.com/arujbansal)) 。
* 此补丁更改了 Merge 表处理虚拟列的方式。如果底层表包含 `_table` 或 `_database`，则会从存储中读取这些列；否则，这些列会在读取步骤之后通过表达式步骤填充。[#101742](https://github.com/ClickHouse/ClickHouse/pull/101742) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* `IN` 运算符现在也会拒绝复合类型 (`Tuple`、`Array`、`Map`) 内部发生的有损 `Decimal` 转换，使其行为与顶层标量比较保持一致。此前，精度检查仅对顶层标量值生效：例如，`CAST('33.3', 'Decimal64(1)') IN (33.33)` 会正确返回 `0`，但 `CAST(['33.3'], 'Array(Decimal64(1))') IN ([33.33])` 会错误地返回 `1`，因为有损转换发生在 `Array` 内部。现在这两种情况都会正确返回 `0`。[#101812](https://github.com/ClickHouse/ClickHouse/pull/101812) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 将默认 `http_max_fields` 从 1,000,000 下调到 1,000，并将 `http_max_field_name_size` 从 128 KB 下调到 4 KB，以限制 HTTP 连接在身份验证前的内存占用。新增了 `http_max_request_header_size` 和 `http_headers_read_timeout` 设置。依赖此前较高限制的用户可通过设置将其恢复。[#103285](https://github.com/ClickHouse/ClickHouse/pull/103285) ([Sema Checherinda](https://github.com/CheSema)) 。

<div id="267-new-feature">
  #### 新特性
</div>

* 新增自动落盘机制：达到内存限制时，哈希 join 和并行哈希 join 会自动转换为 grace hash join。此行为由 `max_bytes_before_external_join` 控制。[#97813](https://github.com/ClickHouse/ClickHouse/pull/97813) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 新增对 Arrow Flight SQL 的支持。[#91170](https://github.com/ClickHouse/ClickHouse/pull/91170) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 为 `Paimon` 表引擎新增增量读取支持，使用 Keeper 支持的快照进度跟踪机制，包括通过 `paimon_target_snapshot_id` 定向读取快照增量，并扩展类型映射、分区裁剪和增量读取场景的测试覆盖范围。[#93655](https://github.com/ClickHouse/ClickHouse/pull/93655) ([XiaoBinMu](https://github.com/Binnn-MX)).
* `stem` 函数现已不再处于 Experimental 状态 (此前必须启用 `allow_experimental_nlp_functions` 设置) 。[#102399](https://github.com/ClickHouse/ClickHouse/pull/102399) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。现在，您可以使用 `stem` 函数，轻松对 `String`、`FixedString`、`Array([Fixed]String)`、`Nullable`、`LowCardinality` 和 `Const` 列中的所有单词/标记进行词干提取。[#99137](https://github.com/ClickHouse/ClickHouse/pull/99137) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 在兼容性设置 `use_strict_insert_block_limits` 下，为 `max_insert_block_size_rows`、`max_insert_block_size_bytes`、`min_insert_block_size_rows`、`min_insert_block_size_bytes` 引入了 squashing 过程中的新行为。[#94207](https://github.com/ClickHouse/ClickHouse/pull/94207) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* 新增函数 `arrayAutocorrelation(arr [, max_lag])`，用于计算数值数组在各个滞后值下的归一化自相关。支持整数、Float 和 Decimal 数组类型。[#94776](https://github.com/ClickHouse/ClickHouse/pull/94776) ([Wenyu Chen](https://github.com/wenyuchen96)) 。
* 新增 SQL 函数 `obfuscateQuery`。关闭 [#98010](https://github.com/ClickHouse/ClickHouse/issues/98010)。[#98305](https://github.com/ClickHouse/ClickHouse/pull/98305) ([Xuewei Wang](https://github.com/Sallery-X)) 。
* 新增支持将 Map 和 JSON/Object 类型用作字典属性。现在，字典可在 FLAT 和 HASHED 布局中存储和读取复杂类型，包括 Map(String, String)、Map(String, Array(String))、JSON 和 Nullable(JSON)。[#98627](https://github.com/ClickHouse/ClickHouse/pull/98627) ([yanglongwei](https://github.com/ylw510)).
* 新增了两个新的 MergeTree 设置——`replicated_fetches_min_part_level` 和 `replicated_fetches_min_part_level_timeout_seconds`——允许副本跳过从其他副本拉取新近插入的 (未合并的) parts，从而在高负载摄取期间降低复制开销。[#98625](https://github.com/ClickHouse/ClickHouse/pull/98625) ([tanner-bruce](https://github.com/tanner-bruce)).
* 为使用 JSONAllPaths 且采用 bloom\_filter、tokenbf\_v1、ngrambf\_v1 和 text (倒排) 索引类型的 JSON 列新增 MergeTree 跳过索引支持，从而能够根据每个粒度中存在的 JSON 路径集合跳过相应粒度。[#98886](https://github.com/ClickHouse/ClickHouse/pull/98886) ([Pavel Kruglov](https://github.com/Avogar)).
* `printf` 函数现已支持非常量格式字符串，因此可根据列值为每一行使用不同的格式模板。[#98991](https://github.com/ClickHouse/ClickHouse/pull/98991) ([Yash ](https://github.com/Onyx2406)).
* 新增一个名为 `commit_order` 的投影索引，用于按插入顺序重组数据。[#99004](https://github.com/ClickHouse/ClickHouse/pull/99004) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 新增 `highlight` 函数，可将文本字符串中出现的搜索词用 HTML 标签包裹起来 (默认为 `<em>`/`</em>`) 。支持 ASCII 不区分大小写匹配、自动合并重叠的匹配项，以及自定义开始/结束标签。[#99131](https://github.com/ClickHouse/ClickHouse/pull/99131) ([Peng](https://github.com/fastio)).
* 通过按归一化查询哈希实施配额，保护公网 ClickHouse 服务免遭滥用。1. 支持将 `NORMALIZED_QUERY_HASH` 用作配额键类型——为每个唯一的归一化查询单独划分配额桶，因此 `CREATE QUOTA q KEYED BY normalized_query_hash` 会分别跟踪每条不同的查询。2. 支持将 `QUERIES_PER_NORMALIZED_HASH` 用作配额资源类型——限制在一个时间间隔内任意单条归一化查询的最大执行次数，因此 `MAX queries_per_normalized_hash = 100` 可防止任何单一查询模式的运行次数超过 100 次。[#99586](https://github.com/ClickHouse/ClickHouse/pull/99586) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，用户可以使用 `NATURAL JOIN` 语法编写 join 查询，该语法会自动基于所有同名列进行匹配，并在结果中对这些列去重。[#99840](https://github.com/ClickHouse/ClickHouse/pull/99840) ([Peter Nguyen](https://github.com/petern48)).
* 支持将 `SET TIME ZONE 'tz'` 用作 `SET session_timezone` 的别名。[#99883](https://github.com/ClickHouse/ClickHouse/pull/99883) ([phulv94](https://github.com/phulv94)).
* 在 Web UI (`play.html`) 中新增了对参数化查询的支持：系统会检测诸如 `{name:Type}` 这样的查询参数，并显示可用于填写其值的输入字段。[#100041](https://github.com/ClickHouse/ClickHouse/pull/100041) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 支持在 `FROM` 中将 SQL 标准 `VALUES` 子句作为表表达式使用，例如 `SELECT * FROM (VALUES (1, 'a'), (2, 'b')) AS t(id, val)`。[#100143](https://github.com/ClickHouse/ClickHouse/pull/100143) ([Desel72](https://github.com/Desel72)).
* 为 `EXTRACT` operator 新增与 PostgreSQL 兼容的单位：`EPOCH`、`DOW`、`DOY`、`ISODOW`、`ISOYEAR`、`WEEK`、`CENTURY`、`DECADE`、`MILLENNIUM`。同时修复了此前会报错的 `EXTRACT(WEEK FROM date)`。[#100274](https://github.com/ClickHouse/ClickHouse/pull/100274) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了对带有 `TO` 范围限定符的 SQL 标准复合时间间隔字面量的支持，例如 `INTERVAL '1:30' HOUR TO MINUTE`。在内部，它会被分解为多个时间间隔之和。[#100453](https://github.com/ClickHouse/ClickHouse/pull/100453) ([Desel72](https://github.com/Desel72)).
* 为 HTTP 连接池套接字的内核 TCP 接收和发送缓冲区内存 (`sk_rmem_alloc`, `sk_wmem_alloc`) 新增异步指标，并按每个连接组以 p50/p75/p90/p95 分位数和总量形式上报。[#100575](https://github.com/ClickHouse/ClickHouse/pull/100575) ([Sema Checherinda](https://github.com/CheSema)).
* 为 ClickHouse Keeper 新增了 jemalloc profiling web UI，可通过 HTTP 控制端口上的 `/jemalloc` 访问。 [#100606](https://github.com/ClickHouse/ClickHouse/pull/100606) ([murphy-4o](https://github.com/murphy-4o)).
* 新增命令 `SYSTEM FLUSH OBJECT STORAGE QUEUE db.table PATH 'x'`，适用于 ordered 模式和 unordered 模式。[#100709](https://github.com/ClickHouse/ClickHouse/pull/100709) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 新增函数 `JSONAllValues`，可将 `JSON` 列中的所有值以 `Array(String)` 形式返回；这些值会按路径名称排序，并以文本形式序列化。新增对 `JSON` 列上 `JSONAllValues` 表达式的文本索引支持。当在 `JSONAllValues(json_column)` 上创建文本索引时，该索引会自动用于过滤针对 `JSON` 子列的查询 (例如 `json_column.key1 = 'value'`) 。[#100730](https://github.com/ClickHouse/ClickHouse/pull/100730) ([Anton Popov](https://github.com/CurtizJ)).
* 新增设置 `input_format_column_name_matching_mode`，允许为输入格式采用不同的大小写匹配方式。[#99346](https://github.com/ClickHouse/ClickHouse/pull/99346) ([manerone](https://github.com/Manerone)) 。
* 为 `clickhouse-keeper-client` 新增 `watch` 命令，并为 `get`、`exists` 和 `ls` 命令添加 watch 支持。 [#100834](https://github.com/ClickHouse/ClickHouse/pull/100834) ([Den Kalantaevskii](https://github.com/Diskein)).
* 为 ClickHouse Keeper 新增了 `getChildrenRecursive` (ListRecursive) 请求，并为 `clickhouse-keeper-client` 新增了 `lsr` 命令。此更改关闭了 [#99916](https://github.com/ClickHouse/ClickHouse/issues/99916)。[#100998](https://github.com/ClickHouse/ClickHouse/pull/100998) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 新增函数 `arrayTranspose`，可接受二维数组 (矩阵) 并对其进行转置：`SELECT arrayTranspose([[1, 2, 3], [4, 5, 6]])`。[#101214](https://github.com/ClickHouse/ClickHouse/pull/101214) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* `auto_statistics_types mergetree` 设置的默认值为 `'minmax, uniq'` —— 系统会为新表中所有合适的列自动创建 minmax 和 uniq 统计信息 - `materialize_statistics_on_insert` 的默认值为 false —— 现在统计信息会在合并期间构建，而不是在写入时构建，从而降低写入开销。使用 `SET materialize_statistics_on_insert = 1` 可恢复旧行为。[#101275](https://github.com/ClickHouse/ClickHouse/pull/101275) ([Han Fei](https://github.com/hanfei1991)).
* 为 materialized view 依赖链新增 `prefer_dependency_replica` 刷新设置，以减少跨副本复制延迟导致的数据缺失。[#101591](https://github.com/ClickHouse/ClickHouse/pull/101591) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 新增 `hasPhrase` (别名 `matchPhrase`) 函数，用于短语搜索 (连续的标记序列) 。搜索采用穷举方式，也就是说，文本索引暂未支持该功能。[#101997](https://github.com/ClickHouse/ClickHouse/pull/101997) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 新增 `s3_read_request_duration_microseconds` 和 `s3_read_request_bytes` 直方图指标，用于观测 S3 GET 请求连接的存续时间以及消耗的字节数，可在 `system.histogram_metrics` 和 Prometheus 端点中查看。 [#102058](https://github.com/ClickHouse/ClickHouse/pull/102058) ([Sema Checherinda](https://github.com/CheSema)).
* 现在可以使用 `+` 运算符将 `Date` 和 `Date32` 值与 `Time` 和 `Time64` 值相加，得到 `DateTime` 或 `DateTime64` 结果。例如，`SELECT toDate('2024-01-15') + toTime('14:30:25')` 会返回 `2024-01-15 14:30:25`。结果会按照会话时区计算，超出范围的结果则根据 `date_time_overflow_behavior` 设置处理。关闭 [#95914](https://github.com/ClickHouse/ClickHouse/issues/95914)。[#102421](https://github.com/ClickHouse/ClickHouse/pull/102421) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 文本索引现已正式可用，并且无论 `compatibility` 设置如何都会保持启用状态，从而避免在备份恢复期间或以兼容模式运行时被意外禁用。[#101518](https://github.com/ClickHouse/ClickHouse/pull/101518) ([Nikita Fomichev](https://github.com/fm4v)) 。

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

* 为 Iceberg 表新增 `ALTER TABLE ... EXECUTE remove_orphan_files`，用于识别并从对象存储中删除未被引用的文件。[#99127](https://github.com/ClickHouse/ClickHouse/pull/99127) ([murphy-4o](https://github.com/murphy-4o)).
* 新增 `query_plan_optimize_join_order_randomize` 设置，用于将 join 重排序所依据的统计信息随机化，便于测试。[#100643](https://github.com/ClickHouse/ClickHouse/pull/100643) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 为 ClickHouse 新增 AI 函数支持，允许用户通过 SQL 调用 OpenAI 和 Anthropic 端点。`aiGenerate` 是首个此类函数。[#100831](https://github.com/ClickHouse/ClickHouse/pull/100831) ([George Larionov](https://github.com/george-larionov)).
* 新增 AI 函数：`aiClassify`、`aiExtract` 和 `aiTranslate`，用于在 ClickHouse 中调用 LLM API。[#100832](https://github.com/ClickHouse/ClickHouse/pull/100832) ([George Larionov](https://github.com/george-larionov)).
* 新增 `system.histogram_metric_log`，这是一个新的系统表，会定期对所有直方图指标创建快照 (例如 S3/Azure 延迟、Keeper 请求处理各阶段的耗时) 。此外，`system.histogram_metrics` 的 `value` 列改为 `Float64`，因为这样更灵活，也更兼容 Prometheus 数据模型。[#103046](https://github.com/ClickHouse/ClickHouse/pull/103046) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)). 该表结构很可能会在未来的发行版中发生变化。

<div id="267-performance-improvement">
  #### 性能提升
</div>

* ClickHouse 现已能够在 `SELECT` 查询中基于最小/最大统计信息剪枝整个数据分区片段。[#94140](https://github.com/ClickHouse/ClickHouse/pull/94140) ([zoomxi](https://github.com/zoomxi)).
* 减少已完成变更的 ReplicatedMergeTree 表在执行只读操作时的锁竞争。[#95771](https://github.com/ClickHouse/ClickHouse/pull/95771) ([Eduard Karacharov](https://github.com/korowa)).
* 读取投影时遵循 `optimize_read_in_order`。修复 [#89453](https://github.com/ClickHouse/ClickHouse/issues/89453)。[#95885](https://github.com/ClickHouse/ClickHouse/pull/95885) ([Andrey Zvonov](https://github.com/zvonand)) 。
* 对 Hash Join 和 Concurrent Hash Join 进行了一些小优化。[#96663](https://github.com/ClickHouse/ClickHouse/pull/96663) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 通过在输入数据几乎全为唯一值时禁用 `LowCardinality` 列优化，优化 `DISTINCT` 转换。[#97113](https://github.com/ClickHouse/ClickHouse/pull/97113) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 来自 [#97723](https://github.com/ClickHouse/ClickHouse/issues/97723) 的 `LIKE` 查询性能优化：现在这类查询可以使用文本索引。[#98149](https://github.com/ClickHouse/ClickHouse/pull/98149) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 向量化数学函数 (`exp`、`log`、`sigmoid`、`tanh`) 现已在 AArch64 (使用 NEON/SVE) 以及 FreeBSD/Darwin 上获得加速；此前这些平台使用的是较慢的标量回退实现。 [#98230](https://github.com/ClickHouse/ClickHouse/pull/98230) ([Raúl Marín](https://github.com/Algunenano)).
* 对于按 `MergeTree` 主键列进行过滤、且使用字面字符串正则表达式交替分支 (例如 `^(abc-1|abc-2)`) 的查询，如今只要这些备选分支具有共同前缀，就可以利用主键裁剪。[#98988](https://github.com/ClickHouse/ClickHouse/pull/98988) ([Yash ](https://github.com/Onyx2406)).
* 将 `ORDER BY ... LIMIT` 的 top-k 动态过滤扩展为支持 `Nullable`、`String` 和 `COLLATE` 类型。[#99033](https://github.com/ClickHouse/ClickHouse/pull/99033) ([murphy-4o](https://github.com/murphy-4o)) 。
* 对键值范围较小的 `Int32` 和 `Int64` 键，使用直接索引哈希表来加速哈希连接。 [#99275](https://github.com/ClickHouse/ClickHouse/pull/99275) ([Hechem Selmi](https://github.com/m-selmi)).
* 使用单个字典的 `LowCardinality` 列在非连续查询场景下速度更快。[#99285](https://github.com/ClickHouse/ClickHouse/pull/99285) ([Ivan Babrou](https://github.com/bobrik)).
* 通过对内部循环去虚拟化，加快 `Float64` 列上 `var*Stable` 和 `stddev*Stable` 函数的执行速度。注意：这会启用编译器优化 (FMA/寄存器) ，从而在 ULP 级别改变浮点结果。[#99460](https://github.com/ClickHouse/ClickHouse/pull/99460) ([Riyane El Qoqui](https://github.com/riyaneel)) 。
* 对 32/64 字节的输入使用优化后的 Firedancer base58 编码 (对 `base58Encode` 自动启用) 。如果解码结果为 32/64 字节，则可使用优化后的 base58 解码 (需显式指定，如 `base58Decode('...', 32)` 或类似形式) 。[#99461](https://github.com/ClickHouse/ClickHouse/pull/99461) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 启用基于链接器节的优化 (`-ffunction-sections`、`-fdata-sections`、`--icf=all`) ，以减小可执行文件体积并提高指令缓存利用率。[#99474](https://github.com/ClickHouse/ClickHouse/pull/99474) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在多核机器上，带聚合的短查询出现负向扩缩容的问题。当查询读取的标记较少时，管道在聚合后将不再扩展到 `max_threads`，从而避免了大部分流几乎为空所带来的额外开销。[#99493](https://github.com/ClickHouse/ClickHouse/pull/99493) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过正确选择读取任务大小，利用并行副本提升查询性能。[#99801](https://github.com/ClickHouse/ClickHouse/pull/99801) ([Nikita Taranov](https://github.com/nickitat)).
* 允许在通过用户态页缓存读取远程文件时执行预取。[#99919](https://github.com/ClickHouse/ClickHouse/pull/99919) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在枚举子列时，避免了对 String `.size` 子列的不必要计算。[#99941](https://github.com/ClickHouse/ClickHouse/pull/99941) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在酒店网络环境下使用拥有大量副本的集群时，减少 clickhouse-client 进度条的抖动。[#100145](https://github.com/ClickHouse/ClickHouse/pull/100145) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当启用页缓存时，在 `clickhouse-local` 中启动 `MemoryWorker`，以便真正使用用户态页缓存。[#100306](https://github.com/ClickHouse/ClickHouse/pull/100306) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `LIMIT` 子句下推至 `UNION ALL` 中，以优化查询。[#100364](https://github.com/ClickHouse/ClickHouse/pull/100364) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 `ORDER BY` 中 `String` 和 `FixedString` 列的比较新增 JIT 编译支持，使以字符串为主的排序键在合并阶段的排序性能提升了 6–17%。与 @lgbo-ustc 共同完成。[#100577](https://github.com/ClickHouse/ClickHouse/pull/100577) ([Raúl Marín](https://github.com/Algunenano)).
* 当启用 `read_in_order_use_virtual_row` 并配合新的 `read_in_order_use_virtual_row_per_block` 设置时，现在每次从 `MergeTree` 读取完一个块后都会输出虚拟行边界信息，使 `merge` 能够在流处理中途重新调整 source 的优先级，适用于其数据被 `WHERE`/`PREWHERE`/`JOIN` 完全过滤掉的 parts。关闭 [#99945](https://github.com/ClickHouse/ClickHouse/issues/99945)。[#100603](https://github.com/ClickHouse/ClickHouse/pull/100603) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 通过以兼容 dragonbox 的舍入方式扩展 `itoa` 的快速路径，加快了大整数值的 Float 到 String 转换。[#100649](https://github.com/ClickHouse/ClickHouse/pull/100649) ([Raúl Marín](https://github.com/Algunenano)).
* 将 `dragonbox` 替换为 `zmij`，使 Float 到 String 的转换速度提高 1.5 倍至 3 倍。[#100650](https://github.com/ClickHouse/ClickHouse/pull/100650) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过以 Barrett reduction 替代软件除法并展开转换循环，加快了 `Int128`/`UInt128` 到字符串的转换。[#100671](https://github.com/ClickHouse/ClickHouse/pull/100671) ([Raúl Marín](https://github.com/Algunenano)) 。
* 避免在 `uniqExact` 并行合并时生成冗余线程。[#100686](https://github.com/ClickHouse/ClickHouse/pull/100686) ([Jiebin Sun](https://github.com/jiebinn)) 。
* 为 `uniqExact` 增加批次并行合并支持。[#100687](https://github.com/ClickHouse/ClickHouse/pull/100687) ([Jiebin Sun](https://github.com/jiebinn)) 。
* 对于通过并行副本执行、且底层为 `MergeTree` 表的简单视图查询，并行化效果更佳。[#100815](https://github.com/ClickHouse/ClickHouse/pull/100815) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 实现了在 `parallel_replicas_allow_view_over_mergetree=1` 时对简单视图启用并行副本的支持 (包括基于 `MergeTree` 表、符合条件的 `UNION ALL` 视图) 。这样可以并行化视图的外层查询，而不是内层查询，从而提升跨节点的查询并行度。[#100958](https://github.com/ClickHouse/ClickHouse/pull/100958) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 当查询计划中存在带有 `IN` 的过滤器时，优化 `full_sorting_merge` 按主键顺序读取的性能。 [#101261](https://github.com/ClickHouse/ClickHouse/pull/101261) ([Nikita Taranov](https://github.com/nickitat)).
* 通过缓存采样设置而非遍历整个 memory tracker 层级结构，优化内存分配/释放。[#101267](https://github.com/ClickHouse/ClickHouse/pull/101267) ([Azat Khuzhin](https://github.com/azat)).
* 修复在 `deduplicate_insert = 'enable'` (自 26.2 起默认为启用) 时显著的 INSERT 性能下降问题：将数据哈希计算从 squashing 阶段推迟到 sink，并通过 `updateHashWithValueRange` 按批次对列进行哈希计算，使 22 列、500 万行数据的开销从约 2.5 秒降至约 0.5 秒。[#101494](https://github.com/ClickHouse/ClickHouse/pull/101494) ([Sema Checherinda](https://github.com/CheSema)) 。
* 通过使用 `try_lock` 避免为无竞争获取计时，并移除持有时间测量，降低锁分析的额外开销。[#101502](https://github.com/ClickHouse/ClickHouse/pull/101502) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 将 `arrayDotProduct` 中手写的 AVX-512 内建函数替换为与平台无关、可自动向量化的循环，并新增对 AVX2 和 ARM NEON 的支持。[#101571](https://github.com/ClickHouse/ClickHouse/pull/101571) ([Peng](https://github.com/fastio)).
* 当值以转义字符串形式传入时 (例如 `'{\'key\':1}'`) ，优化 `INSERT VALUES` 中 `Map`、`Array` 和 `Tuple` 列的性能，避免不必要地回退到 SQL 表达式解析器。[#102119](https://github.com/ClickHouse/ClickHouse/pull/102119) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 修复了 `RabbitMQ` 表引擎 CPU 占用过高的问题。[#102711](https://github.com/ClickHouse/ClickHouse/pull/102711) ([Jaap Elst](https://github.com/jaapieaapie1)) 。
* JOIN 顺序优化器现在可以根据现有 JOIN 条件推断传递性的等值 JOIN 谓词。例如，给定 `A.x = B.x AND B.x = C.x`，就能识别出等价关系 `A.x = C.x`，从而让优化器可以考虑在通过传递关系相连的表之间直接执行 JOIN。这可以提升星型和雪花 schema 的 plan 质量，因为在这类 schema 中，维度表通过共享的事实表相连。该功能由新的 `enable_join_transitive_predicates` 设置控制 (默认关闭) 。[#98479](https://github.com/ClickHouse/ClickHouse/pull/98479) ([Alexander Gololobov](https://github.com/davenger)) 。
* 通过预先并行取消合并操作，优化 `TRUNCATE DATABASE TABLES LIKE`。[#98597](https://github.com/ClickHouse/ClickHouse/pull/98597) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 为乘法增加单调性支持，从而使 `key * constant` 表达式也能进行主键剪枝。[#98983](https://github.com/ClickHouse/ClickHouse/pull/98983) ([Amos Bird](https://github.com/amosbird)).
* 缓存字典在 `hasKeys` 中不再使用独占锁；改为在缓存读取时使用共享锁，从而减少锁竞争。[#100796](https://github.com/ClickHouse/ClickHouse/pull/100796) ([liuguangliang](https://github.com/sourcelliu)).
* 在查询树中内联 VIEW 子查询，从而可对 VIEW 应用更多优化。[#100830](https://github.com/ClickHouse/ClickHouse/pull/100830) ([Dmitry Novik](https://github.com/novikd)) 。
* 优化服务器启动时的缓存加载。[#101500](https://github.com/ClickHouse/ClickHouse/pull/101500) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 当谓词选择性足够高时，为带有 FINAL 的 ReplacingMergeTree 实现延迟列物化。[#101647](https://github.com/ClickHouse/ClickHouse/pull/101647) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 重新启用 `optimize_rewrite_array_exists_to_has` 优化 (自 23.10 起默认关闭) 。它会将 `arrayExists(x -> x = elem, arr)` 重写为快得多的 `has(arr, elem)`；现在，当数组元素类型与 `elem` 不兼容、无法用于 `has` 时 (例如 `Date` 与 `String`) ，会正确跳过此重写，因此此前会报错的查询现在仍可正常工作。关闭了 [#71431](https://github.com/ClickHouse/ClickHouse/issues/71431)。[#100944](https://github.com/ClickHouse/ClickHouse/pull/100944) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* 改进了 EXPLAIN PLAN pretty=1 的输出：打印顶层查询的输出列，显示 join 关系的标签/符号以及预估结果行数和本地性，并包含 join/source 步骤中每一步的输出列。这些变更涵盖了 [#98117](https://github.com/ClickHouse/ClickHouse/issues/98117) 中的 Information Deficit 部分。[#99462](https://github.com/ClickHouse/ClickHouse/pull/99462) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* 新增 MergeTree 表设置 `share_nested_offsets` (默认值为 `true`) 。当其设为 `false` 时，带点号名称的 Array 列 (例如 `n.a`、`n.b`) 会被视为彼此独立的列，而不再按旧版 `Nested` 语义共享偏移量文件，也不再校验数组大小是否相等。[#98416](https://github.com/ClickHouse/ClickHouse/pull/98416) ([Amos Bird](https://github.com/amosbird)) 。
* 现在，用户可以在 users.xml/yaml 配置中指定多种身份验证方法 (SQL 中一直都支持) 。[#91998](https://github.com/ClickHouse/ClickHouse/pull/91998) ([Flip-Liquid](https://github.com/Flip-Liquid)).
* 自动重新加载启用 TLS 的 Raft 节点间连接。[#93455](https://github.com/ClickHouse/ClickHouse/pull/93455) ([Evgeny](https://github.com/evkuzin)).
* 将 `cast_keep_nullable` 扩展为支持 Dynamic/JSON 类型。启用后，对可为 Nullable 的类型中的 NULL 进行类型转换时会返回 NULL；否则会抛出 `CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN` 错误。[#96504](https://github.com/ClickHouse/ClickHouse/pull/96504) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 通过引入对象池，降低了内部数据结构 (`ISerialization` 对象) 的内存占用。[#96563](https://github.com/ClickHouse/ClickHouse/pull/96563) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 为 keeper-client 的 XML 配置新增对 `password` 和 `identity` 字段的支持。[#96800](https://github.com/ClickHouse/ClickHouse/pull/96800) ([Grigorii Sokolik](https://github.com/GSokol)) 。
* 改进对 Unity Catalog 的 `Iceberg` 写入支持。[#98162](https://github.com/ClickHouse/ClickHouse/pull/98162) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 新增设置 `finalize_projection_parts_synchronously`，支持在 INSERT 期间同步完成 projection parts 的最终化；默认仍保留现有的异步行为，同时可降低具有大量 projections 的表的峰值内存占用。[#98228](https://github.com/ClickHouse/ClickHouse/pull/98228) ([Amos Bird](https://github.com/amosbird)) 。
* 向 `system.part_log` 添加 `projections_duration_ms` 列，用于记录各投影合并/重建的耗时 (以毫秒为单位) 。[#98292](https://github.com/ClickHouse/ClickHouse/pull/98292) ([Amos Bird](https://github.com/amosbird)) 。
* 改进了在 clickhouse-client 中通过 KILL QUERY 和取消查询 (Ctrl+C) 来取消使用 ExpressionTransform 和 NumbersRangedSource 的查询。[#98908](https://github.com/ClickHouse/ClickHouse/pull/98908) ([Roman Vasin](https://github.com/rvasin)).
* 将硬编码的 `source_table_engines` 列表替换为通过 `StorageFactory::getAllStorages()` 进行运行时查找。这为一些此前缺失的表引擎补充了访问检查，并关闭了 [#71544](https://github.com/ClickHouse/ClickHouse/issues/71544)。[#98984](https://github.com/ClickHouse/ClickHouse/pull/98984) ([pufit](https://github.com/pufit)) 。
* 新增一个设置，用于控制 Variant 和 Dynamic 的类型不匹配处理方式 (抛出异常或返回 NULL) 。[#99085](https://github.com/ClickHouse/ClickHouse/pull/99085) ([Bharat Nallan](https://github.com/bharatnc)).
* 改进 `Iceberg` 与 Spark 的兼容性：修复因混用存储路径和元数据路径而导致的路径处理不一致问题；强制 `Iceberg` 表写入的表位置必须为 URL 或绝对路径；由于某些 ClickHouse 读取器在遍历后不支持按字节计数，因此为 `Azure` 中的文件大小统计添加回退机制；以与 Spark 兼容的方式处理 `version-hint.txt`；引入类型级抽象，使今后更不容易混淆不同的路径类型；为 `Azure` 和 `Local` 添加测试，以验证无需中间上传/下载即可实现跨引擎互操作；修复 position delete 的使用问题，此前它依赖基于路径推断的启发式方法，而这种做法在这里并不适用。 [#99163](https://github.com/ClickHouse/ClickHouse/pull/99163) ([Daniil Ivanik](https://github.com/divanik)). [#100420](https://github.com/ClickHouse/ClickHouse/pull/100420) ([Daniil Ivanik](https://github.com/divanik)).
* 修复了在 [https://github.com/ClickHouse/ClickHouse/pull/92844](https://github.com/ClickHouse/ClickHouse/pull/92844) 中引入的 `IPartitionStrategy::cached_result` 中可能存在的竞态条件。[#99400](https://github.com/ClickHouse/ClickHouse/pull/99400) ([Arthur Passos](https://github.com/arthurpassos)) 。
* 现在，用户可以在 Arrow 格式中写入 ClickHouse 的 Interval 数据类型。[#99519](https://github.com/ClickHouse/ClickHouse/pull/99519) ([Peter Nguyen](https://github.com/petern48)) 。
* 新增了在 `Arrow` 和 `Parquet` 格式中导入和导出 `UUID` 数据类型的原生支持。现在，用户无需手动将其转换为字符串或采用其他变通方法，即可在 ClickHouse 与其他数据工具之间直接查询和传输 UUID 数据。支持自动推断顶层 UUID 的逻辑类型，并支持为嵌套 UUID 显式提供 schema 提示。[#99521](https://github.com/ClickHouse/ClickHouse/pull/99521) ([Ivan](https://github.com/ivanmantova)).
* 支持对象存储上的 `7z` 归档文件。解决了 [#70968](https://github.com/ClickHouse/ClickHouse/issues/70968)。[#99600](https://github.com/ClickHouse/ClickHouse/pull/99600) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 添加 `ObjectStorageListedObjects`、`ObjectStorageGlobFilteredObjects`、`ObjectStoragePredicateFilteredObjects` 和 `ObjectStorageReadObjects` ProfileEvents，用于查看对象存储 (`S3`、`Azure` 等) 文件列举和读取管道的内部信息。[#99778](https://github.com/ClickHouse/ClickHouse/pull/99778) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了在查询并非所有底层分布式/远程表都包含的列时，`merge` 表函数因 `UNKNOWN_IDENTIFIER` 错误而失败的问题。[#99833](https://github.com/ClickHouse/ClickHouse/pull/99833) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，我们将 commit 时间计入 ReplicatedMergeTree 的变更总执行时间指标中。该时间在 [#96376](https://github.com/ClickHouse/ClickHouse/issues/96376) 之后丢失了。[#99936](https://github.com/ClickHouse/ClickHouse/pull/99936) ([alesapin](https://github.com/alesapin)).
* 为 `MetadataStorageFromDisk` 中待移除的 blob 对象添加预写日志，在删除对象时提高元数据与远程对象存储之间的持久性和一致性。[#100019](https://github.com/ClickHouse/ClickHouse/pull/100019) ([Maksim Kita](https://github.com/kitaisreal)) 。
* 在嵌入式客户端 (SSH 和 WebSocket 协议) 中禁用 AI SQL 生成 (`??` 命令) ，以防止访问服务器环境变量。[#100290](https://github.com/ClickHouse/ClickHouse/pull/100290) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 调整通过 catalog 进行 Iceberg 插入的接口。废弃以下设置：`storage_catalog_type`、`storage_aws_access_key_id` 等。[#100334](https://github.com/ClickHouse/ClickHouse/pull/100334) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 粘贴到 clickhouse-client 时，将制表符转换为 4 个空格。修复了 [#100405](https://github.com/ClickHouse/ClickHouse/issues/100405)。[#100416](https://github.com/ClickHouse/ClickHouse/pull/100416) ([Raúl Marín](https://github.com/Algunenano)) 。
* 当 `show_data_lake_catalogs_in_system_tables` 被禁用时，避免为了“Maybe you meant …”表提示而扫描整个远程数据湖目录。[#100452](https://github.com/ClickHouse/ClickHouse/pull/100452) ([Alsu Giliazova](https://github.com/alsugiliazova)) 。
* 在分区裁剪后再应用 `distributed_index_analysis_min_indexes_bytes_to_activate`。[#100477](https://github.com/ClickHouse/ClickHouse/pull/100477) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在使用空 IN/NOT IN 子句时，Parquet bloom 过滤器下推导致的断言失败。[#100543](https://github.com/ClickHouse/ClickHouse/pull/100543) ([zoomxi](https://github.com/zoomxi)).
* MinMax 列统计信息现在将最小值和最大值存储为 Field (带类型) ，而非 Float64。序列化格式除这些值外，还会包含列的类型名称。统计信息文件版本已升级到 V2；由旧版本写入的文件需要重新物化 (ALTER TABLE … MATERIALIZE STATISTICS ALL) 。修复 [#53140](https://github.com/ClickHouse/clickhouse-private/issues/53140)。[#100605](https://github.com/ClickHouse/ClickHouse/pull/100605) ([Han Fei](https://github.com/hanfei1991)) 。
* 更新 `cppkafka`，包含了消费者关闭死锁问题的修复。[#100612](https://github.com/ClickHouse/ClickHouse/pull/100612) ([Azat Khuzhin](https://github.com/azat)) 。
* 用于解析 Iceberg 中数据文件的对象信息现在包含从 manifest 文件中解析得到的文件行数以及以字节为单位的文件大小。[#100645](https://github.com/ClickHouse/ClickHouse/pull/100645) ([Daniil Ivanik](https://github.com/divanik)).
* 新增 `use_separate_cache_arena` 配置参数，以便控制是否将缓存内存分配区分离。[#100664](https://github.com/ClickHouse/ClickHouse/pull/100664) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 新增原生支持将 Apache Arrow 的 `StringView` 和 `BinaryView` 数据类型导入到 ClickHouse `String` 列中，提升了基于 Arrow 的摄取兼容性。[#100762](https://github.com/ClickHouse/ClickHouse/pull/100762) ([Ivan](https://github.com/ivanmantova)).
* 如果在运行时更改了配置文件，一些 Keeper server 设置现在支持热重载：max\_requests\_batch\_size、max\_requests\_batch\_bytes\_size、max\_request\_size、quorum\_reads。[#100773](https://github.com/ClickHouse/ClickHouse/pull/100773) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 在 release build 中增加 `MemoryAllocatedWithoutCheck/MemoryAllocatedWithoutCheckBytes` 这两个 profile events 的计数。[#100899](https://github.com/ClickHouse/ClickHouse/pull/100899) ([Pavel Kruglov](https://github.com/Avogar)) 。
* Cgroupv2 内存跟踪现在会将内核内存中的 `slab_reclaimable` 排除在外，从而能更准确地衡量不可回收的内存使用量。[#100901](https://github.com/ClickHouse/ClickHouse/pull/100901) ([Antonio Andelic](https://github.com/antonio2368)) 。
* `use_partition_pruning = 0` 现在不仅会禁用基于分区键的剪枝，还会禁用 `MinMax` 索引剪枝以及针对分区键列的计数优化。[#100904](https://github.com/ClickHouse/ClickHouse/pull/100904) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 在 `EXPLAIN [PLAN]` 中，`pretty=1` 现在会以更易于阅读的格式输出 expression。[#100927](https://github.com/ClickHouse/ClickHouse/pull/100927) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* `accurateCastOrNull` 和 `accurateCastOrDefault` 现已支持 `Tuple` 目标类型，包括元素为 `Nullable` 的嵌套 `Tuples`。此前，这些函数会拒绝 `Tuple` 目标类型，因为 `Tuple` 不能位于 `Nullable` 内。已关闭 [#100820](https://github.com/ClickHouse/ClickHouse/issues/100820)。[#100942](https://github.com/ClickHouse/ClickHouse/pull/100942) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在浅色与深色主题间切换时 Play UI 中图表重复显示的问题。[#101058](https://github.com/ClickHouse/ClickHouse/pull/101058) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 将 chdig 更新到 [v26.3.1](https://github.com/azat/chdig/releases/tag/v26.3.1) (perfetto UI，为 CPU/内存/合并/查询摘要添加迷你图、system.warnings，以及日志中的正则搜索) 。[#101092](https://github.com/ClickHouse/ClickHouse/pull/101092) ([Azat Khuzhin](https://github.com/azat)) 。将 chdig 更新到 [v26.4.3](https://github.com/azat/chdig/releases/tag/v26.4.3) (perfetto 改进、修复通过 pastila.nl 共享的问题、火焰图差异对比、实时修改设置) 。[#103145](https://github.com/ClickHouse/ClickHouse/pull/103145) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在，`WITH` 子句在 `SELECT` 查询前可以带尾随逗号。[#101093](https://github.com/ClickHouse/ClickHouse/pull/101093) ([Aruj Bansal](https://github.com/arujbansal)) 。
* 新增 `compress_per_column_in_compact_parts` MergeTree setting，用于控制 Compact parts 内压缩块的组织方式。当为 `true` (默认值，保持当前行为) 时，每列都会开启一个新的压缩块，从而支持选择性解压。当为 `false` 时，一个粒度内的所有列都会打包到同一个压缩块中，从而为始终读取全部列的 workloads 提升压缩率和读取性能。[#101114](https://github.com/ClickHouse/ClickHouse/pull/101114) ([Amos Bird](https://github.com/amosbird)) 。
* 仅在鼠标悬停于表名上时，才在 Play UI 中显示表信息气泡，而不是在悬停于整行时显示。[#101118](https://github.com/ClickHouse/ClickHouse/pull/101118) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 Play UI 侧边栏添加引擎专属图标，并优化表列表的使用体验。[#101134](https://github.com/ClickHouse/ClickHouse/pull/101134) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持 `Arrow`、`ArrowStream`、`ORC` 和旧版 `Parquet` 格式中的 `Nullable(Tuple)`。 [#101272](https://github.com/ClickHouse/ClickHouse/pull/101272) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 在 web UI (play.html) 中将 TOTALS 行显示在表格页脚。[#101286](https://github.com/ClickHouse/ClickHouse/pull/101286) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 web UI (`play.html`) 中支持多查询模式：可一次运行多个查询，支持并行执行类似 `SELECT` 的查询，并分别显示每个查询的结果。[#101290](https://github.com/ClickHouse/ClickHouse/pull/101290) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复将结果表重构为 Web 组件后，play.html web UI 中列宽调整失效的问题。[#101295](https://github.com/ClickHouse/ClickHouse/pull/101295) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持按时间间隔限制在 MEMORY\_LIMIT\_EXCEEDED 时 jemalloc profile 的刷写次数。[#101396](https://github.com/ClickHouse/ClickHouse/pull/101396) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增 Keeper 设置 `nuraft_streaming_mode` (默认值为 `false`) 、`nuraft_max_log_gap_in_stream` 和 `nuraft_max_bytes_in_flight_in_stream`。已关闭 [#90743](https://github.com/ClickHouse/ClickHouse/issues/90743)。[#101427](https://github.com/ClickHouse/ClickHouse/pull/101427) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 新增了异步指标 `CGroupMemoryUsedWithoutPageCache`，用于报告排除了内核 OS page cache 和 ClickHouse 用户态页缓存后的 cgroup 内存使用量，对应于 `MemoryResidentWithoutPageCache`。同时还明确了 `CGroupMemoryUsed` 指标的说明。[#101513](https://github.com/ClickHouse/ClickHouse/pull/101513) ([Francesco Ciocchetti](https://github.com/primeroz)).
* 在解析器层面为 SQL 标准 `OVERLAY` 函数语法添加语法糖。`overlay` 函数已存在；此次新增了对基于关键字形式的支持，使用 `PLACING`、`FROM` 和 `FOR` 作为分隔符。[#101681](https://github.com/ClickHouse/ClickHouse/pull/101681) ([Desel72](https://github.com/Desel72)).
* 为系统表 `information_schema.tables` 新增了列别名 `INDEX_LENGTH`，与该表中现有的大写别名保持一致。[#101705](https://github.com/ClickHouse/ClickHouse/pull/101705) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 系统表 `information_schema.tables` 现在会忽略非活跃的表 parts。这使显示的表大小数值更接近实际。[#101706](https://github.com/ClickHouse/ClickHouse/pull/101706) ([Robert Schulze](https://github.com/rschu1ze)) 。
* `ngrams` 函数现在会拒绝无效的 ngram 长度。示例：`SELECT ngrams('abc', 0)` 现在会报错。[#101922](https://github.com/ClickHouse/ClickHouse/pull/101922) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 对 [#91820](https://github.com/ClickHouse/ClickHouse/issues/91820) 和 [#90837](https://github.com/ClickHouse/ClickHouse/issues/90837) 的后续改进：从错误信息中滤除不受支持的算法；在 FIPS 构建中运行 FIPS 专用测试。[#102067](https://github.com/ClickHouse/ClickHouse/pull/102067) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 将 Web UI (`play.html`) 中的单元格高度限制为最多三行，并支持点击展开。[#102154](https://github.com/ClickHouse/ClickHouse/pull/102154) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了一个选项，可强制 S3 端点使用 (virtual/path) 风格。解决了 [#82019](https://github.com/ClickHouse/ClickHouse/issues/82019)；[#76007](https://github.com/ClickHouse/ClickHouse/issues/76007)，是 [https://github.com/ClickHouse/ClickHouse/pull/83168](https://github.com/ClickHouse/ClickHouse/pull/83168) 的延续。 [#102378](https://github.com/ClickHouse/ClickHouse/pull/102378) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 现在，`restore_replace_external_engines_to_null` 设置也会跳过恢复使用外部引擎 (例如 `DataLakeCatalog`、`MySQL`、`PostgreSQL`、`S3`) 的数据库，而不再失败或发起外部连接。[#102400](https://github.com/ClickHouse/ClickHouse/pull/102400) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 通过 `HINT` 模式为 `hasPhrase` 函数新增文本索引分析支持。[#102438](https://github.com/ClickHouse/ClickHouse/pull/102438) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 在 ColumnDependency 中将 STATISTICS 设为只读，以修复执行 MATERIALIZE STATISTICS ALL 期间出现的 LOGICAL\_ERROR。[#102627](https://github.com/ClickHouse/ClickHouse/pull/102627) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 在 keeper-as-server 模式下创建并填充 `system.asynchronous_metric_log`。[#102664](https://github.com/ClickHouse/ClickHouse/pull/102664) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增 `default_system_log_flush_policy.skip_alias_columns` 配置选项，允许在系统日志表中省略 ALIAS 列，从而修复以 S3 为后端且不接受 ALIAS 列的系统日志问题。[#102669](https://github.com/ClickHouse/ClickHouse/pull/102669) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 不要为系统表启用自动统计信息，因为它们几乎没有机会用到这些统计信息。[#102862](https://github.com/ClickHouse/ClickHouse/pull/102862) ([Han Fei](https://github.com/hanfei1991)).
* 为 LIKE 优化增加对 `array` 分词器的支持。[#102880](https://github.com/ClickHouse/ClickHouse/pull/102880) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 即使在正式版构建中，也会发送 MemoryAllocatedWithoutCheck。[#103064](https://github.com/ClickHouse/ClickHouse/pull/103064) ([Azat Khuzhin](https://github.com/azat)) 。
* 在 system.stack\_trace 中提供每个线程的 untracked\_memory 信息。[#103065](https://github.com/ClickHouse/ClickHouse/pull/103065) ([Azat Khuzhin](https://github.com/azat)) 。

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

* 修复了因 Lazy materialization 返回多余列而导致的 `Block structure mismatch in stream` 错误。修复 [#95191](https://github.com/ClickHouse/ClickHouse/issues/95191)。[#96682](https://github.com/ClickHouse/ClickHouse/pull/96682) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了使用 `ON CLUSTER` 的数据脱敏策略查询中的逻辑错误。[#97594](https://github.com/ClickHouse/ClickHouse/pull/97594) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复了在 GCS 上使用 Unity Catalog 时的一个 bug。[#98456](https://github.com/ClickHouse/ClickHouse/pull/98456) ([Melvyn Peignon](https://github.com/melvynator)) 。
* `DataLakeCatalog` 现在在验证 `auth_header` 设置时，会遵循服务器上的 `http_forbid_headers` 配置。 [#98827](https://github.com/ClickHouse/ClickHouse/pull/98827) ([Michael Anastasakis](https://github.com/michael-anastasakis)).
* 修复 S3 花括号展开通配符中的 N+1 `HeadObject` 调用问题。[#99219](https://github.com/ClickHouse/ClickHouse/pull/99219) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 当引擎本身也支持设置时，验证 CREATE 查询中的设置变更。[#99279](https://github.com/ClickHouse/ClickHouse/pull/99279) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了以下问题：当表中包含一个表达式依赖于 EPHEMERAL 列的 MATERIALIZED 列时，`ALTER TABLE UPDATE/DELETE` 会因 `Missing columns` 错误而失败。[#99281](https://github.com/ClickHouse/ClickHouse/pull/99281) ([Yash ](https://github.com/Onyx2406)).
* JDBC、ODBC 和 NATS 连接字符串中的凭据现在会在查询日志和 `SHOW CREATE` 输出中被屏蔽，从而避免敏感信息意外泄露。对于 URI 样式的连接字符串 (例如 `{scheme}://{user}:{password}@{host}`) ，现在仅屏蔽密码部分，其余内容仍然可见，以便于调试。`nats_token` 设置现在也会被屏蔽。[#99344](https://github.com/ClickHouse/ClickHouse/pull/99344) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了 parseDateTimeBestEffort 在 DD-month-YYYY 格式中将以月份前缀开头的单词错误解析的问题。关闭 [#99345](https://github.com/ClickHouse/ClickHouse/issues/99345#event-23517658314)。[#99350](https://github.com/ClickHouse/ClickHouse/pull/99350) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在非 analyzer 下会忽略 TABLE\_UUID\_MISMATCH 的问题。[#99380](https://github.com/ClickHouse/ClickHouse/pull/99380) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了一个问题：在同一请求中与 `compatibility` 一起发送显式设置时，如果其值与服务器默认值相同，这些设置可能会被静默忽略。[#99402](https://github.com/ClickHouse/ClickHouse/pull/99402) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了 hive 分区路径中带有前导零的数字导致报错的问题。修复了 [#98801](https://github.com/ClickHouse/ClickHouse/issues/98801)。[#99458](https://github.com/ClickHouse/ClickHouse/pull/99458) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复在表被删除的同时仍有读取查询在运行时的 heap-use-after-free 问题 (过去 90 天内在 CI 中出现 19 次) 。[#99483](https://github.com/ClickHouse/ClickHouse/pull/99483) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 Keeper 中的一个 bug：如果同一 server 上另一个不相关的 session 恰好在错误的时机被关闭，读取请求可能会卡住 (导致 session 超时) 。[#99484](https://github.com/ClickHouse/ClickHouse/pull/99484) ([Michael Kolupaev](https://github.com/al13n321)).
* 在应用补丁前验证列结构。[#99531](https://github.com/ClickHouse/ClickHouse/pull/99531) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 修复在包含 `Dynamic` 列的表执行合并期间，快速切换 `SYSTEM STOP/START MERGES` 时出现的垂直合并 `rows_sources` 断言失败问题。[#99532](https://github.com/ClickHouse/ClickHouse/pull/99532) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `toWeek()` 的分区裁剪错误：在按 `toYYYYMM(date)` 分区的表上，带有 `WHERE toWeek(date, mode) = N` 的查询在第 49–52 周会返回空结果。[#99542](https://github.com/ClickHouse/ClickHouse/pull/99542) ([Takumi Hara](https://github.com/takumihara)).
* 修复了在处理由 JOIN 生成的未引用行时，对 ColumnReplicated 进行操作的函数中出现的异常。[#99564](https://github.com/ClickHouse/ClickHouse/pull/99564) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 修复 `CLEAR COLUMN` 不会重建 projections，也不会重新计算依赖被清除列的 materialized 列的问题，否则可能在后续合并期间导致异常或数据损坏。[#99565](https://github.com/ClickHouse/ClickHouse/pull/99565) ([Desel72](https://github.com/Desel72)) 。
* 修复了 `ConditionSelectivityEstimator` 中的一个异常 (`Bad get: has Tuple, actual type String`) ：当查询在已启用 `use_statistics` 且具有列统计信息的表上，对单个标量查询参数使用 IN 时 (例如 `WHERE col IN ({p:String})`) ，会触发该异常。[#99614](https://github.com/ClickHouse/ClickHouse/pull/99614) ([Ilya Yatsishin](https://github.com/qoega)).
* 带有未知投影的分片不应被标记为永久丢失。[#99623](https://github.com/ClickHouse/ClickHouse/pull/99623) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了一个罕见的逻辑错误异常：并发执行 `SYSTEM STOP MERGES` 和 `SYSTEM START MERGES` 时，可能会在 vertical merge 期间抛出该异常。[#99628](https://github.com/ClickHouse/ClickHouse/pull/99628) ([Desel72](https://github.com/Desel72)).
* 修复 `injectRequiredColumns` 中的悬空引用，避免在合并期间导致崩溃。[#99679](https://github.com/ClickHouse/ClickHouse/pull/99679) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 修复了 Avro 格式读取器在读取超出目标列类型可表示范围的数值时的未定义行为。现在发生溢出时，查询会直接失败，而不再静默产生错误的值。 [#99697](https://github.com/ClickHouse/ClickHouse/pull/99697) ([asyablue22](https://github.com/asyablue22)).
* 修复了 `executable` 表函数参数中 shell 风格引号的解析错误。[#99794](https://github.com/ClickHouse/ClickHouse/pull/99794) ([Nikita Semenov](https://github.com/leftmain)) 。
* 修复了 `NativeReader` 在反序列化行数不匹配的 Native 格式 stream 时误报 `abort` 的问题：将其从 `LOGICAL_ERROR` 改为 `INCORRECT_DATA`，使该错误按数据错误处理，而不会在 sanitizer/debug 构建中触发 `abort()`。[#99822](https://github.com/ClickHouse/ClickHouse/pull/99822) ([Rahul Nair](https://github.com/motsc)).
* 修复当二进制流中的序列化类型为 `DETACHED` 时，`Tuple` 列在反序列化过程中导致进程中止的问题。[#99823](https://github.com/ClickHouse/ClickHouse/pull/99823) ([Rahul Nair](https://github.com/motsc)).
* 修复了在文件系统缓存动态调整大小期间，由于 SLRU 子队列提升中的竞态条件而误触发 `LOGICAL_ERROR` 异常的问题。[#99850](https://github.com/ClickHouse/ClickHouse/pull/99850) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 async insert 查询在 `query_log` 和客户端输出中将 `written_rows`、`read_rows` 和 `result_rows` 误报为 0 的问题。[#99879](https://github.com/ClickHouse/ClickHouse/pull/99879) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了 `KILL QUERY` 中的异常 "Bad cast from type X to Y"：当针对系统表的内部查询返回由 `ColumnConst` 包装的列时，会出现该问题。[#99881](https://github.com/ClickHouse/ClickHouse/pull/99881) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `untuple` 参数中关联子查询的逻辑错误。[#99917](https://github.com/ClickHouse/ClickHouse/pull/99917) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了调用 `right`、`rightUTF8` 或其他子串函数时传入长度为 INT64\_MIN (-9223372036854775808) 的值所引发的异常；此前由于整数溢出，会导致未定义行为。现在，这些函数会正确报告 ARGUMENT\_OUT\_OF\_BOUND 错误。[#99934](https://github.com/ClickHouse/ClickHouse/pull/99934) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 现在 ClickHouse 应该能够正确处理 Spark 风格的表 (即每个文件都有完整的绝对路径，或相对于公共表路径的相对路径) 。修复了 [#92348](https://github.com/ClickHouse/ClickHouse/issues/92348)。[#99935](https://github.com/ClickHouse/ClickHouse/pull/99935) ([alesapin](https://github.com/alesapin)) 。
* 修复以下问题：当 `ALTER` 语句本身也带有 `SETTINGS` 时，对于包含带有 `SETTINGS` 的嵌套子查询的 `ALTER TABLE ... MODIFY QUERY`，会抛出“AST 格式不一致”异常。[#99938](https://github.com/ClickHouse/ClickHouse/pull/99938) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 由于疑似出现性能回退，撤销 [#97114](https://github.com/ClickHouse/ClickHouse/issues/97114) "将 join step 的行数估算提前到检查是否只有 1 个子节点之前"。[#99957](https://github.com/ClickHouse/ClickHouse/pull/99957) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复了一个 bug：如果对文件发起的 HEAD 请求响应中缺少 `Content-Length` 请求头 (例如由于 GCS 中的解压转码) ，ClickHouse 可能会跳过这些文件。[#99971](https://github.com/ClickHouse/ClickHouse/pull/99971) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复在将 `NumericIndexedVector` 聚合状态与偶数整数常量相乘时发生的断言失败问题 (在 debug 构建中会抛出异常，在 release 构建中会产生错误结果) ；其原因是 `pointwiseAddInplace` 中带别名的 Roaring bitmap 发生了自异或。[#99976](https://github.com/ClickHouse/ClickHouse/pull/99976) ([Desel72](https://github.com/Desel72)).
* 防止在链式 `JOIN USING` 的旧版过滤器下推中，因 `JOIN` 转换后键类型发生变化而触发 `Unexpected return type` 异常。[#99999](https://github.com/ClickHouse/ClickHouse/pull/99999) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在未解析的表函数参数中使用标量子查询时出现的 `LOGICAL_ERROR` 异常“表表达式的节点类型异常……实际为 IDENTIFIER”，例如 `SELECT * FROM remote('localhost', view(SELECT 2 AS x), concat(x, (SELECT 1)))`。[#100014](https://github.com/ClickHouse/ClickHouse/pull/100014) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了这样一个问题：当数据后的下一行带有尾随 SQL 注释 (`--` 或 `/* */`) 时，`INSERT` 配合 `VALUES` 会失败。现在会跳过该注释，而不会将其解析为另一行。[#100016](https://github.com/ClickHouse/ClickHouse/pull/100016) ([Pratima Patel](https://github.com/pratimapatel2008)) 。
* 修复了 `arrayRemove` 在比较包含 NULL 值的元组时出现异常的问题。[#100017](https://github.com/ClickHouse/ClickHouse/pull/100017) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `system.asynchronous_inserts` 中的跨用户数据泄露问题：任何对该表具有 `SELECT` 权限的用户都可能看到其他用户待处理的异步 insert 条目。现在，这些条目会按当前用户进行过滤，除非该用户拥有 `SHOW_USERS` 权限。[#100024](https://github.com/ClickHouse/ClickHouse/pull/100024) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复了将 Time64 转换为 UInt64 时，值可能被限制在 24 小时内的问题。[#100025](https://github.com/ClickHouse/ClickHouse/pull/100025) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了以下问题：当 CREATE DICTIONARY 的定义中包含带有不存在函数的列表值时，本地服务器会崩溃。[#100036](https://github.com/ClickHouse/ClickHouse/pull/100036) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了 `CSV`、`MsgPack` 格式无法正确解析 `Nullable(Tuple)` 的问题。关闭 [#99753](https://github.com/ClickHouse/ClickHouse/issues/99753)。[#100038](https://github.com/ClickHouse/ClickHouse/pull/100038) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复在将带有 WITH 函数表达式别名 (例如 `tuple(...)`) 作为 `IN` 右侧使用时，`CREATE VIEW` 因 `UNKNOWN_IDENTIFIER` 而失败的问题。[#100042](https://github.com/ClickHouse/ClickHouse/pull/100042) ([Peng](https://github.com/fastio)) 。
* 修复时间序列聚合函数 (例如 `timeSeriesResampleToGridWithStaleness`) 在并行副本下配合 `initializeAggregation` 或 `AggregatingMergeTree` 使用时，会因报错 `ILLEGAL_TYPE_OF_ARGUMENT` 而失败的问题。[#100053](https://github.com/ClickHouse/ClickHouse/pull/100053) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修正 NumericIndexedVectorDataBSI 内部负值处理的问题。 [#100086](https://github.com/ClickHouse/ClickHouse/pull/100086) ([Daniil Ivanik](https://github.com/divanik)).
* 修复 `accurateCastOrDefault` 和 `to*OrDefault` 函数在输入为常量时无法保留 Const 列类型的问题。[#100132](https://github.com/ClickHouse/ClickHouse/pull/100132) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 省略的 `LowCardinality(Nullable(T))` 类型查询参数现在会像 `Nullable(T)` 一样，正确默认使用 NULL。[#100144](https://github.com/ClickHouse/ClickHouse/pull/100144) ([Denys Melnyk](https://github.com/germiBest)) 。
* 修复 `StringSearcher.h` 中使用未初始化值的问题。[#100225](https://github.com/ClickHouse/ClickHouse/pull/100225) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 允许通过 Ctrl+C 取消标量子查询及其他分析阶段的管道。此前，在长时间运行的标量子查询执行期间按下 Ctrl+C 不会有任何效果，必须等到子查询完成后才行。同时还修复了进度条和 JSON 统计信息，使其能够在 `clickhouse-client` 和 `clickhouse-local` 中正确报告标量子查询执行期间读取的行数。与 @YjyJeff 共同完成。[#100230](https://github.com/ClickHouse/ClickHouse/pull/100230) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了涉及 `Dynamic` 列、交叉连接和运行时过滤器的查询中出现的 `LOGICAL_ERROR` 异常。该问题的原因是，`ColumnVariant::filter` 在 `hasOnlyNulls` 优化路径中共享了 Variant 列指针，而不是对其进行克隆。关闭 [https://github.com/ClickHouse/ClickHouse/pull/100147。](https://github.com/ClickHouse/ClickHouse/pull/100147。) [#100234](https://github.com/ClickHouse/ClickHouse/pull/100234) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 Variant 数组的一个 bug：调用 `arrayFirst`/`arrayLast` 函数时，可能会错误地重新解释数据类型。例如，之前当实际底层的 Variant 类型为 `Date` 时，`Array(Variant(Date, Bool))` 会被转换为 `Bool`。[#100255](https://github.com/ClickHouse/ClickHouse/pull/100255) ([timothygk](https://github.com/timothygk)) 。
* 函数有一些小幅调整：h3 函数现在能更好地校验边界；readWKB 会检查大小限制 (新增设置 `max_wkb_geometry_elements`) ；随机生成器函数会限制计算中的最大迭代次数。这是对 [#93543](https://github.com/ClickHouse/ClickHouse/issues/93543) 的后续修复。[#100270](https://github.com/ClickHouse/ClickHouse/pull/100270) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一个问题：当某些参数名是其他参数名的子字符串时，`cutURLParameter` 可能会错误地跳过这些参数。[#100280](https://github.com/ClickHouse/ClickHouse/pull/100280) ([Nikita Semenov](https://github.com/leftmain)) 。
* 修复了 Iceberg metadata 文件路径设置中包含空字节时触发的异常。[#100283](https://github.com/ClickHouse/ClickHouse/pull/100283) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在 `distributed_index_analysis` 与包含 `IN` 子查询的谓词一同使用时，实际执行的查询数量呈二次增长的问题。[#100287](https://github.com/ClickHouse/ClickHouse/pull/100287) ([Anton Popov](https://github.com/CurtizJ)).
* 修复在将 `GROUP BY ... WITH TOTALS HAVING` 与 `UNION DISTINCT` 及 Nullable 表达式组合使用时出现的 "Block structure mismatch" 异常。 [#100293](https://github.com/ClickHouse/ClickHouse/pull/100293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当 `block_size_bytes` 参数大到极端时，`estimateCompressionRatio` 中出现 `LOGICAL&#95;ERROR` 异常的问题。[#100298](https://github.com/ClickHouse/ClickHouse/pull/100298) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在调试构建中使用 `GROUP BY CUBE(...) WITH ROLLUP` 或类似组合时触发的“AST 格式化不一致”异常。[#100376](https://github.com/ClickHouse/ClickHouse/pull/100376) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了使用列别名以及 `SELECT *` 或 `EXCEPT`/`INTERSECT` 查询创建视图时出现的异常。[#100386](https://github.com/ClickHouse/ClickHouse/pull/100386) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了这样一个问题：在发生心跳错误后，如果消费者卡在重平衡过程中，Kafka 引擎表上的 `DROP TABLE` 会无限期挂起。[#100388](https://github.com/ClickHouse/ClickHouse/pull/100388) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在使用 zip 归档执行备份/恢复操作时出现的 `ReadBuffer is canceled. Can't read from it.` 异常。[#100400](https://github.com/ClickHouse/ClickHouse/pull/100400) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了以下 `TOO_MANY_ROWS` 异常：当数据分散在多个粒度边界不对齐的 parts 中时，带有 `max_rows_to_read` / `force_primary_key` 的 `SELECT count()` 查询会触发该异常。[#100408](https://github.com/ClickHouse/ClickHouse/pull/100408) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `system.completions`，使其能够在所有权限授予组合下根据访问权限正确过滤数据库、表和列：按表、按库授权，以及按列 revoke。[#100432](https://github.com/ClickHouse/ClickHouse/pull/100432) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复 NuRaft 中由竞态条件导致的 SEGFAULT。 [#100444](https://github.com/ClickHouse/ClickHouse/pull/100444) ([Pablo Marcos](https://github.com/pamarcos)).
* `min`/`max`/`argMin`/`argMax` 现在对 NaN 的处理与 `ORDER BY` 一致：NaN 始终会被跳过 (仅当所有值均为 NaN 时才返回) 。此前，由于 IEEE 754 的无序比较语义，结果取决于 NaN 在数据中的位置。[#100448](https://github.com/ClickHouse/ClickHouse/pull/100448) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了一个复制粘贴导致的 bug：如果只设置了 `delta_lake_snapshot_end_version` 而未设置 `delta_lake_snapshot_start_version`，此前会被静默忽略，而不是报出 `BAD_ARGUMENTS` 错误。 [#100454](https://github.com/ClickHouse/ClickHouse/pull/100454) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* `StorageRabbitMQ::shutdown` 不是幂等的 (它会无条件地访问弱指针，然后销毁相应的共享指针) ，但现在会被调用两次：一次在 `StreamingStorageRegistry` 中，随后一次在 `DatabaseCatalog` 中。此次修复使该方法变为幂等，并添加了防御性的空值检查。[#100455](https://github.com/ClickHouse/ClickHouse/pull/100455) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了将 `accurateCastOrNull` 与 `QBit` 目标类型一起使用时触发的 `LOGICAL_ERROR` 异常。[#100470](https://github.com/ClickHouse/ClickHouse/pull/100470) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了在 `optimize_on_insert=0` 的 wide parts 中，向包含嵌套 `Array(JSON)` 列的表插入数据时出现的 LOGICAL\_ERROR 异常 "Stream ... not found"。[#100475](https://github.com/ClickHouse/ClickHouse/pull/100475) ([Pavel Kruglov](https://github.com/Avogar)).
* 在 `RESTORE` 期间，对备份 metadata 中的文件条目路径进行校验，以拒绝路径遍历、绝对路径和空名称。[#100483](https://github.com/ClickHouse/ClickHouse/pull/100483) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复 `LIMIT m OFFSET n WITH TIES` 语法无法生效的问题。该语法等同于 `LIMIT n, m WITH TIES`，后者此前已可正常使用。[#100491](https://github.com/ClickHouse/ClickHouse/pull/100491) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了在对带有命名字段且元素为 `LowCardinality` 的 `Nullable(Tuple)` 列使用 `IN` 时出现的异常 "No set is registered for key"。[#100523](https://github.com/ClickHouse/ClickHouse/pull/100523) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 usearch `sorted_buffer_gt::insert()` 中的堆缓冲区溢出问题；该问题可能导致在执行向量相似性搜索时发生崩溃，或静默地损坏内存。[#100537](https://github.com/ClickHouse/ClickHouse/pull/100537) ([Dustin Healy](https://github.com/dustinhealy)) 。
* 修复了 `EXECUTE AS` 会忽略查询中指定的 `FORMAT` 和 `INTO OUTFILE` 子句的问题。[#100538](https://github.com/ClickHouse/ClickHouse/pull/100538) ([pufit](https://github.com/pufit)).
* 修复 SAMPLE 在查询级 OFFSET 下 AST 格式不一致的问题。关闭 [#100576](https://github.com/ClickHouse/ClickHouse/issues/100576)。[#100579](https://github.com/ClickHouse/ClickHouse/pull/100579) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 Azure 上的 Polaris 目录问题。自 25.12 起，该目录在 Azure 上会在路径开头附加 bucket。例如，会变成 `abfss://polaris-polaris@<some_url>.windows.net/polaris-polaris/<other-path>`，而不是 `abfss://polaris-polaris@<some_url>.windows.net/<other-path>`。此 PR 会从路径中去掉 bucket。[#100583](https://github.com/ClickHouse/ClickHouse/pull/100583) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了在某些块中默认列为 const 时，transform 中的类型不匹配异常。关闭了 [#100574](https://github.com/ClickHouse/ClickHouse/issues/100574)。[#100616](https://github.com/ClickHouse/ClickHouse/pull/100616) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了以下 NOT\_FOUND\_COLUMN\_IN\_BLOCK 情况：projection 的 SELECT 部分包含查询原始 SELECT 部分中不存在的列。关闭 [#100194](https://github.com/ClickHouse/ClickHouse/issues/100194)。[#100623](https://github.com/ClickHouse/ClickHouse/pull/100623) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 根据文件大小和溢出限制校验 Npy 格式的形状维度，以防止恶意构造、维度大得不合理的 `.npy` 文件导致拒绝服务。同时还会拒绝空形状，并将每行内存限制在 2 GiB。[#100625](https://github.com/ClickHouse/ClickHouse/pull/100625) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在异步插入 (TCP) 以及所有通过 HTTP 进行的插入中解析 `DateTime` 值时忽略 `session_timezone` 的问题。[#100647](https://github.com/ClickHouse/ClickHouse/pull/100647) ([Sema Checherinda](https://github.com/CheSema)) 。
* 当使用表函数作为 source 时，允许向 `cluster()` 和 `clusterAllReplicas()` 表函数传递 sharding key (例如 `cluster('name', view(...), sharding_key)`) 。[#100665](https://github.com/ClickHouse/ClickHouse/pull/100665) ([Sergey Veletskiy](https://github.com/velom)) 。
* 修复使用带有 Array 组合器和 NULL 参数的参数化聚合函数时导致的服务端崩溃 (断言失败) 问题，例如 `quantileIfArrayArray(0.5)([[NULL]], [[1]])`。[#100679](https://github.com/ClickHouse/ClickHouse/pull/100679) ([nerve-bot](https://github.com/nerve-bot)) 。
* 修复在启用 `use_variant_as_common_type` 时，计算空元组和非空元组的共同超类型时出现的异常。[#100699](https://github.com/ClickHouse/ClickHouse/pull/100699) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 当配置了 Azure Blob 存储 disk，但端点暂时无法访问 (例如 DNS 故障) 时，服务器不再启动失败。[#100701](https://github.com/ClickHouse/ClickHouse/pull/100701) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `positiveModulo` 中的未定义行为：当无符号除数超出有符号结果类型的表示范围时，会出现该问题。[#100705](https://github.com/ClickHouse/ClickHouse/pull/100705) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在启用 `use_top_k_dynamic_filtering` 且 `ORDER BY` 列为 `Dynamic` 或 `Variant` 类型时发生的服务器崩溃问题 (逻辑错误“来自 \_\_topKFilter 的返回类型异常”) 。[#100742](https://github.com/ClickHouse/ClickHouse/pull/100742) ([Groene AI](https://github.com/groeneai)) 。
* 修复在包含 LowCardinality 元素的 Tuple 键上，结合 PREWHERE/WHERE 使用 `has()` 函数时导致的 server 崩溃问题。[#100760](https://github.com/ClickHouse/ClickHouse/pull/100760) ([Groene AI](https://github.com/groeneai)) 。
* 修复在存在并发写入时，从 S3 对象存储上的 `Log` 或 `StripeLog` 表读取数据时出现的 `file_offset_of_buffer_end <= getFileSize()` 断言失败问题 (会在调试构建中抛出异常) 。[#100763](https://github.com/ClickHouse/ClickHouse/pull/100763) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一个异常：当 WHERE 子句在已启用统计信息的表中包含函数表达式 (例如 `toDecimal64(col, 3)`) 时，统计信息选择性估算器会触发该异常。现在，估算器会跳过此类谓词，而不再尝试进行无效的类型转换。[#100764](https://github.com/ClickHouse/ClickHouse/pull/100764) ([Han Fei](https://github.com/hanfei1991)) 。
* 修复了一个罕见问题：带重排序的 join 可能产生错误结果。[#100790](https://github.com/ClickHouse/ClickHouse/pull/100790) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了优化后的简单 count 中 `AggregateFunction` 参数类型错误的问题；此前，在分布式表上查询诸如 `count(v0 + v1)` 之类的表达式时，会触发 `NUMBER_OF_ARGUMENTS_DOESNT_MATCH` 异常。[#100794](https://github.com/ClickHouse/ClickHouse/pull/100794) ([YjyJeff](https://github.com/YjyJeff)).
* 某些目录可能会在 `select * from system.databases` 查询结果的 `SETTINGS` 部分暴露一些敏感信息。此 PR 可防止这种情况发生。[#100800](https://github.com/ClickHouse/ClickHouse/pull/100800) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了 `toStartOfInterval` 在使用 Week、Quarter 或 Year 时间间隔、指定 origin 参数且时间间隔值极端时出现的未定义行为 (有符号整数溢出) 。 [#100817](https://github.com/ClickHouse/ClickHouse/pull/100817) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了 `If`、`Distinct`、`DistinctIf`、`IfState ` 聚合函数组合器在返回类型为 `Tuple` 且一个或多个参数为 `Nullable` 时，因引入 `Nullable(Tuple)` 而无法读取旧版已序列化状态的问题。关闭了 [#98917](https://github.com/ClickHouse/ClickHouse/issues/98917)。[#100826](https://github.com/ClickHouse/ClickHouse/pull/100826) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了因连接池释放后仍被使用而导致的 s3Cluster 和分布式查询段错误。[#100837](https://github.com/ClickHouse/ClickHouse/pull/100837) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复服务器关闭期间加载字典时，因空指针解引用而导致的 segfault。`Context::getUserDefinedSQLObjectsStorage` (会解引用 `user_defined_sql_objects_storage`) 会被字典线程并发调用，而此时主线程会调用 `Context::shutdown` (将 `user_defined_sql_objects_storage` 设为 null) 。我们需要确保在执行 `Context::shutdown` 之前，先在字典加载器中禁用后续更新、终止当前正在运行的字典查询，并等待字典加载线程结束。做法与普通查询类似。[#100839](https://github.com/ClickHouse/ClickHouse/pull/100839) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了 `ULIDStringToDateTime` 在输入包含非 ASCII 字节时发生的缓冲区溢出问题。[#100843](https://github.com/ClickHouse/ClickHouse/pull/100843) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 修复了在启用 `distributed_group_by_no_merge=1` 时，查询封装多个表 (包括 `Distributed` 表) 的 `Merge` 表 (或 `merge()` 表函数) 时发生的崩溃 (`LOGICAL_ERROR`) 问题。[#100859](https://github.com/ClickHouse/ClickHouse/pull/100859) ([Groene AI](https://github.com/groeneai)).
* 启用 Cast\_keep\_nullable 后，将 dynamic null 转换为 variant 时不会抛出异常。[#100864](https://github.com/ClickHouse/ClickHouse/pull/100864) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 修复了 `clickhouse-keeper-client` 的 `get`、`exists` 和 `ls` 命令将重复的 `watch_id` 错误消息输出到 stdout 而非 stderr 的问题。[#100893](https://github.com/ClickHouse/ClickHouse/pull/100893) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* 修复了 `intDiv`/`intDivOrZero` 在 Nullable Tuple 数组上抛出的异常，例如 `SELECT intDiv([divide((1, 2), ... AND NULL)], 2)`. [#100895](https://github.com/ClickHouse/ClickHouse/pull/100895) ([Raúl Marín](https://github.com/Algunenano)).
* 在存储 `StorageAlias` 的定义之前，先对其引擎参数进行求值，这样像 `currentDatabase()` 这样的表达式在保存到数据库前就会被解析为字面量。[#100902](https://github.com/ClickHouse/ClickHouse/pull/100902) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复在 `query_plan_merge_expressions = 0` 且 `ExpressionStep` 直接位于 `ReadFromMergeTree` 之上时，`processAndOptimizeTextIndexFunctions` 的问题。修复了 [#100879](https://github.com/ClickHouse/ClickHouse/issues/100879)。[#100909](https://github.com/ClickHouse/ClickHouse/pull/100909) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 更新 replxx，纳入对 do\_complete\_line 中越界访问问题的修复。[#100925](https://github.com/ClickHouse/ClickHouse/pull/100925) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了启用 shard-by-PK 优化的 JOIN 在使用查询条件缓存、且部分 parts 被缓存条件过滤掉时会返回错误结果的问题。 [#100926](https://github.com/ClickHouse/ClickHouse/pull/100926) ([Groene AI](https://github.com/groeneai)).
* 修复了在某些情况下，`divide` 和 `intDiv` 在索引分析期间用于过滤表达式时返回 `ILLEGAL_DIVISION` 的问题。[#100928](https://github.com/ClickHouse/ClickHouse/pull/100928) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了异步启动期间因启动依赖顺序错误，导致带内部表的 materialized view 出现“目标表不存在”错误的问题。 [#100946](https://github.com/ClickHouse/ClickHouse/pull/100946) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复了 `parseDateTimeBestEffort` 在解析小数秒超过 18 位的日期时间字符串时出现的未定义行为 (有符号整数溢出) 。[#100948](https://github.com/ClickHouse/ClickHouse/pull/100948) ([Vasily Chekalkin](https://github.com/bacek)) 。
* 修复了这样一种崩溃：使用文本搜索索引时，如果 `IN` 子句包含 Tuple 子查询，例如 `WHERE (id, str) IN (SELECT (id, str) FROM ...)`，或者子查询中的列数与 `IN` 左侧元组中的列数不一致，就会触发该问题。[#100959](https://github.com/ClickHouse/ClickHouse/pull/100959) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了从使用稀疏列序列化的 `MergeTree` 表构建 Polygon 字典时的崩溃问题。[#100964](https://github.com/ClickHouse/ClickHouse/pull/100964) ([Anton Popov](https://github.com/CurtizJ)).
* 修复将 `INTERSECT ALL` / `UNION ALL` 与常量折叠表达式一起使用时出现的逻辑错误 "Invalid action query tree node"。[#100977](https://github.com/ClickHouse/ClickHouse/pull/100977) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `sumCountOrDefault` 聚合函数的一个问题：在引入 `Nullable(Tuple)` 后，当存在一个或多个 `Nullable` 参数时，无法读取旧版序列化状态。关闭 [#100882](https://github.com/ClickHouse/ClickHouse/issues/100882)。[#101021](https://github.com/ClickHouse/ClickHouse/pull/101021) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了合并算法中的崩溃问题 (`Logical error: isConst/isSparse/isReplicated assertTypeEquality`) ：当惰性列复制 (`enable_lazy_columns_replication`) 生成的 `ColumnReplicated` 列流入归并排序管道，且部分输入延迟到达时，会触发该问题。[#101036](https://github.com/ClickHouse/ClickHouse/pull/101036) ([Groene AI](https://github.com/groeneai)).
* 修复了在 `SELECT` 中同一别名用于多个表达式时误报 `UNKNOWN_IDENTIFIER` 错误的问题；现在会正确报告 `MULTIPLE_EXPRESSIONS_FOR_ALIAS` 错误。[#101040](https://github.com/ClickHouse/ClickHouse/pull/101040) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了这样一个问题：当声明的时区与表达式中的时区不一致时，`DateTime`/`DateTime64` 类型的 ALIAS 列不会应用时区转换。[#101043](https://github.com/ClickHouse/ClickHouse/pull/101043) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `query_log` 未记录视图、子查询和 `INSERT ... SELECT` 所涉及行策略的问题。尽管行策略在查询计划阶段已生效，但此前不会为了记录日志而从子规划器传递到父规划器。现在，行策略 (仅用于日志记录) 会保存在 `QueryAccessInfo` 中，以便规划器和子规划器都能对其进行填充。[#101044](https://github.com/ClickHouse/ClickHouse/pull/101044) ([Narasimha Pakeer](https://github.com/npakeer)).
* 修复 `DirectJoinMergeTreeEntity` 中的异常：当管道块包含 `ColumnConst` 列，且与普通列合并时，会触发该异常。[#101046](https://github.com/ClickHouse/ClickHouse/pull/101046) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 CTE 列别名格式中的多余空格 (`WITH t (a, b)` → `WITH t(a, b)`) 。[#101049](https://github.com/ClickHouse/ClickHouse/pull/101049) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复启用 analyzer 时，`remote`/`cluster` 表函数与 `merge` 等嵌套表函数一起使用时失败的问题。[#101055](https://github.com/ClickHouse/ClickHouse/pull/101055) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 `prefer_localhost_replica=1` 时，分布式查询中 `OFFSET` 被重复应用两次、导致返回行数少于预期的问题。[#101071](https://github.com/ClickHouse/ClickHouse/pull/101071) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了在 `format_regexp` 设置中使用无效正则表达式时，使用 `Regexp` 格式会导致崩溃的问题。 [#101074](https://github.com/ClickHouse/ClickHouse/pull/101074) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复在并行副本场景下使用 `serialize_query_plan=1` 时，timeseries 聚合函数报出“Illegal type Decimal64 of start parameter”错误的问题。[#101083](https://github.com/ClickHouse/ClickHouse/pull/101083) ([Groene AI](https://github.com/groeneai)).
* 修复了在带有 PREWHERE 的投影配合 `ORDER BY ... LIMIT` 使用时，`optimizeLazyMaterialization` 中出现的异常。[#101115](https://github.com/ClickHouse/ClickHouse/pull/101115) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了在启用 `aggregate_functions_null_for_empty = 1` 设置时，使用仅限内部使用的 `Null` 组合器 (例如 `sumNull`、`avgNull`) 的聚合函数会导致服务器崩溃 (SIGABRT) 的问题。[#101147](https://github.com/ClickHouse/ClickHouse/pull/101147) ([Groene AI](https://github.com/groeneai)).
* 修复了文件系统缓存写入路径中的一个释放后使用问题；该问题可能会在为已完成的 File 段记录日志时导致从已释放的内存中读取 (由 BuzzHouse 中的 MemorySanitizer 检测到) 。[#101161](https://github.com/ClickHouse/ClickHouse/pull/101161) ([Groene AI](https://github.com/groeneai)) 。
* 修复了以下服务器崩溃问题：当分布式索引分析遇到一个 GLOBAL IN 谓词，且其集合是在未显式指定元素的情况下构建时，会触发 "Trying to attach external table to a ready set without explicit elements"。[#101178](https://github.com/ClickHouse/ClickHouse/pull/101178) ([Groene AI](https://github.com/groeneai)).
* 修复了在启用 JIT 编译时 (达到编译阈值后) ，`Decimal` 列上的 `MAX`/`MIN` 聚合函数返回错误结果的问题。[#101203](https://github.com/ClickHouse/ClickHouse/pull/101203) ([Raúl Marín](https://github.com/Algunenano)).
* 修复以下问题：执行轻量级删除后，`minmax_count_projection` 和简单的 `COUNT(*)` 优化会被永久禁用，即使所有带有轻量级删除掩码的 parts 都已合并消除。[#101212](https://github.com/ClickHouse/ClickHouse/pull/101212) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了一种情况：远程对象在 `list` 与 `read` 之间被覆盖时，先前会产生过期的对象元数据，从而导致缓存报出 `Having zero bytes, ...` 逻辑错误。[#101219](https://github.com/ClickHouse/ClickHouse/pull/101219) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了查询带有 `ORDER BY CAST(lc_column, 'Type')` 的 MergeTree 表时的服务器崩溃问题 (LOGICAL\_ERROR: Bad cast from ColumnVector to ColumnLowCardinality) ，其中 `lc_column` 的类型为 LowCardinality。[#101220](https://github.com/ClickHouse/ClickHouse/pull/101220) ([Groene AI](https://github.com/groeneai)).
* 修复 `S3Queue` 中失效处理节点的清理问题。[#101230](https://github.com/ClickHouse/ClickHouse/pull/101230) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了当 `optimizations` 参数无效时 `mergeTreeAnalyzeIndexes()` 中的 UB 问题。 [#101253](https://github.com/ClickHouse/ClickHouse/pull/101253) ([Azat Khuzhin](https://github.com/azat)).
* 修复在分区 Iceberg 表上连续执行 `ALTER TABLE UPDATE` 时出现的 `Logical error: 'partitions_count > 0'` 异常。[#101278](https://github.com/ClickHouse/ClickHouse/pull/101278) ([Desel72](https://github.com/Desel72)).
* 修复了在 MergeTree 表中，当大整数常量 (例如 256、2147483648) 在带有 AND 的 WHERE 子句中作为布尔谓词使用时导致查询结果错误的问题。例如，`SELECT count() FROM t WHERE (2147483648 > b) AND 2147483648` 之前会错误地返回 0，而不是匹配所有行。[#101287](https://github.com/ClickHouse/ClickHouse/pull/101287) ([Groene AI](https://github.com/groeneai)).
* 修复在使用 Replicated MergeTree 的 Delta Lake 集群上执行 insert-select 时出现的问题。[#101299](https://github.com/ClickHouse/ClickHouse/pull/101299) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了以下崩溃问题：当标量子查询引用一系列存在依赖关系的 materialized CTE 时，会出现“逻辑错误：在 materialized CTE 完成物化之前读取它”。[#101305](https://github.com/ClickHouse/ClickHouse/pull/101305) ([Groene AI](https://github.com/groeneai)) 。
* 修复 `IStorage::getDependentViewsByColumn` 中 `storage_id` 的数据竞争问题。[#101385](https://github.com/ClickHouse/ClickHouse/pull/101385) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复 BACKUP FROM SNAPSHOT AST 的格式化和克隆相关问题。[#101405](https://github.com/ClickHouse/ClickHouse/pull/101405) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复在启用 `enforce_keeper_component_tracking` 时查询 `system.part_moves_between_shards` 会触发 LOGICAL\_ERROR 崩溃，并显示 "Current component is empty" 的问题。[#101462](https://github.com/ClickHouse/ClickHouse/pull/101462) ([Groene AI](https://github.com/groeneai)) 。
* 修复了在 fuzzer 生成格式错误的 Dynamic 类型 AST 时，DataTypeDynamic::create() 中出现的段错误。 [#101464](https://github.com/ClickHouse/ClickHouse/pull/101464) ([Groene AI](https://github.com/groeneai)).
* 在未启用 DeltaKernel 的情况下使用 `delta_lake_snapshot_version` 或 CDF 版本设置时，将抛出错误，而不是悄然返回错误数据。[#101489](https://github.com/ClickHouse/ClickHouse/pull/101489) ([Desel72](https://github.com/Desel72)).
* 修复了在启用 `analyzer_compatibility_join_using_top_level_identifier` 设置时，同时使用 ARRAY JOIN 和 JOIN USING 会触发的 `NOT_FOUND_COLUMN_IN_BLOCK` 异常。关闭 [#101240](https://github.com/ClickHouse/ClickHouse/issues/101240)。[#101507](https://github.com/ClickHouse/ClickHouse/pull/101507) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了以下问题：当表使用 `iceberg_metadata_file_path` 创建且目标元数据版本已存在时，Iceberg INSERT 重试循环会失败。[#101548](https://github.com/ClickHouse/ClickHouse/pull/101548) ([Groene AI](https://github.com/groeneai)) 。
* 在 arrayIntersect 及相关函数的结果列中去除 Nullable，以避免序列化/反序列化不一致。[#101569](https://github.com/ClickHouse/ClickHouse/pull/101569) ([George Larionov](https://github.com/george-larionov)) 。
* 修复从基于 IcebergLocal 表引擎的 materialized view 执行 SELECT 时服务器崩溃 (LOGICAL\_ERROR) 的问题。[#101577](https://github.com/ClickHouse/ClickHouse/pull/101577) ([Groene AI](https://github.com/groeneai)) 。
* 修复了使用 NaN 参数调用 `intExp10` 时错误消息有误的问题——原本显示为 `intExp2`，而不是 `intExp10`。[#101582](https://github.com/ClickHouse/ClickHouse/pull/101582) ([Krishna Chaitanya](https://github.com/Krishnachaitanyakc)) 。
* 修复了在 [#100288](https://github.com/ClickHouse/ClickHouse/issues/100288) 重构后，`allow_statistics=0` 无法阻止 `ALTER TABLE ADD STATISTICS` 和 `ALTER TABLE DROP STATISTICS` 的问题。[#101585](https://github.com/ClickHouse/ClickHouse/pull/101585) ([Krishna Chaitanya](https://github.com/Krishnachaitanyakc)) 。
* 修复 `KeeperMap` `CREATE TABLE` 在处理 25.1 之前部分 drop 操作遗留的 ZooKeeper 节点时，若缺少 `drop_lock_version` 节点，会因“无法为表创建元数据”而失败的问题。[#101623](https://github.com/ClickHouse/ClickHouse/pull/101623) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了读取 Map 子列时可能出现的逻辑错误。关闭了 [#100769](https://github.com/ClickHouse/ClickHouse/issues/100769)。关闭了 [#101336](https://github.com/ClickHouse/ClickHouse/issues/101336)。[#101641](https://github.com/ClickHouse/ClickHouse/pull/101641) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复 `getSubcolumnData` 中精确子列匹配的优先级，使其高于前缀匹配，以避免可能发生的崩溃。关闭 [#101271](https://github.com/ClickHouse/ClickHouse/issues/101271)。[#101645](https://github.com/ClickHouse/ClickHouse/pull/101645) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在禁用 `use_variant_default_implementation_for_comparisons` 时，将 `LowCardinality` 列与 `Variant` NULL 常量比较时发生的崩溃问题 (LOGICAL\_ERROR: "ColumnUnique 不能包含 null 值") 。[#101690](https://github.com/ClickHouse/ClickHouse/pull/101690) ([Groene AI](https://github.com/groeneai)).
* 内容：为 Bzip2ReadBuffer 增加了空 stream 保护，因此当内部 stream 为空时，将返回 EOF，而不是抛出 UNEXPECTED\_END\_OF\_FILE。 [#101691](https://github.com/ClickHouse/ClickHouse/pull/101691) ([ClickGap AI Bot](https://github.com/clickgapai)) 。
* 内容：修正了 `system.s3_queue_settings` 和 `system.azure_queue_settings` 中 `alterable` 列说明文本前后颠倒的问题——将 `0` 和 `1` 的含义对调，使其与实际代码行为一致。[#101703](https://github.com/ClickHouse/ClickHouse/pull/101703) ([ClickGap AI Bot](https://github.com/clickgapai)) 。
* 修复 positiveModulo(tuple, number) 被错误分派到除法而非取模运算的问题。[#101709](https://github.com/ClickHouse/ClickHouse/pull/101709) ([ClickGap AI Bot](https://github.com/clickgapai)) 。
* 修复了在经缓存封装的 disk 上配置 `thread_pool_size` 时发生的 crash。此前，`FileCacheSettings::loadFromConfig()` 会将 `thread_pool_size` 识别为未知设置，从而导致 server 无法启动。该设置是一个有效的 `IDisk` parameter，用于控制在后台分片 moves 过程中执行 disk 间复制操作时使用的线程数量。[#101712](https://github.com/ClickHouse/ClickHouse/pull/101712) ([Francisco](https://github.com/Milias)).
* 修复了 `RANGE_HASHED` 字典创建时静默接受不存在的 `MAX` 范围属性，以及在最小和最大范围属性类型不一致时使用错误类型配置的问题。该 bug 源于 `buildRangeConfiguration` 中的一处复制粘贴错误：查找最大属性时误用了 `min_attr_name`，而不是 `max_attr_name`。[#101732](https://github.com/ClickHouse/ClickHouse/pull/101732) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复 CPU 租约调度器中的 use-after-free 崩溃：当等待计时器的生命周期长于其引用的 `ProfileEvents::Counters` 所属工作线程时，会触发该问题。[#101761](https://github.com/ClickHouse/ClickHouse/pull/101761) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 arrayLevenshteinDistanceWeighted 和 arraySimilarity 函数中的错误。已关闭 [#101725](https://github.com/ClickHouse/ClickHouse/issues/101725)。[#101767](https://github.com/ClickHouse/ClickHouse/pull/101767) ([Mikhail f. Shiryaev](https://github.com/Felixoid)) 。
* 修复了 Prometheus 查询 API 忽略 POST 表单请求体的问题。[#101794](https://github.com/ClickHouse/ClickHouse/pull/101794) ([James Cunningham](https://github.com/JTCunning)) 。
* 修复因 S3 `Client::~Client` 析构函数中的异常逸出而导致服务器终止的问题。[#101798](https://github.com/ClickHouse/ClickHouse/pull/101798) ([Gagan Dhakrey](https://github.com/gagandhakrey)) 。
* 修复了在并行反序列化 `Object` 类型动态路径时的 use-after-scope 问题；读取包含大量动态路径的表时，该问题可能导致崩溃。 [#101823](https://github.com/ClickHouse/ClickHouse/pull/101823) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了在某些 (非默认) 格式设置下，函数 `formatDateTime` 使用格式说明符 `%W` 时输出错误的问题。[#101847](https://github.com/ClickHouse/ClickHouse/pull/101847) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复了 `SYSTEM INSTRUMENT ADD` 中 `shouldPatchFunction` 的假阴性问题：当搜索字符串首次出现在经反修饰的符号名的模板参数中时，会出现该问题。[#101885](https://github.com/ClickHouse/ClickHouse/pull/101885) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复在周期性刷新期间因 ZooKeeper 会话过期导致 UDF registry 丢失的问题——在完全刷新成功之前，所有用户自定义函数都可能无法使用。[#101891](https://github.com/ClickHouse/ClickHouse/pull/101891) ([Nikita Fomichev](https://github.com/fm4v)).
* 修正了 `system.codecs` 中 `AES_256_GCM_SIV` 的描述，将其显示为 `AES-256` 而非 `AES-128`。[#101917](https://github.com/ClickHouse/ClickHouse/pull/101917) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复了在 JSON 列上创建的 min-max 索引因使用错误极值而导致查询结果错误的问题。关闭 [#101700](https://github.com/ClickHouse/ClickHouse/issues/101700)。[#101918](https://github.com/ClickHouse/ClickHouse/pull/101918) ([Pavel Kruglov](https://github.com/Avogar)).
* `splitByString` 分词器现在会拒绝空字符串分隔符。[#101928](https://github.com/ClickHouse/ClickHouse/pull/101928) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复了 `materialize_skip_indexes_on_merge=false` 在合并期间未能禁止构建文本 (全文) 索引的问题。此前，只有非文本跳过索引 (minmax、set、bloom\_filter) 会被禁止构建；文本索引仍会继续构建，造成 CPU 和 I/O 浪费。[#101932](https://github.com/ClickHouse/ClickHouse/pull/101932) ([Groene AI](https://github.com/groeneai)) 。
* `sparseGrams` 分词器生成的标记长度超过了指定的最大长度 (原因是实现中将 `+2` 硬编码了进去) 。[#101934](https://github.com/ClickHouse/ClickHouse/pull/101934) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 修复 `MergeTreeDataPartWriterWide::cancel` 中的 SIGSEGV：当流构造函数在 `addStreams` 期间抛出异常时，`column_streams` 中会留下一个空条目。[#101936](https://github.com/ClickHouse/ClickHouse/pull/101936) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在启用 `query_plan_direct_read_from_text_index` 时，查询带有全文索引的 Merge 或 Distributed 表且组合过滤条件中同时混用 `has*Tokens` 和 LIKE 时出现的异常。[#101939](https://github.com/ClickHouse/ClickHouse/pull/101939) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 修复了解析原生协议查询数据包时，`QueryProcessingStage` 值无效所导致的未定义行为。[#101972](https://github.com/ClickHouse/ClickHouse/pull/101972) ([Raúl Marín](https://github.com/Algunenano)).
* 当初始查询解析期间发生异常时，会关闭 TCP 连接，以防止从失去同步的流中读取无效数据。[#101989](https://github.com/ClickHouse/ClickHouse/pull/101989) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复 26.1+ 版本中文件系统缓存的 SLRU 竞争问题，该问题可能导致空间预留逻辑错误。在调试构建中，还可能触发断言失败：`'Previous state is Evicting, but expected state to be Active while setting Evicting flag for 2c1e3484ecdc6b78a8978fa5b17c5097:0:339 (state: Evicting)'.`。[#101991](https://github.com/ClickHouse/ClickHouse/pull/101991) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了将带有尾随数据的字符串转换为空 `Tuple()` 类型时触发的异常。 [#102011](https://github.com/ClickHouse/ClickHouse/pull/102011) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在使用 ORDER BY 和 grace\_hash join 算法的查询中，行顺序不正确的问题。受影响的查询可能会以错误顺序返回结果，从而在无任何提示的情况下产生错误输出。[#102036](https://github.com/ClickHouse/ClickHouse/pull/102036) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了一个 LOGICAL ERROR (索引类型大小异常) 问题：配置了 `max_bytes_in_join` 设置时，RIGHT JOIN 和 FULL JOIN 查询中可能会出现该错误。[#102042](https://github.com/ClickHouse/ClickHouse/pull/102042) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复了 `Time` 包含负值时与日期时间比较会返回错误结果的问题。关闭了 [#101670](https://github.com/ClickHouse/ClickHouse/issues/101670)。[#102056](https://github.com/ClickHouse/ClickHouse/pull/102056) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了 UDF refresh 中的崩溃问题：`ZooKeeperRetriesControl` 在未续订已失效 (expired) 的 ZooKeeper 会话时进行了 retry，因而导致崩溃。[#102059](https://github.com/ClickHouse/ClickHouse/pull/102059) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复格式化解锁快照时空格缺失的问题。关闭 [https://github.com/clickhouse/clickhouse/issues/101723。](https://github.com/clickhouse/clickhouse/issues/101723。) [#102063](https://github.com/ClickHouse/ClickHouse/pull/102063) ([Han Fei](https://github.com/hanfei1991)) 。
* 修复查询带有 WHERE 子句的视图时发生的崩溃 (SIGSEGV) 问题：当内部查询生成的列类型与视图元数据不一致时 (例如，启用 `join_use_nulls` 的 LEFT JOIN 产生的 Nullable) ，会触发该问题。[#102085](https://github.com/ClickHouse/ClickHouse/pull/102085) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了因缓存键不匹配，移除分片后 `VectorSimilarityIndexCache` 缓存项始终无法被淘汰的问题。 [#102152](https://github.com/ClickHouse/ClickHouse/pull/102152) ([Seva Potapov](https://github.com/seva-potapov)).
* 使用 rabbitmq 存储时，对损坏消息进行 NACK。 [#102157](https://github.com/ClickHouse/ClickHouse/pull/102157) ([Seva Potapov](https://github.com/seva-potapov)).
* 修复在解析错误的空元组字符串时的逻辑错误。[#102289](https://github.com/ClickHouse/ClickHouse/pull/102289) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在使用 `optimize_aggregation_in_order=1` 时，若 GROUP BY 列的顺序与表的排序键不同，会导致聚合结果错误 (出现重复行) 的问题。[#102299](https://github.com/ClickHouse/ClickHouse/pull/102299) ([Groene AI](https://github.com/groeneai)).
* 修复了在使用 Avro 格式时，`IcebergLocal` `ALTER TABLE ... UPDATE` 发生崩溃的问题，原因是 `LowCardinality`/`Nullable` 包装类型在序列化前未先解包。[#102337](https://github.com/ClickHouse/ClickHouse/pull/102337) ([Desel72](https://github.com/Desel72)).
* 修复了在对不带表达式的 materialized 列执行变更时发生的段错误。关闭了 [#102185](https://github.com/ClickHouse/ClickHouse/issues/102185)。[#102342](https://github.com/ClickHouse/ClickHouse/pull/102342) ([zoomxi](https://github.com/zoomxi)) 。
* 修复了 Coalescing merge tree 对 Array 类型的处理问题。此更改关闭了 [#89509](https://github.com/ClickHouse/ClickHouse/issues/89509)。[#102384](https://github.com/ClickHouse/ClickHouse/pull/102384) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了在启用 bloom filter 下推、且 `WHERE 子句` 包含等值/不等条件时读取 Parquet 文件会触发 segfault (或在调试构建中触发 LOGICAL\_ERROR) 的问题。该崩溃是由 Parquet 预取器拉取 bloom filter 数据时发生越界内存访问导致的，还可能造成非确定性的错误查询结果。[#102385](https://github.com/ClickHouse/ClickHouse/pull/102385) ([Groene AI](https://github.com/groeneai)).
* 修复了 SLRU 文件系统缓存动态调整大小期间发生的 `LOGICAL_ERROR` 异常中止问题；其原因是子队列之间共享了淘汰统计信息，以及对失败候选项采用了错误的恢复路径。[#102396](https://github.com/ClickHouse/ClickHouse/pull/102396) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 Database Replicated 中不带目标表的别名表在新副本上初始化失败的问题。关闭 [#101320](https://github.com/ClickHouse/ClickHouse/issues/101320)。[#102397](https://github.com/ClickHouse/ClickHouse/pull/102397) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了在字符串搜索函数 (`countSubstrings`、`position` 等) 中，搜索由 null byte 完全构成的 needle 时发生的越界读取问题。[#102401](https://github.com/ClickHouse/ClickHouse/pull/102401) ([Raúl Marín](https://github.com/Algunenano)).
* 当 `compatibility` 设置指向早于 26.1 的版本时，全文索引设置 (`enable_full_text_index`、`allow_experimental_full_text_index`、`use_skip_indexes_on_data_read`) 将不再被禁用。此前，这可能会导致 `SharedDatabaseCatalog` 无法创建带有文本索引的表。[#102422](https://github.com/ClickHouse/ClickHouse/pull/102422) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 修复 `printf` 在末尾带有 `%` 时发生的越界读取问题。[#102472](https://github.com/ClickHouse/ClickHouse/pull/102472) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 AsynchronousMetrics 中调试构建里的一个 chassert 异常 `ReadBuffer is canceled`，其原因是 rewind 没有重置缓冲区的取消标志。 [#102524](https://github.com/ClickHouse/ClickHouse/pull/102524) ([Yuri Fedoseev](https://github.com/yurifedoseev)).
* 修复了在带有文本索引的列上，`hasToken` / `hasTokenOrNull` 处理仅由分隔符组成的 needle (例如 `'()'`、`'!!!'`) 时的问题：此前，索引会悄然跳过所有粒度，而不是抛出 `BAD_ARGUMENTS` (对 `hasToken` 而言) 或返回 `NULL` (对 `hasTokenOrNull` 而言) 。[#102544](https://github.com/ClickHouse/ClickHouse/pull/102544) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复 keeper 中超大 multi 请求导致的 OOM。对于 OpenTelemetry tracing，我们此前会在 `ZooKeeperRequest` 对象中无条件为 OpenTelemetry spans 分配 >1 KiB 的空间——这意味着，对于特别大的 multi 请求，可能会额外尝试分配 >10 GiB 的内存。为解决这一问题，我们现在将 shared data 保存在静态内存中，并在 `ZooKeeperOpentelemetrySpans` 中使用 `std::unique_ptr` 替代 `std::optional`。[#102586](https://github.com/ClickHouse/ClickHouse/pull/102586) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了以下问题：对现有 collection 执行 `CREATE NAMED COLLECTION IF NOT EXISTS` 时，会导致 `NamedCollection` 的 CurrentMetric 被错误抬高；此外，从配置或 SQL 存储加载的 collection 在启动时不会被初始化。关闭 [#102507](https://github.com/ClickHouse/ClickHouse/issues/102507)。[#102598](https://github.com/ClickHouse/ClickHouse/pull/102598) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了在并发 DDL 导致本地分片返回空列时，`getStructureOfRemoteTable` 中抛出的异常。[#102604](https://github.com/ClickHouse/ClickHouse/pull/102604) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了多个并发 `CREATE TABLE IF NOT EXISTS` 查询针对同一个 Shared database 上的 `S3Queue` 表时触发的 `LOGICAL_ERROR` 异常。[#102610](https://github.com/ClickHouse/ClickHouse/pull/102610) ([Nikita Taranov](https://github.com/nickitat)).
* 修复了在使用 WHERE 过滤器读取 Nullable 列时，原生 Parquet V3 读取器中出现的 LOGICAL\_ERROR 崩溃问题："列子块中的行数异常"。[#102628](https://github.com/ClickHouse/ClickHouse/pull/102628) ([Groene AI](https://github.com/groeneai)) 。
* 修复了 `AzureWriteMicroseconds` profile 事件描述中将 "write" 误写成 "read" 的问题。[#102639](https://github.com/ClickHouse/ClickHouse/pull/102639) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了在某些特殊情况下 row policy 会触发 'Not found column in block' 异常的问题。[#102648](https://github.com/ClickHouse/ClickHouse/pull/102648) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了 ClusterDiscovery 中的一个服务端异常：当静态集群 (在 config 中定义) 暂时没有存活节点时，会触发该异常。[#102661](https://github.com/ClickHouse/ClickHouse/pull/102661) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了时区调整后发生溢出时日期数据类型推断错误的问题。关闭 [#102601](https://github.com/ClickHouse/ClickHouse/issues/102601)。[#102674](https://github.com/ClickHouse/ClickHouse/pull/102674) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在等待过程中删除可刷新materialized view 时，`SYSTEM WAIT VIEW` 会一直挂起的问题。[#102681](https://github.com/ClickHouse/ClickHouse/pull/102681) ([Nikolay Degterinsky](https://github.com/evillique)).
* 修复了 CASE 搭配 Dynamic 表达式时对所有行都返回 ELSE 的问题。关闭 [#102511](https://github.com/ClickHouse/ClickHouse/issues/102511)。[#102684](https://github.com/ClickHouse/ClickHouse/pull/102684) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了使用二进制编码数据类型时，扁平化 Dynamic 类型的序列化问题。关闭了 [#101911](https://github.com/ClickHouse/ClickHouse/issues/101911)。[#102692](https://github.com/ClickHouse/ClickHouse/pull/102692) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 format\_schema\_source='query' 静默忽略多行结果的问题。关闭 [#101905](https://github.com/ClickHouse/ClickHouse/issues/101905)。[#102698](https://github.com/ClickHouse/ClickHouse/pull/102698) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 通过 SSH 客户端报告实际退出码，而不是将所有错误统一映射为 `1`。关闭 [#101741](https://github.com/ClickHouse/ClickHouse/issues/101741)。[#102700](https://github.com/ClickHouse/ClickHouse/pull/102700) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复动态/预定义查询处理程序中 HTTP 请求头丢失的问题。关闭 [#101846](https://github.com/ClickHouse/ClickHouse/issues/101846)。[#102706](https://github.com/ClickHouse/ClickHouse/pull/102706) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 对折叠后的 jemalloc 堆内存剖析应用泊松采样校正，使其与 jeprof 的输出一致。此前，折叠格式由于未计入采样概率，低估了实际分配大小。[#102759](https://github.com/ClickHouse/ClickHouse/pull/102759) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了函数 `hasPhrase` 在参数为 `NULL` 时发生崩溃的问题。[#102802](https://github.com/ClickHouse/ClickHouse/pull/102802) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了在读取包含循环符号类型引用的递归 schema 的 Avro 文件时 server 发生崩溃 (SIGSEGV) 的问题。现在会检测并拒绝此类 schema，并返回清晰的错误消息，而不是直接崩溃。[#102853](https://github.com/ClickHouse/ClickHouse/pull/102853) ([Groene AI](https://github.com/groeneai)).
* 修复服务器崩溃问题 (`LOGICAL&#95;ERROR` 断言) ：当 `Variant` 列上的函数在 `FunctionVariantAdaptor` 中对结果进行类型转换时触发内存限制或其他非类型转换异常，异常现在会被正确传播，而不再被误归类为内部错误。[#102855](https://github.com/ClickHouse/ClickHouse/pull/102855) ([Groene AI](https://github.com/groeneai)).
* 修复了在调试/sanitizer 构建中，若在 schema 推断期间抛出 `std::length_error` (例如由于 `input_format_msgpack_number_of_columns` 值极端或输入数据格式错误) ，导致服务器崩溃的问题。[#102859](https://github.com/ClickHouse/ClickHouse/pull/102859) ([Groene AI](https://github.com/groeneai)) 。
* 使复制列和稀疏列在序列化时的 null 表示遵循相关设置 (例如 format\_tsv\_null\_representation) 。[#102888](https://github.com/ClickHouse/ClickHouse/pull/102888) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 已在 [#103499](https://github.com/ClickHouse/ClickHouse/issues/103499) 中回移：修复了这样一个问题：由于 Poco `BufferedStreamBuf::flushBuffer` 未处理来自套接字层的短写，导致 S3 请求失败且不会重试，而是报出 `ios_base::clear: unspecified iostream_category error`。[#102894](https://github.com/ClickHouse/ClickHouse/pull/102894) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了这样一个问题：执行轻量级删除后，`minmax_count_projection` 和简单的 `COUNT(*)` 优化会被永久禁用，即使所有带有轻量级删除掩码的 parts 都已合并掉，也不会恢复。[#102900](https://github.com/ClickHouse/ClickHouse/pull/102900) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了因 LTO 导致的 jemalloc 随机崩溃问题。[#102913](https://github.com/ClickHouse/ClickHouse/pull/102913) ([Azat Khuzhin](https://github.com/azat)) 。
* 在新的 analyzer 中，将行策略中的 OR 链优化为 IN。 [#102915](https://github.com/ClickHouse/ClickHouse/pull/102915) ([Azat Khuzhin](https://github.com/azat)).
* 修复了因 page cache 以错误对齐方式释放内存而导致的 jemalloc metadata 损坏问题，该问题可能会引发 crash。[#102918](https://github.com/ClickHouse/ClickHouse/pull/102918) ([Azat Khuzhin](https://github.com/azat)) 。
* 不带 materialized views 的普通 INSERTs 不再会请求过多的 ConcurrencyControl 槽位和线程 (使用 `max_threads` 而不是 `max_insert_threads`) ，从而避免在高 INSERT 吞吐量的集群上出现 CC 槽位饥饿和线程数暴涨。[#102961](https://github.com/ClickHouse/ClickHouse/pull/102961) ([Sema Checherinda](https://github.com/CheSema)) 。
* 重新引入 ArrowMemoryPool，以便在达到内存限制时抛出 MEMORY\_LIMIT\_EXCEEDED，从而避免内核 OOM。 [#102999](https://github.com/ClickHouse/ClickHouse/pull/102999) ([Azat Khuzhin](https://github.com/azat)).
* 修复了将 `CAST` 转换为 `Nullable(DateTime)` 时忽略 `cast_string_to_date_time_mode` 的问题。关闭 [#101840](https://github.com/ClickHouse/ClickHouse/issues/101840)。[#103035](https://github.com/ClickHouse/ClickHouse/pull/103035) ([Pavel Kruglov](https://github.com/Avogar)).
* 文本索引直接读取优化现已支持 `ALIAS` 列。[#103037](https://github.com/ClickHouse/ClickHouse/pull/103037) ([Anton Popov](https://github.com/CurtizJ)) 。
* 已在 [#103454](https://github.com/ClickHouse/ClickHouse/issues/103454) 中回移：修复了以下问题：当聚合投影与查询匹配，且表中的某些 parts 没有投影数据时，`SELECT DISTINCT` 会在无提示的情况下返回不完整的结果 (例如，在已包含数据的表上添加了该投影，但未运行 `MATERIALIZE PROJECTION`) 。关闭 [#102951](https://github.com/ClickHouse/ClickHouse/issues/102951)。[#103052](https://github.com/ClickHouse/ClickHouse/pull/103052) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在 `MergeTree` 表上使用 `WHERE x AND toNullable(N)` 时返回错误结果的问题：当 `N` 是位宽大于 `UInt8` 的整数 (例如 `256`、`65535`、`2147483648` 或任何负整数) 时，就会出现该问题。由于 `splitFilterNodeForAllowedInputs` 在将化简后 `AND` 的 `Nullable` 余项转换为布尔值时错误地使用了 `NULL` 作为零值，导致在三值逻辑下比较结果变为 `NULL`，从而错误地丢弃了所有行。[#103077](https://github.com/ClickHouse/ClickHouse/pull/103077) ([Groene AI](https://github.com/groeneai)).
* 修复了字符串搜索函数 (例如 `locate`、`position`) 在参数顺序颠倒传递时 (`locate(needle, haystack)` 且 `function_locate_has_mysql_compatible_argument_order = 1`) ，在错误消息中报告错误参数类型的问题。[#103102](https://github.com/ClickHouse/ClickHouse/pull/103102) ([Alex Kuleshov](https://github.com/0xAX)).
* 修复了这样一个问题：当 failpoint 处没有线程暂停时调用 disableFailPoint，可能导致 waitForPause 一直挂起。 [#103119](https://github.com/ClickHouse/ClickHouse/pull/103119) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 将预认证 TCP Hello 数据包中的字符串大小限制为 64 KB，并新增 `handshake_timeout_milliseconds` 服务器级设置，用于限制握手总时长，防止未认证客户端占用过多内存或无限期占用线程。[#103284](https://github.com/ClickHouse/ClickHouse/pull/103284) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复 Parquet ColumnIndex 统计信息中 String 列出现 min\_value > max\_value 的问题。[#103334](https://github.com/ClickHouse/ClickHouse/pull/103334) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)) 。
* 检查 Native 格式中格式不正确的扁平化 Dynamic 数据。[#103392](https://github.com/ClickHouse/ClickHouse/pull/103392) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持从 `url` 表函数填充 `_time` 列。[#103437](https://github.com/ClickHouse/ClickHouse/pull/103437) ([Nikita Taranov](https://github.com/nickitat)) 。
* 修复了在 SVE 指令不可用时仍用其进行检测的问题。 [#103568](https://github.com/ClickHouse/ClickHouse/pull/103568) ([Raúl Marín](https://github.com/Algunenano)).

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* Libstemmer (Snowball) 依赖现已升级到较新的 v3.0.1 版本。[#99256](https://github.com/ClickHouse/ClickHouse/pull/99256) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 在 clickhouse-test 中将以下设置随机化：`use_skip_indexes_for_top_k`、`use_top_k_dynamic_filtering`、`query_plan_max_limit_for_top_k_optimization`。[#91782](https://github.com/ClickHouse/ClickHouse/pull/91782) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 为函数实现了压力测试，用于检查其各项属性的健全性。[#93543](https://github.com/ClickHouse/ClickHouse/pull/93543) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 为 `llvm-project` 提供自有的 CMake 配置，而不是导入上游配置。[#97453](https://github.com/ClickHouse/ClickHouse/pull/97453) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 在测试基础设施中对更多 `optimize_*` 设置进行随机化，以提升查询优化各个 pass 的覆盖率。[#97547](https://github.com/ClickHouse/ClickHouse/pull/97547) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使用 Rust 工具链 nightly-2026-03-22。[#98602](https://github.com/ClickHouse/ClickHouse/pull/98602) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 采用 `wasmtime` v42.0.1。[#98603](https://github.com/ClickHouse/ClickHouse/pull/98603) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 改用 `llvm-project` 22.1.1。[#98882](https://github.com/ClickHouse/ClickHouse/pull/98882) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将用于夜间按测试统计覆盖率的 `SANITIZE_COVERAGE` (自定义 sanitizer 回调、符号级粒度) 替换为基于 LLVM 源代码的覆盖率 (`WITH_COVERAGE`, `-fprofile-instr-generate -fcoverage-mapping`) 。现在，server 会在启动时从 ELF 段中读取自身的覆盖率映射，并通过新的 `SYSTEM SET COVERAGE TEST 'name'` 命令为每个测试收集 `(file, line_start, line_end)` 元组。定向 CI check 中的测试选择会针对新的 `checks_coverage_lines` CIDB 表执行行范围查询，并按候选测试覆盖的变更 diff 行数进行排序。[#99513](https://github.com/ClickHouse/ClickHouse/pull/99513) ([Nikita Fomichev](https://github.com/fm4v)).
* 修复了 -O0 构建中的 llvm-libc 链接错误。[#100023](https://github.com/ClickHouse/ClickHouse/pull/100023) ([Zheguang Zhao](https://github.com/zheguang)) 。
* 修复了容器启动时的两条错误消息：当配置中未包含 `logger.log` 和 `logger.errorlog` 设置时 (例如，所有日志消息都应输出到 STDOUT/STDERR 的情况下) 。[#100239](https://github.com/ClickHouse/ClickHouse/pull/100239) ([Simon](https://github.com/simonhammes)) 。
* 在 macOS 构建中，优先使用 `ld64.lld`，而不是 Apple 的 `ld` (cctools-port ld64) 。这应能显著缩短 Darwin 的链接时间，因为 cctools-port 的 ld64 在使用 `-ffunction-sections` 和 `-dead_strip` 时非常慢。如果 `ld64.lld` 不可用，则回退到 `ld`。[#100275](https://github.com/ClickHouse/ClickHouse/pull/100275) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 用于确保目录不会注册任何机密信息的测试 (REST + Glue) 。[#100307](https://github.com/ClickHouse/ClickHouse/pull/100307) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 在不同的随机化设置下重复运行近期修改过的测试。[#100385](https://github.com/ClickHouse/ClickHouse/pull/100385) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 CMake 中跟踪 `#embed` 文件依赖项，并启用 ccache 的 depend 模式，以确保正确重建。[#100411](https://github.com/ClickHouse/ClickHouse/pull/100411) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 TPC-H 查询新增正确性测试。[#100580](https://github.com/ClickHouse/ClickHouse/pull/100580) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 使用 `aws-sdk-cpp` 1.11.771 版本。 [#100582](https://github.com/ClickHouse/ClickHouse/pull/100582) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 允许性能测试 XML 通过 `file` 属性引用外部 SQL 查询文件及设置。[#100747](https://github.com/ClickHouse/ClickHouse/pull/100747) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 通过在 `LowerUpperImpl.h` 中补充缺失的 `TargetSpecific.h` include，修复了使用 `-march=x86-64-v4` 时的编译问题。[#100932](https://github.com/ClickHouse/ClickHouse/pull/100932) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过在 cxxflags 中添加 --no-default-config，修复了 Gentoo 上的构建问题。[#100973](https://github.com/ClickHouse/ClickHouse/pull/100973) ([Isak Ellmer](https://github.com/spinojara)) 。
* 新增 `utils/auto-bisect/`——这是一个基于 shell 的二分定位框架，可下载预构建的 CI 二进制文件，并运行用户提供的测试脚本，以找出首次引入回归的提交，无需在本地 build。 [#100989](https://github.com/ClickHouse/ClickHouse/pull/100989) ([Nikita Fomichev](https://github.com/fm4v)).
* 在 CMake 中默认禁用 ThinLTO，这样开发者的本地构建将不再隐式启用它。CI 的发布构建不受影响，因为它们会显式传递 `-DENABLE_THINLTO=1`。[#101041](https://github.com/ClickHouse/ClickHouse/pull/101041) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在性能测试中新增 TPC-DS SF1 基准测试。[#101209](https://github.com/ClickHouse/ClickHouse/pull/101209) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 新增了针对 MergeTree 轻量级删除的无状态测试，覆盖：`has_lightweight_delete` 标志的生命周期、启用 `optimize_trivial_count_query` 时 `COUNT(*)` 的正确性、`MATERIALIZED`/`DEFAULT` 列的完整性、`ReplicatedMergeTree` 标志的恢复、已删除行场景下的 `read_in_order`、多次删除/合并循环、`_row_exists` 列隐藏、多种谓词，以及 `ALTER DELETE` 的 RBAC 权限控制执行。[#101792](https://github.com/ClickHouse/ClickHouse/pull/101792) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 现在，Distroless Docker 镜像已针对带标签的发行版提供 ubuntu 和 alpine 两种变体。[#101941](https://github.com/ClickHouse/ClickHouse/pull/101941) ([Rahul Nair](https://github.com/motsc)).
* 堆栈跟踪现在会显示干净的纯相对路径 (例如 `src/Common/Exception.cpp`) ，而不再是夹杂构建目录的路径 (例如 `./ci/tmp/fast_build/./src/Common/Exception.cpp`) 。[#102000](https://github.com/ClickHouse/ClickHouse/pull/102000) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增一项 CI 风格检查，禁止将大于 5 MB 的文件提交到仓库，并为现有的合法测试数据设置白名单。移除未使用的 14 MB `zookeeper_log.parquet`。[#102080](https://github.com/ClickHouse/ClickHouse/pull/102080) ([Raúl Marín](https://github.com/Algunenano)) 。
* 从头文件中移除约 400 条未使用的 `#include` 指令，以缩短编译耗时。[#102585](https://github.com/ClickHouse/ClickHouse/pull/102585) ([Raúl Marín](https://github.com/Algunenano)) 。
* 使用 `wasmtime` v43.0.1。 [#102603](https://github.com/ClickHouse/ClickHouse/pull/102603) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `openssl` 3.5.6。[#102606](https://github.com/ClickHouse/ClickHouse/pull/102606) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `xz` 5.8.3。 [#102607](https://github.com/ClickHouse/ClickHouse/pull/102607) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 distroless Docker 镜像的基础从 Debian 12 (glibc 2.36、OpenSSL 3.0) 升级到 Debian 13 (glibc 2.41、OpenSSL 3.5) ，将 CVE 暴露面缩减至零可达漏洞。[#101678](https://github.com/ClickHouse/ClickHouse/pull/101678) ([Rahul Nair](https://github.com/motsc)) 。

<div id="263">
  ### ClickHouse 26.3 LTS 发布，2026-03-26。 [演示文稿](https://presentations.clickhouse.com/)，[视频](https://www.youtube.com/watch?v=_bY0ucNB1lQ)
</div>

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

* 升级后再降级可能会导致数据丢失。数据类型的序列化版本现在会传播到嵌套数据类型中。例如，String 序列化版本 `with_size_stream` 以前仅应用于顶层 String 列和 Tuple 元素；现在它会应用于任意嵌套类型中的任何 String 类型，例如 `Array`/`Map`/`Variant`/`JSON`/等。此行为由 MergeTree setting `propagate_types_serialization_versions_to_nested_types` 控制，该设置现已默认启用。此变更后，新创建的数据分区片段将无法被旧版本读取，但旧的数据分区片段可以在新版本中正常读取。**升级是安全的，但降级不是——如果你在升级到 26.3 后需要回滚，26.3 在包含嵌套类型的列中写入的数据将无法读取！** 详情参见 [#101429](https://github.com/ClickHouse/ClickHouse/issues/101429)。[#94859](https://github.com/ClickHouse/ClickHouse/pull/94859) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 移除 `hypothesis` 跳过索引类型。它是一个较为冷门的 Experimental 功能，实际用途有限。现在，使用 `INDEX ... TYPE hypothesis` 创建表会报错。[#96874](https://github.com/ClickHouse/ClickHouse/pull/96874) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 移除实验性的 `detectProgrammingLanguage` 函数。[#99567](https://github.com/ClickHouse/ClickHouse/pull/99567) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `NOT` 运算符的优先级，使其符合 SQL 标准：`NOT` 现在的结合优先级低于 `IS NULL`、`BETWEEN`、`LIKE` 和算术运算符。例如，`NOT (x) IS NULL` 现在会被解析为 `NOT (x IS NULL)`，而不是 `(NOT x) IS NULL`。这可能会改变依赖此前 (非标准) 行为的查询结果。[#97680](https://github.com/ClickHouse/ClickHouse/pull/97680) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了普通投影的元数据，以便正确识别具有多列排序键的投影。基于 [#90429](https://github.com/ClickHouse/ClickHouse/issues/90429)。[#91352](https://github.com/ClickHouse/ClickHouse/pull/91352) ([Amos Bird](https://github.com/amosbird)) 。
* 修复了跳过索引文件未遵循 replace\_long\_file\_name\_to\_hash 设置的问题；该问题会导致出现“File name too long”错误，并使长名称索引无法正常读取。现在，当跳过索引文件名超过 max\_file\_name\_length 时，会像列文件一样对文件名进行哈希处理。此更改向后兼容 (新服务器可以读取旧 parts) ，但降级 (或在滚动升级期间使用旧服务器) 时，长名称索引可能会被忽略。[#97128](https://github.com/ClickHouse/ClickHouse/pull/97128) ([Raúl Marín](https://github.com/Algunenano)).
* 默认启用异步插入。ClickHouse 现在默认会将所有小型插入按批次处理。此设置在 compatibility 中配置。如果你设置 `compatibility=<version less than 26.2>`，则默认值会恢复为之前的 `false`。你可以在多个级别关闭/开启异步插入：在 users profiles 的 config 中、在 session 级别、在查询级别，或在 MergeTree 表级别。[#97590](https://github.com/ClickHouse/ClickHouse/pull/97590) ([Sema Checherinda](https://github.com/CheSema)).
* 将 `mysql_datatypes_support_level` 的默认值从空改为 `decimal,datetime64,date2Date32`，默认启用将 MySQL `DATE` 正确映射为 `Date32`、将 `DECIMAL`/`NUMERIC` 映射为 `Decimal`，以及将带精度的 `DATETIME`/`TIMESTAMP` 映射为 `DateTime64`。此前，MySQL `DATE` 列会映射为 `Date`，而 `Date` 无法表示 1970-01-01 之前的日期，从而导致数据损坏。[#97716](https://github.com/ClickHouse/ClickHouse/pull/97716) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `mergeTreeAnalyzeIndexes{,UUID}` 现已接受分片名称数组而非 regexp，因为 regexp 较慢 (*Experimental 功能*) 。[#98474](https://github.com/ClickHouse/ClickHouse/pull/98474) ([Azat Khuzhin](https://github.com/azat)) 。
* 将可执行 UDF 的默认 `stderr_reaction` 从 `throw` 调整为 `log_last`。对于向 stderr 写入警告的 UDF，只要退出码为 0，就不再报错。现在，退出码异常中会包含 stderr 的内容。[#99232](https://github.com/ClickHouse/ClickHouse/pull/99232) ([Xu Jia](https://github.com/XuJia0210)) 。

<div id="267-new-feature">
  #### 新特性
</div>

* 为 MergeTree 中的 Map 列新增了分桶序列化 (`map_serialization_version = 'with_buckets'`) 。键会按基于哈希的桶拆分，因此读取单个键 (`m['key']`) 时只需读取一个桶，而不必读取整个列；根据 Map 的大小不同，单键查找可获得 2-49 倍的加速。桶的数量以及分桶策略可通过新的 MergeTree 设置进行控制：`map_serialization_version`、`max_buckets_in_map`、`map_buckets_strategy`、`map_buckets_coefficient` 和 `map_buckets_min_avg_size`。[#99200](https://github.com/ClickHouse/ClickHouse/pull/99200) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 支持 materialized CTE。允许在查询执行期间仅计算一次 CTE，并将结果存储在临时表中。关闭了 [#53449](https://github.com/ClickHouse/ClickHouse/issues/53449)。[#94849](https://github.com/ClickHouse/ClickHouse/pull/94849) ([Dmitry Novik](https://github.com/novikd)) 。
* 出于兼容性考虑，允许某些符合 SQL 标准的函数省略括号使用，例如 `NOW`。关闭 [#52102](https://github.com/ClickHouse/ClickHouse/issues/52102)。[#95949](https://github.com/ClickHouse/ClickHouse/pull/95949) ([Aly Kafoury](https://github.com/AlyHKafoury)) 。
* 现在可以将自然排序键函数用作 `naturalSortKey(s)`。[#90322](https://github.com/ClickHouse/ClickHouse/pull/90322) ([Nazarii Piontko](https://github.com/nazarii-piontko)) 。
* 现在，JSONExtract 函数已支持使用原生 JSON/Object 作为输入。修复了 [#88370](https://github.com/ClickHouse/ClickHouse/issues/88370)。[#96711](https://github.com/ClickHouse/ClickHouse/pull/96711) ([Fisnik Kastrati](https://github.com/fkastrati)) 。
* 如果某个查询参数的类型为 `Nullable`，且未指定该参数，我们将假定其值为 `NULL`。[#93869](https://github.com/ClickHouse/ClickHouse/pull/93869) ([Vikash Kumar](https://github.com/vikashkumar2020)) 。
* 支持 `Replicated` database 使用辅助 ZooKeeper。 [#95590](https://github.com/ClickHouse/ClickHouse/pull/95590) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 支持对 JSON 类型使用 `has` 函数来检查路径是否存在，类似于 Map。[#96927](https://github.com/ClickHouse/ClickHouse/pull/96927) ([DQ](https://github.com/il9ue)).
* 新增了 `mergeTreeTextIndex(database, table, index)` 表函数，支持直接从文本索引中读取数据。该函数可用于查看内部信息，或基于文本索引数据执行聚合。[#97003](https://github.com/ClickHouse/ClickHouse/pull/97003) ([Anton Popov](https://github.com/CurtizJ)).
* 新增 `table_readonly` MergeTree setting，用于将表标记为只读，防止插入和修改。[#97652](https://github.com/ClickHouse/ClickHouse/pull/97652) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增设置 `use_partition_pruning` 及其别名 `use_partition_key`。将其设为 `false` 可禁用基于分区键的分区裁剪。[#97888](https://github.com/ClickHouse/ClickHouse/pull/97888) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 支持对 Iceberg 表执行 `ALTER TABLE ... EXECUTE expire_snapshots('<timestamp>')`。 [#97904](https://github.com/ClickHouse/ClickHouse/pull/97904) ([murphy-4o](https://github.com/murphy-4o))。 [#99130](https://github.com/ClickHouse/ClickHouse/pull/99130)
* 允许 `<protocols>` 中的每个 `type=http` 条目指定一个自定义 `<handlers>` 键，使其指向单独的 `<http_handlers_*>` config 部分，从而可为每个端口启用不同的 HTTP 路由规则。[#98414](https://github.com/ClickHouse/ClickHouse/pull/98414) ([Amos Bird](https://github.com/amosbird)) 。
* 为 `EXPLAIN` 新增 `pretty=1` 选项，以生成树状缩进输出；并新增 `compact=1`，用于折叠 `Expression` 步骤，使查询计划更易读。[#98500](https://github.com/ClickHouse/ClickHouse/pull/98500) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* 新增 `restore_access_entities_with_current_grants` 服务器设置。启用后，从 backups 中恢复的用户/roles，其授权将限制在执行 restoring 的用户有权授予的范围内 (与 `GRANT CURRENT GRANTS` 的语义相同) ，而不会因 `ACCESS_DENIED` 失败。[#98795](https://github.com/ClickHouse/ClickHouse/pull/98795) ([pufit](https://github.com/pufit)).
* 新增 `caseFoldUTF8` 和 `removeDiacriticsUTF8` 函数，用于 Unicode 大小写折叠和去除变音符号。[#98973](https://github.com/ClickHouse/ClickHouse/pull/98973) ([George Larionov](https://github.com/george-larionov)).
* 新增 `normalizeUTF8NFKCCasefold` 字符串函数，用于执行 NFKC\_Casefold Unicode 规范化，即将 NFKC 规范化与大小写折叠结合起来。[#99276](https://github.com/ClickHouse/ClickHouse/pull/99276) ([George Larionov](https://github.com/george-larionov)) 。
* 为全文索引和 `tokens` 函数新增 `unicode_word` 分词器。它依据 Unicode 单词边界规则拆分文本：ASCII 单词可包含连接符字符 (下划线、冒号、点、单引号) ，而非 ASCII 的 Unicode 字符则会被拆分为单字符标记。注意：26.3 仅接受名为 `unicode_word` 的此分词器；在 26.4 中它被重命名为 `asciiCJK`。[#99357](https://github.com/ClickHouse/ClickHouse/pull/99357) ([Amos Bird](https://github.com/amosbird)) 。
* 新增了 `max_skip_unavailable_shards_num` 和 `max_skip_unavailable_shards_ratio` 设置，用于限制在启用 `skip_unavailable_shards` 时可静默跳过的分片数。如果不可用分片的数量或占比超过配置的阈值，则会抛出异常，而不是静默返回不完整的结果。[#99369](https://github.com/ClickHouse/ClickHouse/pull/99369) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 用户现在可以在子查询表达式中使用 `SOME` 关键字，其行为与 `ANY` 完全一致。[#99842](https://github.com/ClickHouse/ClickHouse/pull/99842) ([Artem Kytkin](https://github.com/Vinceent)).
* 新增 `output_format_trim_fixed_string` 设置，用于在文本输出格式中去除 `FixedString` 值末尾的 null 字节。[#97558](https://github.com/ClickHouse/ClickHouse/pull/97558) ([NeedmeFordev](https://github.com/spider-yamet)).
* 支持在 FROM 子句中使用带括号的表 JOIN 表达式，例如 `SELECT * FROM (t1 CROSS JOIN t2)`。[#97650](https://github.com/ClickHouse/ClickHouse/pull/97650) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 实现函数 `toDaysInMonth`：返回指定日期所在月份的天数。[#99227](https://github.com/ClickHouse/ClickHouse/pull/99227) ([Vitaly Baranov](https://github.com/vitlibar)) 。

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

* 新增对基于 WebAssembly 的用户自定义函数 (UDF) 的实验性支持，允许使用 WebAssembly 实现自定义函数逻辑，并在 ClickHouse 内执行。特别感谢 [Alexey Smirnov](https://github.com/lioshik) 贡献了 Wasmtime 后端支持。[#88747](https://github.com/ClickHouse/ClickHouse/pull/88747) ([Vladimir Cherkasov](https://github.com/vdimir)) 。另外，WASM UDF 支持也得到了持续改进。[#99373](https://github.com/ClickHouse/ClickHouse/pull/99373) ([Vasily Chekalkin](https://github.com/bacek)) 。
* 新增通过 `polyglot` 库支持外部 SQL 方言的功能。[#99496](https://github.com/ClickHouse/ClickHouse/pull/99496) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增 `ALP` 浮点压缩编解码器 (对于不可压缩的 double，不带 ALP\_rd 回退机制) 。[#91362](https://github.com/ClickHouse/ClickHouse/pull/91362) ([Nazarii Piontko](https://github.com/nazarii-piontko)) 。
* 为 `JSON` 列新增实验性的惰性类型提示。通过 `allow_experimental_json_lazy_type_hints` 启用后，`ALTER TABLE ... MODIFY COLUMN json JSON(path TypeName)` 这类仅添加或修改类型提示的操作会立即完成，作为仅元数据操作执行，无需重写历史数据。对于旧 parts，类型提示会在查询时应用；在 INSERT 和后台 merges 期间则会被 materialized。[#97412](https://github.com/ClickHouse/ClickHouse/pull/97412) ([tanner-bruce](https://github.com/tanner-bruce)) 。
* 启用从 YTsaurus table engine 进行并行读取。[#97343](https://github.com/ClickHouse/ClickHouse/pull/97343) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。

<div id="267-performance-improvement">
  #### 性能提升
</div>

* 提升数据湖性能。在早期版本中，从对象存储读取数据时，管道不会按处理线程数进行扩缩。这在多核机器上带来了数量级的性能提升 (约 40 倍) 。[#99548](https://github.com/ClickHouse/ClickHouse/pull/99548) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在，`enable_parallel_replicas` 与 `automatic_parallel_replicas_mode` 之间的关系如下：只有当 `enable_parallel_replicas > 0` 时，查询才能使用并行副本。此外，如果 `automatic_parallel_replicas_mode=1`，则是否使用并行副本会在规划阶段根据之前收集的统计信息来决定。如果 `automatic_parallel_replicas_mode=0`，则所有受支持的查询都会使用并行副本，而不受任何统计信息影响。一个值得注意的例外是使用并行副本的 distributed insert-select：在这种情况下，查询始终会按 `automatic_parallel_replicas_mode=0` 的方式执行。[#97517](https://github.com/ClickHouse/ClickHouse/pull/97517) ([Nikita Taranov](https://github.com/nickitat)).
* 当谓词中包含任意比较运算符 (`=`, `<`, `>`, `!=`) ，且分区键外层套有确定性函数链时，可进行分区剪枝 (例如，`PARTITION BY x`，以及 `cityHash64(x) % 5 > 2`、`toYYYYMM(x) < 2026`、`toYYYYMM(x) = 2026` 或 `toYYYYMM(x) != 2026` 这样的谓词，都会利用分区键进行剪枝) 。关闭 [#28800](https://github.com/ClickHouse/ClickHouse/issues/28800)。[#98432](https://github.com/ClickHouse/ClickHouse/pull/98432) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 当 `CAST` 的目标类型为 `Nullable` 且转换具有单调性时，可启用按序读取优化和主键剪枝；例如，在 `PRIMARY KEY x` 的情况下，ClickHouse 可对 `ORDER BY x::Nullable(UInt64)` 使用按序读取优化，并对 `WHERE x::Nullable(UInt64) > 500000` 这类谓词应用主键剪枝。[#98482](https://github.com/ClickHouse/ClickHouse/pull/98482) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 当整型列与浮点数字面量比较时，现在支持索引裁剪和过滤器下推；例如，`WHERE x < 10.5` 这类谓词现在可以利用主键进行裁剪，而 `prime < 1e9` 或 `number < 1e5` 这类过滤器现在也可下推到 `primes()` 和 `numbers()` 表函数，而不再导致无界执行。关闭 [#85167](https://github.com/ClickHouse/ClickHouse/issues/85167)。[#98516](https://github.com/ClickHouse/ClickHouse/pull/98516) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 新增了一个用于 Parquet 元数据的 SLRU 缓存，无需仅为读取元数据而重新下载文件，从而提升了读取性能。[#98140](https://github.com/ClickHouse/ClickHouse/pull/98140) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* 支持根据优化器统计信息交换 ANTI、SEMI 和 FULL join 的左右两侧。[#97498](https://github.com/ClickHouse/ClickHouse/pull/97498) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 优化大型多边形场景下 `pointInPolygon` 的粒度跳过，并修复 `pointInPolygon` 索引分析在主键剪枝期间抛出异常的问题。[#91633](https://github.com/ClickHouse/ClickHouse/pull/91633) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 优化 `levenshteinDistance` 函数的性能。[#94543](https://github.com/ClickHouse/ClickHouse/pull/94543) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 通过避免对每个元素单独调用函数，优化批次 Decimal 类型转换。 [#95923](https://github.com/ClickHouse/ClickHouse/pull/95923) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Iceberg 表现已支持通过 `iceberg_metadata_async_prefetch_period_ms` 表设置异步预取元数据，该设置会定期预填充元数据缓存。此外，`iceberg_metadata_staleness_ms` 查询设置允许 SELECT 查询在缓存元数据的新鲜度高于指定 staleness 时直接使用缓存，从而避免在请求处理期间调用 Iceberg catalog。[#96191](https://github.com/ClickHouse/ClickHouse/pull/96191) ([Arsen Muk](https://github.com/arsenmuk)).
* `S3Queue` ordered 模式使用 S3 ListObjectsV2 StartAfter，以避免重新列出此前前缀下的全部历史对象，从而减少 ListObjects 调用。[#96370](https://github.com/ClickHouse/ClickHouse/pull/96370) ([Venkata  Vineel ](https://github.com/vyalamar)).
* 降低插入去重的内存占用。通常，去重需要保留原始块，但对于同步插入，可以省略它，从而真正节省内存。[#96661](https://github.com/ClickHouse/ClickHouse/pull/96661) ([Sema Checherinda](https://github.com/CheSema)) 。
* 缓存行大小改为使用与架构相关的值，而不是硬编码为 64。[#97357](https://github.com/ClickHouse/ClickHouse/pull/97357) ([Nikita Taranov](https://github.com/nickitat)) 。
* 对文本索引字典的读取进行了小幅优化，提升了文本索引分析的整体性能。[#97519](https://github.com/ClickHouse/ClickHouse/pull/97519) ([Anton Popov](https://github.com/CurtizJ)).
* 提升 ARM 上 16 字节块的 `LZ4` 解压缩速度。[#97774](https://github.com/ClickHouse/ClickHouse/pull/97774) ([Raúl Marín](https://github.com/Algunenano)) 。
* 将分词重构为新的高性能接口，以替换旧的迭代器风格 API，从而支持 SIMD 和有状态分词器。属于 [#90268](https://github.com/ClickHouse/ClickHouse/issues/90268) 的一部分。[#97871](https://github.com/ClickHouse/ClickHouse/pull/97871) ([Amos Bird](https://github.com/amosbird)) 。
* 改进了对同时包含已建立文本索引列和未建立索引列的组合条件查询进行文本索引分析时的性能。此前，在这种情况下，索引分析过程中的提前退出优化会被错误地禁用。[#98096](https://github.com/ClickHouse/ClickHouse/pull/98096) ([Anton Popov](https://github.com/CurtizJ)).
* 提升包含会生成超长数组或 Map 的常量表达式的查询性能。[#98287](https://github.com/ClickHouse/ClickHouse/pull/98287) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `DateTime64` 主键与整数常量比较时的键条件分析问题；此前会导致无法进行粒度剪枝。[#98410](https://github.com/ClickHouse/ClickHouse/pull/98410) ([Amos Bird](https://github.com/amosbird)).
* 设置 `optimize_syntax_fuse_functions` 默认处于启用状态。[#98424](https://github.com/ClickHouse/ClickHouse/pull/98424) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 通过使用本地累加器，而不是按行经由聚合状态进行存储转发，优化了 `avgWeighted` 聚合函数，对 Nullable 输入的性能最高可提升 27%。[#98793](https://github.com/ClickHouse/ClickHouse/pull/98793) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 在某些场景下，可提升并行窗口函数的性能并降低内存占用；对于含大型数组的 `arrayFold` 工作负载也是如此。这还可以减轻缺页压力，并在内存限制较严时提高受影响查询的稳定性。[#98892](https://github.com/ClickHouse/ClickHouse/pull/98892) ([filimonov](https://github.com/filimonov)).
* 优化有序合并性能。[#99013](https://github.com/ClickHouse/ClickHouse/pull/99013) ([Artem Zuikov](https://github.com/4ertus2)) 。
* 优化了 `INTERSECT ALL` 和 `EXCEPT ALL`。[#99097](https://github.com/ClickHouse/ClickHouse/pull/99097) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 支持在逆序读取时使用 `read_in_order_use_virtual_row` 优化。[#99198](https://github.com/ClickHouse/ClickHouse/pull/99198) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 通过在写入前检查 JoinUsedFlags 是否已设置，减少 `RIGHT` 和 `FULL` JOIN 中的缓存争用。[#99274](https://github.com/ClickHouse/ClickHouse/pull/99274) ([Hechem Selmi](https://github.com/m-selmi)).
* 通过将浮点运算替换为纯整数运算，优化 `PrefetchingHelper::calcPrefetchLookAhead`，从而优化指令缓存布局，并减少聚合循环中的 CPU 周期开销。[#99327](https://github.com/ClickHouse/ClickHouse/pull/99327) ([Riyane El Qoqui](https://github.com/riyaneel)) 。
* 通过将用于存储节点子节点的 `absl::flat_hash_set` 替换为 `CompactChildrenSet`，降低了 Keeper 的内存占用。新容器可将 0–1 个子节点以内联方式存储，无需堆分配，这覆盖了绝大多数 Keeper 节点。这样可将 `KeeperMemNode` 的大小从 144 字节缩减到 128 字节。[#99860](https://github.com/ClickHouse/ClickHouse/pull/99860) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 现已在视图中正确支持聚合投影。修复了 [#32753](https://github.com/ClickHouse/ClickHouse/issues/32753)。[#88798](https://github.com/ClickHouse/ClickHouse/pull/88798) ([Amos Bird](https://github.com/amosbird)) 。
* 支持在使用 `join_use_nulls` 时将 OUTER JOIN 转换为 INNER JOIN 的优化。关闭 [#90978](https://github.com/ClickHouse/ClickHouse/issues/90978)。[#95968](https://github.com/ClickHouse/ClickHouse/pull/95968) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 通过在读取前正确计算大小，优化了子列读取。这减少了内存占用，并加快了子列读取速度。[#96251](https://github.com/ClickHouse/ClickHouse/pull/96251) ([Pavel Kruglov](https://github.com/Avogar)).
* 让标记缓存、未压缩缓存和页缓存使用各自独立的 jemalloc arena，以避免将短生命周期的内存分配 (即查询和请求的内存分配) 与缓存的长生命周期内存分配混用时产生内存碎片。 [#96812](https://github.com/ClickHouse/ClickHouse/pull/96812) ([Seva Potapov](https://github.com/seva-potapov)). [#98812](https://github.com/ClickHouse/ClickHouse/pull/98812). [#99021](https://github.com/ClickHouse/ClickHouse/pull/99021)
* 带有 `DELETE TTL` 规则的表现在也可以使用纵向合并算法。[#97332](https://github.com/ClickHouse/ClickHouse/pull/97332) ([murphy-4o](https://github.com/murphy-4o)).
* 在分布式索引分析中应用数据跳过索引。[#97767](https://github.com/ClickHouse/ClickHouse/pull/97767) ([Azat Khuzhin](https://github.com/azat)) 。
* 启用 `prewarm_mark_cache` 设置后，次级索引的标记现会被预热 (即在拉取数据分区片段期间以及表启动时加载到索引标记缓存中) 。[#97772](https://github.com/ClickHouse/ClickHouse/pull/97772) ([Anton Popov](https://github.com/CurtizJ)).
* 降低了访问控制期间的锁争用。[#97894](https://github.com/ClickHouse/ClickHouse/pull/97894) ([Nikita Taranov](https://github.com/nickitat)) 。
* 当 apply\_row\_policy\_after\_final 或 apply\_prewhere\_after\_final 处于启用状态时，行策略和 PREWHERE 中的复合 AND 条件现在会被拆解，以提取其中的排序键原子条件，用于主键索引分析。此前，如果延后应用的过滤条件同时包含排序键谓词和非排序键谓词 (例如 x > 1 AND y != 'foo') ，整个表达式都会被排除在索引分析之外。现在，即使在嵌套的 AND 表达式中，也可以提取排序键原子条件 (如 x > 1) 并将其用于粒度剪枝。[#98513](https://github.com/ClickHouse/ClickHouse/pull/98513) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 通过让任务资源在无需获取锁的情况下释放，减少 MergeTreeBackgroundExecutor 中的锁竞争。关闭 [#93620](https://github.com/ClickHouse/ClickHouse/issues/93620)。[#98604](https://github.com/ClickHouse/ClickHouse/pull/98604) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在读取非 Arrow 数据时进行 format 自动检测期间内存占用过高 (约 514 MiB) 的问题 (例如来自 `url` 或 `file` 且未显式指定 format 的 JSON) ；原因是 ArrowStream 读取器将起始字节误识别为一个巨大的 metadata 长度。[#98893](https://github.com/ClickHouse/ClickHouse/pull/98893) ([Konstantin Bogdanov](https://github.com/thevar1able)).

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

* 支持解析在同一列中包含不同 Geo 类型的 GeoParquet 文件。[#97851](https://github.com/ClickHouse/ClickHouse/pull/97851) ([Mark Needham](https://github.com/mneedham)).
* 引入 `tokensForLikePattern` SQL 函数，用于对 LIKE 模式进行标记拆分，同时遵循通配符语义：`%` 和 `_` 视为通配符，转义后的通配符 (`\%`、`\_`) 视为字面量，与未转义通配符相邻的标记会被丢弃。[#97872](https://github.com/ClickHouse/ClickHouse/pull/97872) ([Amos Bird](https://github.com/amosbird)) 。
* 为 S3 表引擎新增 `{_schema_hash}` 占位符，用于将表列定义的哈希值插入到 S3 路径中。[#98265](https://github.com/ClickHouse/ClickHouse/pull/98265) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* `SymbolIndex`、`addressToSymbol`、`system.symbols` 和 `buildId` 现已可在 macOS 上通过解析 Mach-O 符号表使用。[#99014](https://github.com/ClickHouse/ClickHouse/pull/99014) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在，`system.stack_trace` 表已支持 macOS，可用于查看所有 server 线程的堆栈跟踪内部信息。[#98982](https://github.com/ClickHouse/ClickHouse/pull/98982) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增每服务器级别的 LDAP 配置选项 `<follow_referrals>` (默认值为 `false`) ，用于控制 LDAP 客户端是否跟随转介。禁用转介跟随可避免从 Active Directory 域根 base DN 开始搜索时出现超时和挂起。与转介相关的日志消息已从 `warn` 调整为 `trace`。[#96765](https://github.com/ClickHouse/ClickHouse/pull/96765) ([paf91](https://github.com/paf91)) 。
* 我们现在会在 query\_log 表新增的 `skip_indices` 列中，记录查询执行期间使用的所有数据跳过索引。修复了 [#78676](https://github.com/ClickHouse/ClickHouse/issues/78676)。原始作者为 @pheepa。[#87862](https://github.com/ClickHouse/ClickHouse/pull/87862) ([Grant Holly](https://github.com/grantholly-clickhouse))。
* 除非用户有权查看所有必需的列，否则 `ACCESS&#95;DENIED` 提示将不再暴露列名；数据库/表名在提示中仍然可见。[#91067](https://github.com/ClickHouse/ClickHouse/pull/91067) ([filimonov](https://github.com/filimonov)).
* 为 MergeTree 增加一个专用清理线程，避免在高 merge 负载下出现清理延迟。此更改修复了 [#86181](https://github.com/ClickHouse/ClickHouse/issues/86181)。[#91574](https://github.com/ClickHouse/ClickHouse/pull/91574) ([Amos Bird](https://github.com/amosbird)) 。
* 仅当本地服务器主机名对应的 IP 发生变化时，才重新加载集群配置，而不是在任意主机的 IP 发生变化时都重新加载。修复了 [#81215](https://github.com/ClickHouse/ClickHouse/issues/81215)、[#70156](https://github.com/ClickHouse/ClickHouse/issues/70156) 和 [#65268](https://github.com/ClickHouse/ClickHouse/issues/65268)。[#93726](https://github.com/ClickHouse/ClickHouse/pull/93726) ([Zhigao Hong](https://github.com/zghong)) 。
* 允许 optimize\_aggregators\_of\_group\_by\_keys 在 GROUPING SETS 查询中正确地优化聚合函数。[#93935](https://github.com/ClickHouse/ClickHouse/pull/93935) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* Keeper-bench：在指标中报告错误，并为 --input-request-log 模式生成 JSON 指标文件。[#95748](https://github.com/ClickHouse/ClickHouse/pull/95748) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* 为 CREATE USER 新增 ROLE 子句。[#97074](https://github.com/ClickHouse/ClickHouse/pull/97074) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 现在，您可以为由 Replicated database 创建的集群设置 internal\_replication 参数。[#97228](https://github.com/ClickHouse/ClickHouse/pull/97228) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)) 。
* 新设置 `allow_nullable_tuple_in_extracted_subcolumns` 用于控制从 `Tuple`、`Variant`、`Dynamic` 和 `JSON` 中提取的 `Tuple(...)` 子列返回为 `Nullable(Tuple(...))` (缺失行返回 `NULL`) ，还是返回为 `Tuple(...)` (缺失行返回默认的 Tuple 值) 。该设置默认禁用，并且只能通过重启服务器进行更改。[#97299](https://github.com/ClickHouse/ClickHouse/pull/97299) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 在 EXPLAIN 查询输出中，将延迟过滤器的信息单独列出 (在配合行策略/PREWHERE 使用 FINAL 时) 。相关内容：[#91065](https://github.com/ClickHouse/ClickHouse/pull/91065)。[#97374](https://github.com/ClickHouse/ClickHouse/pull/97374) ([Yarik Briukhovetskyi](https://github.com/yariks5s))。
* 默认启用 `type_json_allow_duplicated_key_with_literal_and_nested_object`。这样可以避免在解析诸如 `{"a" : 42, "a" : {"b" : 42}}` 这类 JSON 时因重复键而报错；这类 JSON 可由 ClickHouse 根据原始 JSON 数据 `{"a" : 42, "a.b" : 42}` 格式化生成。[#97423](https://github.com/ClickHouse/ClickHouse/pull/97423) ([Pavel Kruglov](https://github.com/Avogar)) 。
* Keeper 改进：`find_super_nodes` 是一个非常有用的命令，可用于调试 Keeper 中节点数量异常增长的问题。遗憾的是，如果存在多个超级节点，几乎不可能找出一个以上，因为该命令在遍历遇到的第一个超级节点的子节点时会一直卡住。此 PR 禁止遍历超级节点的子节点。[#97819](https://github.com/ClickHouse/ClickHouse/pull/97819) ([pufit](https://github.com/pufit)).
* 为 `clickhouse-keeper-client` 提供初始补全支持。[#97828](https://github.com/ClickHouse/ClickHouse/pull/97828) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 在发生崩溃时，刷新异步日志缓冲区。 [#97836](https://github.com/ClickHouse/ClickHouse/pull/97836) ([Azat Khuzhin](https://github.com/azat)).
* 默认启用 impersonate 特性 (参见 [EXECUTE AS target\_user](https://clickhouse.com/docs/sql-reference/statements/execute_as)) 。[#97870](https://github.com/ClickHouse/ClickHouse/pull/97870) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 改进了在 clickhouse-client 中使用 KILL QUERY 和取消查询 (Ctrl+C) 来取消 SQLite 表引擎查询的功能。[#97944](https://github.com/ClickHouse/ClickHouse/pull/97944) ([Roman Vasin](https://github.com/rvasin)) 。
* 新增服务器级设置 `jemalloc_profiler_sampling_rate`，用于控制 jemalloc 的 `lg_prof_sample`，并将其作为异步指标 `jemalloc.prof.lg_sample` 对外暴露。[#97945](https://github.com/ClickHouse/ClickHouse/pull/97945) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 为并发有界队列实现增加权重支持。[#97962](https://github.com/ClickHouse/ClickHouse/pull/97962) ([Daniil Ivanik](https://github.com/divanik)) 。
* 将 sslmode 添加到 PostgreSQL 字典源的允许键中。此前，sslmode 不在 PostgreSQLDictionarySource.cpp 的 dictionary\_allowed\_keys 允许列表内，因此无法为 PostgreSQL 字典连接配置 SSL 模式。这导致字典无法连接到要求使用 SSL 的 PostgreSQL 服务器 (例如默认强制启用 SSL 的 AWS RDS) ，因为连接会在 TLS 协商阶段失败，而服务器会拒绝未加密的回退连接。[#98014](https://github.com/ClickHouse/ClickHouse/pull/98014) ([mcalfin](https://github.com/mcalfin)).
* 向 `clickhouse` 或 `clickhouse-local` 传入不存在的文件路径时，显示清晰的 "no such file" 错误，而不是令人困惑的通用消息。[#98048](https://github.com/ClickHouse/ClickHouse/pull/98048) ([Raúl Marín](https://github.com/Algunenano)).
* 现在可在 `Nullable([Fixed]String)` 和 `Array(Nullable([Fixed]String))` 列上构建文本索引。[#98118](https://github.com/ClickHouse/ClickHouse/pull/98118) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* 避免删除被字典源依赖的命名集合。[#98127](https://github.com/ClickHouse/ClickHouse/pull/98127) ([Pablo Marcos](https://github.com/pamarcos)).
* 针对带有 `totals` 的查询，启用 `grace_hash` JOIN 算法。[#98144](https://github.com/ClickHouse/ClickHouse/pull/98144) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 在 ordinary shared merge tree 的 DROP DATABASE 操作中提前取消后台合并。[#98161](https://github.com/ClickHouse/ClickHouse/pull/98161) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 改进了在 clickhouse-client 中使用 KILL QUERY 和取消查询 (Ctrl+C) 来取消 MongoDB 和 MySQL 查询的能力。[#98187](https://github.com/ClickHouse/ClickHouse/pull/98187) ([Roman Vasin](https://github.com/rvasin)).
* 移除 NetlinkMetricsProvider，改为仅使用 procfs 收集每线程的 taskstats 指标。基于 Netlink 的收集方式在容器化环境中存在问题，而且在发生争用时，尾延迟表现更差。[#98229](https://github.com/ClickHouse/ClickHouse/pull/98229) ([Amos Bird](https://github.com/amosbird)) 。
* 重构了 Iceberg manifest 文件处理逻辑，修复了 manifest 文件缓存相关问题。[#98231](https://github.com/ClickHouse/ClickHouse/pull/98231) ([Daniil Ivanik](https://github.com/divanik)).
* 现在我们也会考虑这样一种情况：表的排序键可以是像 `toDate(time)` 这样的 expression；如果这类 expression 属于过滤器的一部分，我们就可以决定不延迟对它们的处理。[#98237](https://github.com/ClickHouse/ClickHouse/pull/98237) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 新增 `MaxAllocatedEphemeralLockSequentialNumber` 指标，用于表示 ZooKeeper 中为临时锁 znode 分配的最大顺序编号。[#98243](https://github.com/ClickHouse/ClickHouse/pull/98243) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 将 ClickStack 更新至 2.20.0 版本。[#98252](https://github.com/ClickHouse/ClickHouse/pull/98252) ([Aaron Knudtson](https://github.com/knudtty)) 。
* 新增了一个新的 profile 事件 `KeeperRequestTotalWithSubrequests`，会将多请求中的每个子请求分别计数，从而更清楚地反映实际的 Keeper workload。现有的 `KeeperRequestTotal` 事件则仍然将每个多请求计为一次请求。[#98348](https://github.com/ClickHouse/ClickHouse/pull/98348) ([Antonio Andelic](https://github.com/antonio2368)) 。
* `SYSTEM RELOAD DICTIONARIES` 现在会按拓扑顺序重新加载字典，因此将其他字典作为数据源的字典在重新加载后也能读取到最新数据。[#98356](https://github.com/ClickHouse/ClickHouse/pull/98356) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 更改 MergeTree 设置后，重启统计缓存。[#98520](https://github.com/ClickHouse/ClickHouse/pull/98520) ([Han Fei](https://github.com/hanfei1991)) 。
* 只有“存活”的 (即能够连接的) 副本会参与分布式索引分析。[#98521](https://github.com/ClickHouse/ClickHouse/pull/98521) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增设置 `access_control_improvements.disallow_config_defined_profiles_for_sql_defined_users` (默认值为 disabled/allowed) ，禁止为通过 SQL 定义的用户使用在 config 中定义的 profile (`default` profile 除外) 。[#98662](https://github.com/ClickHouse/ClickHouse/pull/98662) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 将自动并行副本启发式所使用的节点数上限设为集群中的实际节点数 (而不再仅由 `max_parallel_replicas` 设置决定) 。[#98668](https://github.com/ClickHouse/ClickHouse/pull/98668) ([Nikita Taranov](https://github.com/nickitat)).
* 为分布式索引分析引入对冲请求和异步读取。[#98724](https://github.com/ClickHouse/ClickHouse/pull/98724) ([Azat Khuzhin](https://github.com/azat)) 。
* 现在，二进制 `AggregateFunction` 状态的反序列化要求必须完整读取全部输入。如果存在多余的尾随冗余字节，ClickHouse 将抛出异常，而不再接受格式不正确的状态数据。[#98786](https://github.com/ClickHouse/ClickHouse/pull/98786) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 让 TRUNCATE DATABASE 能响应查询取消。[#98828](https://github.com/ClickHouse/ClickHouse/pull/98828) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 为 `keeper-bench` 增加请求流水线、预热阶段、按操作划分的统计信息、可复现的种子以及更完善的错误处理。[#98906](https://github.com/ClickHouse/ClickHouse/pull/98906) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 分布式索引分析现已支持 SAMPLE 子句。 [#98931](https://github.com/ClickHouse/ClickHouse/pull/98931) ([Azat Khuzhin](https://github.com/azat)).
* 即使查询返回空结果或发生错误，也会在仪表板中显示图表标题。[#98975](https://github.com/ClickHouse/ClickHouse/pull/98975) ([Yash ](https://github.com/Onyx2406)).
* analyzer 错误消息不再输出表中的所有列 (这可能会导致产生 150KB+ 的异常信息) 。列列表现在最多只显示 10 项。[#99002](https://github.com/ClickHouse/ClickHouse/pull/99002) ([Yash ](https://github.com/Onyx2406)).
* 正确返回包含 joins 的子查询中的列统计信息，以便父查询可利用这些信息对 join 顺序进行重排。[#99096](https://github.com/ClickHouse/ClickHouse/pull/99096) ([Alexander Gololobov](https://github.com/davenger)).
* 在终结过程开始时，立即将 ZooKeeper session 标记为已过期，而不是等待发送线程退出。这样一来，其他线程就能立即建立新的 session，而无需等待。[#99102](https://github.com/ClickHouse/ClickHouse/pull/99102) ([Raúl Marín](https://github.com/Algunenano)).
* 开始使用 LLVM-libc 中更多数学函数：`exp`、`exp2`、`expm1`、`fabs`、`fabsl`、`floor`、`fmodl`、`log`、`log2`、`logf`、`pow`、`scalbn`、`scalbnl`、`copysignl`、`nan`、`nanf`、`nanl`，以及 `explogxf` 共享常量。[#99118](https://github.com/ClickHouse/ClickHouse/pull/99118) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 降低 `system.jemalloc_profile_text` 折叠格式下的内存占用，并修复潜在的重复输出问题。[#99121](https://github.com/ClickHouse/ClickHouse/pull/99121) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 向 `system.aggregated_zookeeper_log` 添加 `is_subrequest` 列，用于区分独立请求与 Multi/MultiRead 请求中的子请求。此前，子请求会与独立请求聚合到同一个桶中，而由于每个子操作记录的都是整个多请求的总耗时，因此平均延迟具有误导性。现在，子请求的延迟为零。[#99169](https://github.com/ClickHouse/ClickHouse/pull/99169) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 允许在不指定列类型的情况下执行 `ALTER TABLE MODIFY COLUMN x TTL ...` 命令。[#99208](https://github.com/ClickHouse/ClickHouse/pull/99208) ([Nikolay Degterinsky](https://github.com/evillique)).
* 跳过已断开连接的会话对应的过时 Keeper 请求，避免不必要的 Raft 往返。已跟踪的已结束会话数量上限由协调设置 `max_finished_sessions_cache_size` 控制。[#99246](https://github.com/ClickHouse/ClickHouse/pull/99246) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 支持对基于 `mapValues(map)` 构建的文本索引使用 `IN` 运算符。[#99286](https://github.com/ClickHouse/ClickHouse/pull/99286) ([Anton Popov](https://github.com/CurtizJ)) 。
* 在 clickhouse keeper-client 中支持类似 Shell 的自动补全 (支持补全引号中的参数，即 `'foo ba'`；支持转义参数，即 `foo\ ba`；如果节点名中包含空白字符，则让 `ls` 输出带引号的节点名) 。[#99312](https://github.com/ClickHouse/ClickHouse/pull/99312) ([Azat Khuzhin](https://github.com/azat)).
* 防止 Keeper `mntr` 命令因锁竞争而发生卡顿。[#99472](https://github.com/ClickHouse/ClickHouse/pull/99472) ([Antonio Andelic](https://github.com/antonio2368)).
* 通过在 mutex 作用域之外调用回调函数并分发读取请求，减少 Keeper 分发器中的锁竞争，并添加带 profile 的锁保护机制以增强可观测性。[#99751](https://github.com/ClickHouse/ClickHouse/pull/99751) ([Antonio Andelic](https://github.com/antonio2368)).
* 允许 Parquet 文件最后一个块末尾缺少填充。 [#99857](https://github.com/ClickHouse/ClickHouse/pull/99857) ([Seva Potapov](https://github.com/seva-potapov)).

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

* 修复了当别名表目标未使用完全限定名称时，将其保存为 DDL 依赖的方式：现在会保存为别名表所在的数据库，而不是会话数据库。 [#95175](https://github.com/ClickHouse/ClickHouse/pull/95175) ([Enric Calabuig](https://github.com/eclbg)).
* 修复读取 ALIAS 列的子列时返回错误结果或抛出异常的问题。[#95408](https://github.com/ClickHouse/ClickHouse/pull/95408) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在使用旧 analyzer 时，JOIN 中使用非标准标识符别名导致列缺失的问题。修复了 [#25594](https://github.com/ClickHouse/ClickHouse/issues/25594)、[#47288](https://github.com/ClickHouse/ClickHouse/issues/47288) 和 [#53263](https://github.com/ClickHouse/ClickHouse/issues/53263)。[#95679](https://github.com/ClickHouse/ClickHouse/pull/95679) ([Zhigao Hong](https://github.com/zghong)).
* 修复了 Kusto 方言函数 `bin()`、`bin_at()`、`extract()` 和 `indexof()` 在传入空参数时发生崩溃的问题。[#95736](https://github.com/ClickHouse/ClickHouse/pull/95736) ([NeedmeFordev](https://github.com/spider-yamet)) 。
* 禁止在 clickhouse-client 中将 local\_object\_storage (用于基于本地文件系统的数据湖，也可能被 LocalDisk 使用) 挂载到 user\_files\_path 以外的任何位置。 [#96201](https://github.com/ClickHouse/ClickHouse/pull/96201) ([Daniil Ivanik](https://github.com/divanik)).
* 修复 `DeltaLake` 表引擎中快照版本变更时的逻辑竞态问题，并去除冗余且高开销的快照重新加载。[#96226](https://github.com/ClickHouse/ClickHouse/pull/96226) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 MergeTree 中附加分片时的一个逻辑错误：如果在 detach 和 attach 之间经历了多次连续重命名，就会触发该问题。[#96351](https://github.com/ClickHouse/ClickHouse/pull/96351) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个问题：在同一请求中与 `compatibility` 一并发送显式设置时，如果其值恰好与服务器默认值相同，这些设置可能会被悄然忽略。[#97078](https://github.com/ClickHouse/ClickHouse/pull/97078) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了以下问题：当启用并行解析的 INSERT 遇到无效数据时，客户端会报告 `NETWORK_ERROR`，而不是实际的解析错误 (并带有正确的行号) 。[#97339](https://github.com/ClickHouse/ClickHouse/pull/97339) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在引入 `Nullable(Tuple)` 后，`sumCount` 聚合函数无法读取旧版已序列化状态的问题。关闭 [#97370](https://github.com/ClickHouse/ClickHouse/issues/97370)。[#97502](https://github.com/ClickHouse/ClickHouse/pull/97502) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复在配合 `GROUPING SETS` 和 `ORDER BY` 使用时，包含 `Nothing` 类型元素的元组比较中出现的异常 (例如与 `NULL` 元组元素比较时) 。[#97509](https://github.com/ClickHouse/ClickHouse/pull/97509) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在使用多个压缩编解码器时，Compact MergeTree parts 的 `uncompressed_hash` 计算非确定性问题，该问题可能导致去重行为不正确。[#97522](https://github.com/ClickHouse/ClickHouse/pull/97522) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在共享数据中使用 JSON 和桶执行 INSERT SELECT 时，stream 缺失导致的逻辑错误。关闭 [#97331](https://github.com/ClickHouse/ClickHouse/issues/97331)。[#97523](https://github.com/ClickHouse/ClickHouse/pull/97523) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 SummingMergeTree 和 CoalescingMergeTree 合并过程中，将 `MEMORY_LIMIT_EXCEEDED` 异常误报为 `CORRUPTED_DATA` 的问题。[#97537](https://github.com/ClickHouse/ClickHouse/pull/97537) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了包含 `url()` 等表函数的关联子查询中出现的 "Context has expired" 异常。[#97544](https://github.com/ClickHouse/ClickHouse/pull/97544) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `optimize_syntax_fuse_functions` 在聚合投影、Date 类型以及列名保留方面的异常和错误行为。[#97545](https://github.com/ClickHouse/ClickHouse/pull/97545) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 移除了将 `replaceRegexpOne` 查询重写为 `extract` 的错误优化，该重写在正则表达式不匹配时会产生错误结果；同时修复了在 `replaceRegexpOne` 与 `GROUP BY ... WITH CUBE` 及 `group_by_use_nulls=1` 一起使用时出现的异常。[#97546](https://github.com/ClickHouse/ClickHouse/pull/97546) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在查询被终止时，启用 `database_atomic_wait_for_drop_and_detach_synchronously` 的 `DROP DATABASE` 可能会无限期挂起的问题。[#97586](https://github.com/ClickHouse/ClickHouse/pull/97586) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `KILL QUERY` 无法终止卡在 `WITH FILL` 生成、通过 `dictGet` 加载字典，或在 `ReplicatedMergeTree` 上执行带有 `mutations_sync=1` 的 `ALTER DELETE` 时卡住的查询的问题。[#97589](https://github.com/ClickHouse/ClickHouse/pull/97589) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `loop` 表函数此前直接调用 `inner_storage->read()`，绕过了解释器层；而行策略、列级授权及其他安全检查正是在这一层执行的。因此，即使直接执行 SELECT 返回零行，受行策略限制的用户仍可通过 `loop(table)` 读取所有行。[#97682](https://github.com/ClickHouse/ClickHouse/pull/97682) ([pufit](https://github.com/pufit)) 。
* 修复了在对纪元前的 DateTime64 使用 `toDate()` 函数时，分区裁剪不正确的问题。 [#97746](https://github.com/ClickHouse/ClickHouse/pull/97746) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 应用此补丁后，如果数据分区片段集合中存在另一个分区 ID 更高的分区，`hasPartitionId` 将返回 false。[#97748](https://github.com/ClickHouse/ClickHouse/pull/97748) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 修复读取 JSON 中高级共享数据的空粒度时可能发生的崩溃。关闭 [#97563](https://github.com/ClickHouse/ClickHouse/issues/97563)。[#97778](https://github.com/ClickHouse/ClickHouse/pull/97778) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复因 `DROP` 与 `INSERT` 之间的竞争条件，导致向 `Distributed` 执行 `INSERT` 时出现 `Cannot schedule a file` `LOGICAL_ERROR` 错误的问题。[#97822](https://github.com/ClickHouse/ClickHouse/pull/97822) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在调用 `mapContainsKey/mapContainsKeyLike` 且使用 `tokenbf_v1` 跳过索引时，ClickHouse 服务器崩溃/断言的问题。[#97826](https://github.com/ClickHouse/ClickHouse/pull/97826) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 修复了在 `concatWithSeparator`、`format`、`IN` 子查询、`GLOBAL IN` 以及带运行时过滤器的连接操作中，由复合类型 (`Variant`、`Dynamic`、`Tuple`) 内的 `LowCardinality` 引发的 LOGICAL\_ERROR 异常。[#97831](https://github.com/ClickHouse/ClickHouse/pull/97831) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了在多个分布式表上使用 `ARRAY JOIN`、`merge()` 表函数并结合 `GROUP BY` 时出现的 `LOGICAL_ERROR` 异常：`Chunk info was not set for chunk in MergingAggregatedTransform`。[#97838](https://github.com/ClickHouse/ClickHouse/pull/97838) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在高并发情况下，连接组达到硬性上限时，HTTP 连接池析构函数中的未捕获异常导致的服务端崩溃 (`std::terminate`) 问题。在将连接回收到连接池时，异常 `HTTP_CONNECTION_LIMIT_REACHED` 可能会从 `~PooledConnection` 中泄出，进而导致 `SIGABRT`。[#97850](https://github.com/ClickHouse/ClickHouse/pull/97850) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了在使用 `grace_hash` 算法进行非等值连接时，若由于连接结果的大小约束导致左侧块无法被完全处理而产生错误结果的问题。[#97866](https://github.com/ClickHouse/ClickHouse/pull/97866) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了在 [#96686](https://github.com/ClickHouse/ClickHouse/pull/96686) 中引入的 DeltaLake 元数据扫描性能问题。[#97880](https://github.com/ClickHouse/ClickHouse/pull/97880) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 ZooKeeper 客户端中 sendThread 与 receiveThread 之间的数据竞争问题。[#97887](https://github.com/ClickHouse/ClickHouse/pull/97887) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了一个 bug：此前无法在 distributed insert select 中使用 CTE。延续 [https://github.com/ClickHouse/ClickHouse/pull/87789](https://github.com/ClickHouse/ClickHouse/pull/87789) 中的修复。关闭了 [#95837](https://github.com/ClickHouse/ClickHouse/issues/95837)。[#97889](https://github.com/ClickHouse/ClickHouse/pull/97889) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复 `CachedOnDiskReadBufferFromFile::readBigAt` 中的异常。关闭 [#97325](https://github.com/ClickHouse/ClickHouse/issues/97325)。[#97890](https://github.com/ClickHouse/ClickHouse/pull/97890) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了 `Alias` 引擎中因列不匹配导致的带有物化列的 `LOGICAL_ERROR` 异常。关闭了 [#97907](https://github.com/ClickHouse/ClickHouse/issues/97907)。[#97921](https://github.com/ClickHouse/ClickHouse/pull/97921) ([Kai Zhu](https://github.com/nauu)) 。
* 修复了在使用 Azure Blob 存储并将 `s3_plain` metadata 用于日志存储时，Keeper 重启后出现的数据丢失问题。[#97987](https://github.com/ClickHouse/ClickHouse/pull/97987) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 `sign` 函数在比 `Int8` 更宽的整数类型上的 JIT 误编译问题——超出 -128..127 范围的值可能会得到错误的符号。[#98012](https://github.com/ClickHouse/ClickHouse/pull/98012) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了读取使用列映射 "name" 模式的 Delta Lake 表时出现的 `DUPLICATE_COLUMN` 异常，以及对名称中包含点号的 struct 字段无提示地返回 NULL 的问题 (例如 ``STRUCT<`a.foo`: STRING, `b.foo`: STRING>``) 。[#98013](https://github.com/ClickHouse/ClickHouse/pull/98013) ([Caio Ishizaka Costa](https://github.com/ch-caioishizaka)) 。
* 修复轻量级更新和次级索引后的变更问题。[#98044](https://github.com/ClickHouse/ClickHouse/pull/98044) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复混用主键和非主键跳过索引时 FINAL 查询结果错误的问题。[#98097](https://github.com/ClickHouse/ClickHouse/pull/98097) ([Raúl Marín](https://github.com/Algunenano)) 。
* 对标量 file() 和 DESCRIBE TABLE file() 强制进行 READ ON FILE 权限检查。[#98115](https://github.com/ClickHouse/ClickHouse/pull/98115) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 修复了一个崩溃问题：使用 glob 模式查询文件 (例如 `file('dir/**', 'LineAsString')`) 时，如果目录中包含悬空符号链接，会抛出未处理的文件系统异常 (`STD_EXCEPTION`) 。现在会静默跳过悬空符号链接，查询将返回所有有效文件的结果。[#98143](https://github.com/ClickHouse/ClickHouse/pull/98143) ([Mark Andreev](https://github.com/mrk-andreev)).
* 修复了在过滤表达式中使用 `arrayJoin` 将外连接转换为内连接时，查询计划优化中发生的 segfault。[#98147](https://github.com/ClickHouse/ClickHouse/pull/98147) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `ProtobufList` 格式因消息间读取状态未重置而无法与 Kafka 引擎正常配合的问题。[#98151](https://github.com/ClickHouse/ClickHouse/pull/98151) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 analyzer\_compatibility\_join\_using\_top\_level\_identifier 与 ARRAY JOIN 相关的逻辑错误，关闭 [#98164](https://github.com/ClickHouse/ClickHouse/issues/98164)。[#98179](https://github.com/ClickHouse/ClickHouse/pull/98179) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 将 `aggregated_zookeeper_log` 中 `watch` 响应的组件字段设为 `Watch`，而不是留空。[#98202](https://github.com/ClickHouse/ClickHouse/pull/98202) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 如果分区键列未包含在排序键中，那么分区裁剪可能会错误地跳过那些包含在 FINAL 去重过程中本应被保留的行的分区。 [#98242](https://github.com/ClickHouse/ClickHouse/pull/98242) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复了在以常量数组参数调用 `kql_array_sort_asc`/`kql_array_sort_desc` 时出现的逻辑错误 "Bad cast from type DB::ColumnConst to DB::ColumnArray"。[#98251](https://github.com/ClickHouse/ClickHouse/pull/98251) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `ColumnConst::getExtremes` 中的越界访问问题；在启用 `extremes = 1` 时，该问题可能导致崩溃。[#98263](https://github.com/ClickHouse/ClickHouse/pull/98263) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一种潜在死锁问题：当两个并发的 `MOVE PARTITION` 操作在同一对表之间沿相反方向执行时，可能会发生死锁。[#98264](https://github.com/ClickHouse/ClickHouse/pull/98264) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* HTTP 服务器现在会在因请求头格式错误而导致的 400 Bad Request 响应体中返回错误消息，而不再返回空响应体。[#98268](https://github.com/ClickHouse/ClickHouse/pull/98268) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了分布式索引分析 (Experimental 功能) 和查询条件缓存中的错误结果问题。[#98269](https://github.com/ClickHouse/ClickHouse/pull/98269) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了 LOGICAL\_ERROR 异常 "`MergeTreeSetIndex` 中的二分查找结果无效"：当对数据跨越 65535 边界的键列执行 `toDate` 转换时会触发该异常。[#98276](https://github.com/ClickHouse/ClickHouse/pull/98276) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在旧版 join 步骤代码路径中，被包裹在 CROSS JOIN 中的 RIGHT JOIN 被 `query_plan_join_swap_table` 优化交换时触发的 `LOGICAL_ERROR` 异常。[#98279](https://github.com/ClickHouse/ClickHouse/pull/98279) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 `DDSketch` 反序列化期间对损坏数据进行校验，以防在读取已损坏的 `quantilesDD` 聚合函数状态时出现段错误、异常、无限循环和 OOM。 [#98284](https://github.com/ClickHouse/ClickHouse/pull/98284) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 `arrayMap` 等 lambda 函数中引用外层查询中的关联列时出现的 LOGICAL\_ERROR "Trying to execute PLACEHOLDER action"。 [#98285](https://github.com/ClickHouse/ClickHouse/pull/98285) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `caseWithExpression` 中的逻辑错误异常：当 `CASE` 表达式涉及 `materialize(NULL)` 或其他 `Nullable(Nothing)` 参数时会触发该异常。[#98290](https://github.com/ClickHouse/ClickHouse/pull/98290) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在 `merge` 表函数中过滤 `_table` 虚拟列时出现的错误类型转换异常。[#98291](https://github.com/ClickHouse/ClickHouse/pull/98291) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一个偶发的去重故障：由于 `blocks/` 与 `deduplication_hashes/` 这两个 ZooKeeper 目录的清理顺序不一致，重新插入的数据会被错误地去重。[#98293](https://github.com/ClickHouse/ClickHouse/pull/98293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `ORDER BY ... WITH FILL` 与 `LIMIT BY` 一起使用时触发的异常。[#98361](https://github.com/ClickHouse/ClickHouse/pull/98361) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复将 Parquet/Arrow `Date` 列插入 `Enum` 列时的静默数据损坏问题——现在会正确拒绝不兼容的类型转换，而不会存储无效的枚举值。[#98364](https://github.com/ClickHouse/ClickHouse/pull/98364) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了将带有 `Array` 列的 Arrow 文件读入带有 `Nested` 列的表时出现的异常。[#98365](https://github.com/ClickHouse/ClickHouse/pull/98365) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了以下问题：如果在索引或投影对应的变更完成前将其删除，`MATERIALIZE INDEX` 和 `MATERIALIZE PROJECTION` 变更会卡住。[#98369](https://github.com/ClickHouse/ClickHouse/pull/98369) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了读取 `Nullable(Tuple(...))` 时出现的异常：Tuple 元素名称与 Nullable 的 `null` 子列发生冲突。[#98372](https://github.com/ClickHouse/ClickHouse/pull/98372) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复将 `Merge` 表 (底层为 `Distributed` 表) 与另一张表连接时出现的异常 "Column ... query tree node does not have valid source node"。[#98376](https://github.com/ClickHouse/ClickHouse/pull/98376) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 native V3 读取器中将 Parquet `Bool` 错误转换为 `FixedString` 的问题，此问题会产生 raw bytes，而不是字符串表示形式。[#98378](https://github.com/ClickHouse/ClickHouse/pull/98378) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `tryGetColumnDescription`：按父列类型筛选子列，使其与其他列查找方法保持一致。[#98391](https://github.com/ClickHouse/ClickHouse/pull/98391) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持在 HTTP Basic Auth 中接受不带填充的 base64 凭据。某些 HTTP 客户端会省略 `Authorization: Basic` 请求头末尾用于填充的 `=`，此前这会导致身份验证失败。[#98392](https://github.com/ClickHouse/ClickHouse/pull/98392) ([Amos Bird](https://github.com/amosbird)).
* 修复了合并带有 `Nullable` 分区键列的 parts 后，因 min-max 索引边界错误导致的分区裁剪结果不正确问题。[#98405](https://github.com/ClickHouse/ClickHouse/pull/98405) ([Amos Bird](https://github.com/amosbird)).
* 修复了管道执行器中的一个罕见异常：当管道扩展与查询取消发生竞态时，可能会表现为 `Received signal 6` (仅在调试构建中出现) 。[#98428](https://github.com/ClickHouse/ClickHouse/pull/98428) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在 `count_distinct_optimization` 与 `QUALIFY` 子句一起使用时出现的 "Column identifier is already registered" 异常。[#98433](https://github.com/ClickHouse/ClickHouse/pull/98433) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了将 `IN`/`NOT IN` 与 `LowCardinality` 列参数一起使用时出现的异常“cannot be inside Nullable type” (例如 `a NOT IN (b)`，其中 `a` 的类型为 `LowCardinality(String)`) 。 [#98443](https://github.com/ClickHouse/ClickHouse/pull/98443) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `full_sorting_merge` join 中的 "Pipeline stuck" 异常：当 `FilterBySetOnTheFly` 优化与 `MergeJoinTransform` 形成循环依赖时，`PingPongProcessor` 中的死锁会触发该异常。[#98454](https://github.com/ClickHouse/ClickHouse/pull/98454) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在合并带有会删除所有行的生存时间 (TTL) 且具有常量 `GROUP BY` 键的聚合投影的 parts 时出现的 `LOGICAL_ERROR` 异常 "Projection cannot increase the number of rows in a block"。[#98458](https://github.com/ClickHouse/ClickHouse/pull/98458) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了同时使用 `CROSS JOIN` 和 `INNER JOIN USING` 时出现的逻辑错误异常。[#98459](https://github.com/ClickHouse/ClickHouse/pull/98459) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `dictGetOrDefault` 在键参数为 `Nullable` 时的空指针解引用问题。[#98460](https://github.com/ClickHouse/ClickHouse/pull/98460) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了这样一种情况下 `DISTINCT` 查询中的异常：使用聚合投影时，`materialize` 会导致查询与投影之间的 `LowCardinality` 类型不一致。[#98462](https://github.com/ClickHouse/ClickHouse/pull/98462) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了这样一个问题：启用 `join_use_nulls` 时，在 OUTER JOIN 的过滤表达式中使用 `arrayJoin` 会触发 LOGICAL\_ERROR 异常。[#98464](https://github.com/ClickHouse/ClickHouse/pull/98464) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在并行副本配合 `optimize_aggregation_in_order` 使用时出现的逻辑错误异常 "副本决定以 WithOrder 模式读取，而不是 ReverseOrder"。[#98467](https://github.com/ClickHouse/ClickHouse/pull/98467) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 ClickHouse Keeper 在处理 `addWatch` 请求后断开 Java ZooKeeper 客户端连接的问题。Java 客户端期望在 `addWatch` 响应中收到一个 4 字节的 `ErrorResponse` 响应体，但 Keeper 发送的却是空响应体，从而导致 `EOFException` 并使会话断开。这会导致 Apache Curator 的 `CuratorCache` 以及任何使用持久 watch 的 Java 应用程序无法正常工作。修复 [#98079](https://github.com/ClickHouse/ClickHouse/issues/98079)。[#98499](https://github.com/ClickHouse/ClickHouse/pull/98499) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了当跟随者宕机时，`zk_followers` 和 `zk_synced_followers` 这两个 Keeper 指标不会随之减少的问题。在 `mntr` 四字母命令中新增了 `zk_learners` 和 `zk_synced_non_voting_followers` 指标。修复 [#54173](https://github.com/ClickHouse/ClickHouse/issues/54173)。[#98504](https://github.com/ClickHouse/ClickHouse/pull/98504) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了 `renameAndCommitEmptyParts` 中的 LOGICAL\_ERROR 异常：在使用 MergeTree 事务时，若 `TRUNCATE TABLE` 与 `OPTIMIZE TABLE` 并发执行，可能会触发该异常。[#98508](https://github.com/ClickHouse/ClickHouse/pull/98508) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 Keeper 的安全 Raft 端口忽略 `openSSL` 配置中的 `cipherList` 和 `dhParamsFile`、一律使用默认值而非用户指定值的问题。关闭 [#51188](https://github.com/ClickHouse/ClickHouse/issues/51188)。[#98509](https://github.com/ClickHouse/ClickHouse/pull/98509) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了具有误导性的 Keeper 日志消息，例如 "Receiving request for session X took 9963 ms"：其中显示的时间实际上是两次心跳之间在 `poll()` 中空闲等待的耗时，而非操作本身的执行时间。修复了 [#79026](https://github.com/ClickHouse/ClickHouse/issues/79026)。[#98510](https://github.com/ClickHouse/ClickHouse/pull/98510) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复 read\_in\_order\_use\_virtual\_row 与单调函数配合使用时出现的意外结果，关闭 [#97837](https://github.com/ClickHouse/ClickHouse/issues/97837)。[#98514](https://github.com/ClickHouse/ClickHouse/pull/98514) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在 MergeTree 表上配合 `IN` 子查询使用 `PREWHERE` 时出现的 `LOGICAL_ERROR: Not-ready Set is passed as the second argument for function 'in'` 问题。[#98522](https://github.com/ClickHouse/ClickHouse/pull/98522) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 Keeper TCP 连接未响应关闭信号，导致服务器无法优雅关闭的问题。 [#98525](https://github.com/ClickHouse/ClickHouse/pull/98525) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在启用 `query_plan_convert_join_to_in` 且 `query_plan_merge_expressions = 0` 时出现的异常："在 ActionsDAG 的输出中未找到排序列"。 [#98526](https://github.com/ClickHouse/ClickHouse/pull/98526) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了使用命名集合时 MongoDB 字典源失效的问题。关闭 [#97840](https://github.com/ClickHouse/ClickHouse/issues/97840)。[#98528](https://github.com/ClickHouse/ClickHouse/pull/98528) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了参数替换后 Identifier 为空时触发的 LOGICAL\_ERROR。 [#98530](https://github.com/ClickHouse/ClickHouse/pull/98530) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* 修复同时使用 `sort_overflow_mode = 'break'` 和窗口函数时出现的管道死锁问题。[#98543](https://github.com/ClickHouse/ClickHouse/pull/98543) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 Buffer 引擎在追加新块时处理异常过程中的列回滚问题。旧逻辑可能导致列的内存状态损坏。[#98551](https://github.com/ClickHouse/ClickHouse/pull/98551) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在常量 `Dynamic` 或 `Variant` 列与 `NULL` 进行 NULL 安全比较 (`<=>` / `IS NOT DISTINCT FROM`) 时出现的异常 `Bad cast from type ColumnConst to ColumnDynamic`。同时还修复了 `Dynamic`/`Variant` 与 `NULL` 进行 `IS DISTINCT FROM` 比较时始终错误返回 0 的问题。[#98553](https://github.com/ClickHouse/ClickHouse/pull/98553) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了文本索引与其他跳过索引一起使用时的问题。此前，当查询过滤器同时使用文本索引和其他常规跳过索引时，可能会抛出诸如 "Trying to get non-existing mark" 之类的逻辑错误。[#98555](https://github.com/ClickHouse/ClickHouse/pull/98555) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了逻辑错误 "在表达式上下文中不允许使用 TABLE\_FUNCTION"：当带有别名的表函数在同一查询作用域中出现多次时 (例如同时出现在 `PREWHERE` 和 `QUALIFY` 子句中) 。 [#98557](https://github.com/ClickHouse/ClickHouse/pull/98557) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 PK 中针对表达式 (而不只是列) 进行分布式索引分析的问题 (否则会导致远程副本上的冗余粒度完全无法被过滤) 。[#98561](https://github.com/ClickHouse/ClickHouse/pull/98561) ([Azat Khuzhin](https://github.com/azat)).
* 当某列的子列被用于其他列的默认值/别名表达式时，禁止删除该列，并在 alter drop column 操作中对默认表达式使用 analyzer。[#98569](https://github.com/ClickHouse/ClickHouse/pull/98569) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 修复了 HTTP 客户端在遇到不可重试错误 (包括 `HTTP_CONNECTION_LIMIT_REACHED`) 时，仍错误重试 S3 请求的问题。[#98598](https://github.com/ClickHouse/ClickHouse/pull/98598) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了使用 DateTime64 进行分区裁剪时出现的十进制溢出问题。 [#98628](https://github.com/ClickHouse/ClickHouse/pull/98628) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复 JIT 表达式编译中的两个 bug：`nativeCast` 类型检查里的一处复制粘贴错误，导致整数到整数和 Float 到 Float 的 cast 分支不可达；以及向 LLVM `PassBuilder` 传入了错误的 `nullptr` TargetMachine，致使无法注册特定目标的优化 pass。[#98660](https://github.com/ClickHouse/ClickHouse/pull/98660) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一个 RBAC 绕过漏洞：用户此前可通过指向 localhost 的 `remote()`、`remoteSecure()`、`cluster()` 或 `clusterAllReplicas()` 对任意表执行 `DESCRIBE`，且无需 `SHOW_COLUMNS` 权限。[#98669](https://github.com/ClickHouse/ClickHouse/pull/98669) ([pufit](https://github.com/pufit)).
* 修复了以下问题：当非布尔表达式 (例如 `sin(col)`) 在包含 JOIN 的 WHERE 和 SELECT 中同时使用时，过滤器下推优化会破坏共享 DAG 节点，从而导致 `BAD_GET` 异常和错误的查询结果。[#98681](https://github.com/ClickHouse/ClickHouse/pull/98681) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在使用 `read_in_order_through_join` 和并行副本时出现的 LOGICAL\_ERROR："副本决定以 Default 模式读取，而不是 WithOrder"。 [#98685](https://github.com/ClickHouse/ClickHouse/pull/98685) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复将 `input` 表函数用作 `remote` 参数时出现的异常 "Bad cast from type `DB::TableFunctionNode` to `DB::QueryNode`"。[#98694](https://github.com/ClickHouse/ClickHouse/pull/98694) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了因错误清理空的覆盖数据分区片段而导致过期数据分区片段“复活”的问题。 [#98698](https://github.com/ClickHouse/ClickHouse/pull/98698) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了 `LogicalExpressionOptimizerPass` 中的一个异常：在 `equals` 比较中，如果布尔函数返回 `Variant` 类型，就会报异常。[#98712](https://github.com/ClickHouse/ClickHouse/pull/98712) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `parseDateTimeBestEffort` 错误地解析以月份/星期前缀开头的单词的问题。关闭 [#97965](https://github.com/ClickHouse/ClickHouse/issues/97965)。[#98742](https://github.com/ClickHouse/ClickHouse/pull/98742) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在启用新 analyzer 时，对具有不同参数 (例如不同 `SKIP` 字段) 且包含引用 JSON 子路径的 ALIAS 列的 JSON 列使用 `merge()` 表函数或 `Merge` 引擎进行查询时出现的 `UNKNOWN_IDENTIFIER` 异常。关闭了 [#97812](https://github.com/ClickHouse/ClickHouse/issues/97812)。[#98753](https://github.com/ClickHouse/ClickHouse/pull/98753) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在 `View` 中使用 `Distributed` 存储时，analyzer 对 `optimize_skip_unused_shards` 优化处理不正确的问题。[#98754](https://github.com/ClickHouse/ClickHouse/pull/98754) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了在 `clickhouse-client` 中，通过 `--external` 传入的外部表无法按名称访问 Tuple 子列的问题 (例如，对 `Tuple(a UUID, b Int32)` 使用 `SELECT x.a`) 。关闭 [#96925](https://github.com/ClickHouse/ClickHouse/issues/96925)。[#98755](https://github.com/ClickHouse/ClickHouse/pull/98755) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 `reverseUTF8` 在无效 (截断的) UTF-8 输入上抛出异常的问题。[#98770](https://github.com/ClickHouse/ClickHouse/pull/98770) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在带有 false (即 or(x, 0)) 的或谓词中检测 Set 跳过索引有效性的问题。[#98776](https://github.com/ClickHouse/ClickHouse/pull/98776) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复一个 `LOGICAL_ERROR` 异常 (`removeUnusedColumns` 中出现块结构不匹配) ，该异常可能会在 `FINAL` + `PREWHERE` + 常量 `WHERE` 表达式 + 与列无关的聚合 (如 `count()`) 的情况下发生。[#98778](https://github.com/ClickHouse/ClickHouse/pull/98778) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 ClickHouse 字典自动重新加载生成的 `system.trace_log` 条目添加非空查询 ID。[#98784](https://github.com/ClickHouse/ClickHouse/pull/98784) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了一个崩溃问题：对于在 `IDatabaseTablesIterator::table()` 调用中对表进行快照之后、并在后续迭代期间被另一线程更改的那些表之间这段时间里创建的系统表，我们可能会解引用空指针。 [#98792](https://github.com/ClickHouse/ClickHouse/pull/98792) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* 修复 `SYSTEM START REPLICATED VIEW` 无法唤醒刷新任务的问题。[#98797](https://github.com/ClickHouse/ClickHouse/pull/98797) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了在另一个 JOIN 内使用包含 JOIN 的 `view()` 表函数时出现的异常 "表名不一致" (仅在旧 analyzer 下) 。[#98809](https://github.com/ClickHouse/ClickHouse/pull/98809) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了通过 pending\_signals 调整 RLIMIT\_SIGPENDING 时的问题。[#98829](https://github.com/ClickHouse/ClickHouse/pull/98829) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `loop` 与 cluster 表函数组合使用时触发的异常。[#98860](https://github.com/ClickHouse/ClickHouse/pull/98860) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用多个连接键列的 LEFT ANTI JOIN 在 `enable_join_runtime_filters=1` (默认开启) 时会返回错误结果。[#98871](https://github.com/ClickHouse/ClickHouse/pull/98871) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复 `WITH FILL STALENESS` 在分多个数据块读取数据时 (例如，`index_granularity` 较小时) 产生额外填充行的问题。[#98895](https://github.com/ClickHouse/ClickHouse/pull/98895) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 “RPNBuilderFunctionTreeNode has A arguments, attempted to get argument at index B” LOGICAL\_ERROR。[#98900](https://github.com/ClickHouse/ClickHouse/pull/98900) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了由失败的内存分配未回滚、`nallocx(0)` 的未定义行为以及全局峰值跟踪中的差一错误导致的内存跟踪偏差。并将跟踪范围扩展到 `io_uring` 的 Ring buffer。[#98915](https://github.com/ClickHouse/ClickHouse/pull/98915) ([Antonio Andelic](https://github.com/antonio2368)).
* 禁止附加用户路径之外的本地数据湖表，而不只是禁止创建这些表。[#98936](https://github.com/ClickHouse/ClickHouse/pull/98936) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了一个竞态条件：在使用 `urlCluster` 或类似 cluster 表函数的查询中，它可能导致出现 "ReadBuffer is canceled" 异常。[#98955](https://github.com/ClickHouse/ClickHouse/pull/98955) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在传入 `BFloat16` 类型参数时，财务函数 (`financialNetPresentValue`、`financialInternalRateOfReturn` 等) 中出现的 `LOGICAL_ERROR` 异常。[#98958](https://github.com/ClickHouse/ClickHouse/pull/98958) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在禁用查询计划表达式合并时 (`query_plan_merge_expressions = 0` 或 `query_plan_enable_optimizations = 0`) ，跳过索引 (以及主键条件) 无法应用于 ALIAS 列的问题。[#98960](https://github.com/ClickHouse/ClickHouse/pull/98960) ([Peng](https://github.com/fastio)).
* 异步插入现在也会增加 `InsertQuery` ProfileEvent 计数。关闭 [#98626](https://github.com/ClickHouse/ClickHouse/issues/98626)。[#98962](https://github.com/ClickHouse/ClickHouse/pull/98962) ([Narasimha Pakeer](https://github.com/npakeer)) 。
* 修复了在调试构建中，当主键包含 NaN 浮点数值时出现的异常 "Inconsistent KeyCondition behavior"：通过让 `accurateLess` 和 `accurateEquals` 按照与 ClickHouse 排序顺序一致的方式处理 NaN。关闭 [#98075](https://github.com/ClickHouse/ClickHouse/issues/98075)。[#98964](https://github.com/ClickHouse/ClickHouse/pull/98964) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* SummingMergeTree 不再对 Bool (以及其他 domain 类型) 的列进行求和。Bool 值会保持原样，不再进行算术求和。[#98976](https://github.com/ClickHouse/ClickHouse/pull/98976) ([Yash ](https://github.com/Onyx2406)).
* 修复了在设置 `optimize_const_name_size` 且 `enable_scalar_subquery_optimization` = 0 时，查询远程分片会出现 `Scalar doesn&#39;t exist` 异常的问题。远程查询中被替换为 `__getScalar` 引用的大型常量未发送到分片，导致查询失败。[#98979](https://github.com/ClickHouse/ClickHouse/pull/98979) ([andriibeee](https://github.com/andriibeee)) 。
* 修复了某些查询中的 `NOT_FOUND_COLUMN_IN_BLOCK` 问题；这些查询带有 `GROUP BY`，且表达式中包含反向字典查找、`Date/DateTime` 转换比较以及元组比较。关闭 [#98888](https://github.com/ClickHouse/ClickHouse/issues/98888)。[#98980](https://github.com/ClickHouse/ClickHouse/pull/98980) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在 MergeTree 引擎中将 version/sign/is\_deleted 列修改为 `EPHEMERAL` 或 `ALIAS` 时出现的未定义行为 (空指针解引用) 问题。现在此类修改会被正确拒绝。[#98985](https://github.com/ClickHouse/ClickHouse/pull/98985) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个问题：`system.grants` 在 `access_object` 列中遗漏了 `URL` 和 `S3` 授权对应的正则表达式参数。[#98987](https://github.com/ClickHouse/ClickHouse/pull/98987) ([DQ](https://github.com/il9ue)).
* 已修复 Iceberg BigLake 读取问题：ADC 凭据现会传递给 GCS S3 客户端 (修复了 403 错误) ；OAuth2 凭据会在发送前进行 URL 编码 (修复了包含特殊字符的令牌导致的身份验证失败) ；命名空间遍历在遇到 BigLake HTTP 400 响应时也不再中止。[#98998](https://github.com/ClickHouse/ClickHouse/pull/98998) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 修复了 `clickhouse-client` 在 `TZ` 环境变量使用 POSIX 文件路径语法时 (例如 `TZ=:/etc/localtime`) 无法切换时区的问题。[#99000](https://github.com/ClickHouse/ClickHouse/pull/99000) ([Yash ](https://github.com/Onyx2406)).
* 修复了将 `startsWith`、`LIKE`、`NOT LIKE` 用于 `FixedString` 列时出现的剪枝不正确或剪枝不足问题。此外，包裹键列的 `FixedString` 到 `String` 类型转换函数现在也可以进行粒度剪枝。关闭 [#98940](https://github.com/ClickHouse/ClickHouse/issues/98940)。[#99001](https://github.com/ClickHouse/ClickHouse/pull/99001) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了 `windowFunnel` 在遇到重复事件时，启用 `strict_deduplication` 会返回错误级别的问题。[#99003](https://github.com/ClickHouse/ClickHouse/pull/99003) ([Yash ](https://github.com/Onyx2406)).
* 修复了一个问题：EXISTS 会忽略子查询中的 LIMIT 和 OFFSET 子句，导致当子查询因 OFFSET 或 LIMIT 为 0 而未返回任何行时，结果不正确。关闭 [#88722](https://github.com/ClickHouse/ClickHouse/issues/88722)。[#99005](https://github.com/ClickHouse/ClickHouse/pull/99005) ([andriibeee](https://github.com/andriibeee)) 。
* 修复在使用 `GROUPING SETS` 时，过滤器下推优化遇到可短路为常量的 AND 表达式时触发的 "Block structure mismatch" 异常。 [#99010](https://github.com/ClickHouse/ClickHouse/pull/99010) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在查询计划中未包含 `_part_offset` 列时，读取补丁分区片段 (轻量级更新) 会触发异常的问题。 [#99023](https://github.com/ClickHouse/ClickHouse/pull/99023) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 对于类似 `SELECT * FROM table WHERE pk_id = ''` 这样的查询，如果 `pk_id` 是主键且类型为 `String`，现在会正确使用主键索引来过滤粒度。 [#99027](https://github.com/ClickHouse/ClickHouse/pull/99027) ([Shankar Iyer](https://github.com/shankar-iyer)).
* 修复了一个问题：当 materialized view 在后台线程流式传输数据时被 detach，Kafka 引擎会抛出 `DEPENDENCIES_NOT_FOUND` 异常。[#99028](https://github.com/ClickHouse/ClickHouse/pull/99028) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在创建包含与虚拟列 (如 `_part_offset`) 同名的 `EPHEMERAL` 列的表时触发的异常。[#99031](https://github.com/ClickHouse/ClickHouse/pull/99031) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了通过带有通配符模式的 `url()` 表函数读取不存在的压缩文件时，误导性的 "inflate failed: buffer error" 报错。现在，当启用 `http_skip_not_found_url_for_globs` 时，会按预期返回空结果。[#99034](https://github.com/ClickHouse/ClickHouse/pull/99034) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在 schema 变更 (例如 ADD COLUMN) 后，对 patch part 执行 `ALTER TABLE ... DROP PART` 时发生的 server 崩溃 (`std::terminate`) 问题。该崩溃是由于空 coverage part 的 metadata 中缺少系统列 (`_part`) ，从而导致在 `NOEXCEPT_SCOPE` 内部抛出未被捕获的异常。[#99036](https://github.com/ClickHouse/ClickHouse/pull/99036) ([Peng](https://github.com/fastio)) 。
* 如果在 *缓存磁盘读取* 期间因超出内存限制而抛出异常，ClickHouse 服务器进程可能会崩溃。该问题现已修复。[#99042](https://github.com/ClickHouse/ClickHouse/pull/99042) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 修复了在使用 `dictGet` 查询同时具有 ROW POLICY 和 ALIAS 列的表时出现的 `LOGICAL_ERROR`。该问题是由于在新的 analyzer 中解析 ALIAS 列期间过早访问表表达式所致。[#99065](https://github.com/ClickHouse/ClickHouse/pull/99065) ([Peng](https://github.com/fastio)).
* 修复了用户在仅查询使用 Avro 格式存储数据的 Iceberg 表虚拟列时出现的越界错误。这种情况极其罕见，因此未将其标记为严重问题。修复 [#88238](https://github.com/ClickHouse/ClickHouse/issues/88238)。[#99080](https://github.com/ClickHouse/ClickHouse/pull/99080) ([alesapin](https://github.com/alesapin)).
* 修复了递归 CTE 中使用 `remote()` + `view()` 时出现的段错误。 [#99081](https://github.com/ClickHouse/ClickHouse/pull/99081) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 应用按序读取优化时，跳过不必要的额外索引分析。[#99084](https://github.com/ClickHouse/ClickHouse/pull/99084) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在应用 patch part 期间因抛出内存限制异常而导致的崩溃。[#99086](https://github.com/ClickHouse/ClickHouse/pull/99086) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了 `DDLWorker` 中的调试断言问题：在重新初始化恢复期间，ZooKeeper 条目被删除后，`first_failed_task_name` 变为过期状态，从而触发该问题。[#99099](https://github.com/ClickHouse/ClickHouse/pull/99099) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了带有生存时间 (TTL) 的合并过程中重建文本索引的问题。[#99107](https://github.com/ClickHouse/ClickHouse/pull/99107) ([Anton Popov](https://github.com/CurtizJ)).
* 修复 Iceberg 表引擎中 `ALTER TABLE ... REMOVE SETTINGS` 查询导致的崩溃问题。修复了 [#86330](https://github.com/ClickHouse/ClickHouse/issues/86330)。[#99108](https://github.com/ClickHouse/ClickHouse/pull/99108) ([alesapin](https://github.com/alesapin)) 。
* 修复了 `query_plan_convert_any_join_to_semi_or_anti_join` 优化中的一个 bug，该 bug 会导致不匹配的行返回错误结果。相关链接：[https://github.com/ClickHouse/ClickHouse/pull/95995。\[#99112](https://github.com/ClickHouse/ClickHouse/pull/95995。\[#99112)]\([https://github.com/ClickHouse/ClickHouse/pull/99112](https://github.com/ClickHouse/ClickHouse/pull/99112)) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复 `ASTColumnsExceptTransformer::transform` 中的 LOGICAL\_ERROR 异常。[#99119](https://github.com/ClickHouse/ClickHouse/pull/99119) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了一个 RBAC 绕过漏洞：该漏洞允许用户在未具备所需 source 访问特权的情况下，通过对表函数 (`mysql()`、`postgresql()`、`sqlite()`、`arrowFlight()`、`jdbc()`、`odbc()` 等) 执行 `DESCRIBE TABLE` 或 `CREATE TABLE AS` 来获取表结构。对于那些从远程服务器推断 schema 的函数，这还会导致用户在未经授权的情况下触发出站连接 (SSRF) 。[#99122](https://github.com/ClickHouse/ClickHouse/pull/99122) ([pufit](https://github.com/pufit)).
* 修复 Keeper 在动态重新配置和 leader 切换期间发生的崩溃问题 (NuRaft 中的 segfault) 。[#99133](https://github.com/ClickHouse/ClickHouse/pull/99133) ([JIaQi Tang](https://github.com/JiaQiTang98)) 。
* 修复了在目标端不支持 SAMPLE 时使用 Buffer 表导致崩溃的问题。[#99141](https://github.com/ClickHouse/ClickHouse/pull/99141) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复因补丁分区片段列顺序不一致导致的 LOGICAL\_ERROR。[#99164](https://github.com/ClickHouse/ClickHouse/pull/99164) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了一个极少见的崩溃问题：当 Iceberg 表包含混合格式 (ORC 和 Parquet) 的文件时可能会发生。修复了 [#88126](https://github.com/ClickHouse/ClickHouse/issues/88126)。[#99168](https://github.com/ClickHouse/ClickHouse/pull/99168) ([alesapin](https://github.com/alesapin)).
* 修复了备份/恢复时未应用 max\_execution\_time 的问题。 [#99205](https://github.com/ClickHouse/ClickHouse/pull/99205) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复了在未使用 `ORDER BY ALL` 的 `INSERT SELECT` 查询中，`insert_deduplication_token` 会被悄然忽略的问题。此前，对于未排序的 `INSERT SELECT`，即使提供了显式的用户标记，也会完全禁用去重。现在，只要提供 `insert_deduplication_token`，无论是否使用 `ORDER BY ALL`，都足以启用去重。 [#99206](https://github.com/ClickHouse/ClickHouse/pull/99206) ([Desel72](https://github.com/Desel72)).
* 修复 `InverseDictionaryLookupPass` 优化过程中权限检查过多的问题：不再对遍历到的每个节点都检查一次 `CREATE_TEMPORARY_TABLE` 权限，而是在该 pass 开始前只检查一次。[#99210](https://github.com/ClickHouse/ClickHouse/pull/99210) ([Mikhail Artemenko](https://github.com/Michicosun))。
* 修复了 `clickhouse format --obfuscate` 因混淆跳过索引类型、压缩编解码器名称、数据库引擎名称以及字典布局和数据源定义而生成无效 SQL 的问题。[#99260](https://github.com/ClickHouse/ClickHouse/pull/99260) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了一个 bug：在某些情况下，`Time[64]` 与 `DateTime[64]` 类型之间的比较结果容易引起混淆；现在，遇到这类情况时，会通过添加日期部分 `1970-01-01`，将 `Time[64]` 值提升为 `DateTime[64]`。[#99267](https://github.com/ClickHouse/ClickHouse/pull/99267) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 在 DDL 工作线程中收紧分布式 DDL 查询的设置约束。[#99317](https://github.com/ClickHouse/ClickHouse/pull/99317) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复 TOTP 身份验证中的一些小问题：`--one-time-password` CLI 选项在密码为空时的问题，以及对 `<digits>` 和 `<period>` 配置值的校验。[#99322](https://github.com/ClickHouse/ClickHouse/pull/99322) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了 Avro 输出格式中的逻辑错误 `unordered_map::at: key not found`：序列化值不在枚举定义内的 `Enum8`/`Enum16` 列时会报错。[#99332](https://github.com/ClickHouse/ClickHouse/pull/99332) ([Desel72](https://github.com/Desel72)).
* 修复了在包含 Dynamic 的 Tuple 中使用稀疏序列化时 CHECK TABLE 的问题。关闭 [#96588](https://github.com/ClickHouse/ClickHouse/issues/96588)。[#99351](https://github.com/ClickHouse/ClickHouse/pull/99351) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了文本索引预处理器验证过于严格的问题。[#99359](https://github.com/ClickHouse/ClickHouse/pull/99359) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复带有隐式 minmax 索引的复制表从 25.10 升级到更高版本时的兼容性问题。 [#99392](https://github.com/ClickHouse/ClickHouse/pull/99392) ([Raúl Marín](https://github.com/Algunenano)).
* 移除了文本索引分析对否定函数 (`notEquals`、`notLike`、`notIn`) 的支持。这些函数本来就无法跳过任何粒度，因此为它们进行索引分析只会徒增开销，毫无收益。[#99393](https://github.com/ClickHouse/ClickHouse/pull/99393) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了在 IN 子查询中使用 `Distributed` 表时，新 analyzer 下 `optimize_skip_unused_shards` 的问题。[#99436](https://github.com/ClickHouse/ClickHouse/pull/99436) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复当查询产生重复列名时，`INTERSECT`/`EXCEPT` 中的 heap-use-after-free 问题。[#99471](https://github.com/ClickHouse/ClickHouse/pull/99471) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `ALTER TABLE ... DROP PART` 在使用带类型的查询参数作为分片名称时的逻辑错误。[#99489](https://github.com/ClickHouse/ClickHouse/pull/99489) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `NOT_FOUND_COLUMN_IN_BLOCK` 异常：当通过别名在 `SELECT` 和 `WHERE` 子句中同时引用文本索引谓词 (如 `hasAllTokens`) 时，会触发该异常。[#99504](https://github.com/ClickHouse/ClickHouse/pull/99504) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在对具有各自独立文本索引的列执行 OR 操作时使用 `hasAllTokens` 会导致结果不正确的问题。[#99505](https://github.com/ClickHouse/ClickHouse/pull/99505) ([Anton Popov](https://github.com/CurtizJ)).
* 在 `clickhouse-local` 中初始化页缓存，使 `page_cache_max_size` 设置生效。[#99510](https://github.com/ClickHouse/ClickHouse/pull/99510) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了一个罕见问题：在执行 `DETACH/ATTACH TABLE` 查询后，可能会错误地将数据分区片段标记为损坏并将其分离。[#99529](https://github.com/ClickHouse/ClickHouse/pull/99529) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了通过 HTTP 接口使用 Pretty 格式查询空系统表时触发的 `std::length_error` 异常。[#99541](https://github.com/ClickHouse/ClickHouse/pull/99541) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了使用 `ALTER TABLE ADD COLUMN` 创建与虚拟列 (如 `_part_offset`) 同名的 `EPHEMERAL` 列时触发的 `LOGICAL_ERROR`。[#99549](https://github.com/ClickHouse/ClickHouse/pull/99549) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了因缓存键不匹配导致在移除分片后 `VectorSimilarityIndexCache` 条目始终无法被淘汰的问题。[#99575](https://github.com/ClickHouse/ClickHouse/pull/99575) ([Seva Potapov](https://github.com/seva-potapov)).
* 禁止从本地文件读取 Google 凭据。此设置存在安全隐患，因为一旦知道文件路径，就可能读取其他凭据。[#99584](https://github.com/ClickHouse/ClickHouse/pull/99584) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复 analyzer 中的性能劣化问题。移除 ARRAY JOIN 中未使用的列。[#99587](https://github.com/ClickHouse/ClickHouse/pull/99587) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在已启用轻量级删除和行策略的表中读取文本索引时的问题。[#99661](https://github.com/ClickHouse/ClickHouse/pull/99661) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复 Parquet 读取器在 filter-in-decoder path 遇到已过滤页面时的 nullptr 解引用问题。关闭了 [#99676](https://github.com/ClickHouse/ClickHouse/issues/99676)。[#99677](https://github.com/ClickHouse/ClickHouse/pull/99677) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 AsynchronousReadBufferFromFileDescriptor 在使用 O\_DIRECT 时错误的寻道操作。关闭了 [#99358](https://github.com/ClickHouse/ClickHouse/issues/99358)。[#99678](https://github.com/ClickHouse/ClickHouse/pull/99678) ([Pavel Kruglov](https://github.com/Avogar))。
* 修复了解压格式错误的压缩数据时，`CompressionCodecT64` 中的堆缓冲区溢出，以及 `CompressionCodecMultiple` 中的进程中止问题。这两个问题均由新的 libFuzzer 目标发现。现在这些编解码器会抛出异常，而不是发生崩溃。[#99680](https://github.com/ClickHouse/ClickHouse/pull/99680) ([Rahul](https://github.com/motsc)).
* 将处理推迟到服务器完成所有表的加载之后。[#99700](https://github.com/ClickHouse/ClickHouse/pull/99700) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 修复 MySQL 字典源在内联 DDL 参数场景下绕过 `RemoteHostFilter` 的问题。[#99720](https://github.com/ClickHouse/ClickHouse/pull/99720) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 修复遍历 `system.tables` 中的数据湖表时出现的逻辑错误。[#99739](https://github.com/ClickHouse/ClickHouse/pull/99739) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了带有预处理器的文本索引在分析使用 `IN` 函数的谓词时的问题。修复了文本索引中搜索标记发生冲突的问题，这可能导致结果不正确。[#99755](https://github.com/ClickHouse/ClickHouse/pull/99755) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复读取形状维度为负数的 `Npy` 格式文件时出现的无限循环问题。[#99812](https://github.com/ClickHouse/ClickHouse/pull/99812) ([Desel72](https://github.com/Desel72)) 。
* 修复了在查询计划头部计算过程中、按零行进行求值时，`CRC32` 函数处理 `FixedString` 参数会触发的 global-buffer-overflow 问题。 [#99835](https://github.com/ClickHouse/ClickHouse/pull/99835) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在 Iceberg 表上执行 `ALTER TABLE ... MODIFY COLUMN ... COMMENT` 时因空指针解引用导致的崩溃。[#99838](https://github.com/ClickHouse/ClickHouse/pull/99838) ([Desel72](https://github.com/Desel72)).
* 修复了 `aggregate_functions_null_for_empty` 设置，使其可与返回非 `Nullable` 类型 (如 `Array` 或 `Map`) 的聚合函数配合使用 (例如 `groupArray`、`sumMap`) 。[#99839](https://github.com/ClickHouse/ClickHouse/pull/99839) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在 `midpoint` 函数使用有符号/无符号混合整数类型调用时触发的 LOGICAL\_ERROR 异常。[#99867](https://github.com/ClickHouse/ClickHouse/pull/99867) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复带有 HAVING 子句的查询中出现的 "块结构不匹配" 异常：当过滤表达式同时包含由会生成 NULL 的函数包装的聚合，以及 `materialize(0)` 时，会触发该问题。[#99915](https://github.com/ClickHouse/ClickHouse/pull/99915) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了当 `data` 参数为键类型为 Array 的 Map 或其他嵌套 Array 类型时，`sipHash128Keyed` (以及类似的带密钥哈希函数) 中的断言失败问题。[#99921](https://github.com/ClickHouse/ClickHouse/pull/99921) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在使用 `convertAnyJoinToSemiOrAntiJoin` 优化查询计划期间，`IN` 函数中出现的 `LOGICAL_ERROR` 异常 "Set 未就绪"。[#99939](https://github.com/ClickHouse/ClickHouse/pull/99939) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* 通过移除重量级头文件包含，并将高开销的模板实例化移出头文件，缩短编译时间。[#97893](https://github.com/ClickHouse/ClickHouse/pull/97893) ([Raúl Marín](https://github.com/Algunenano)).
* 通过缩减模板分发矩阵并移除重量级包含，缩短算术函数及相关头文件的编译时间。[#98204](https://github.com/ClickHouse/ClickHouse/pull/98204) ([Raúl Marín](https://github.com/Algunenano)).
* 使用 `mongo-c-driver` 2.2.2。[#98304](https://github.com/ClickHouse/ClickHouse/pull/98304) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 使用 `postgres` REL\_18\_3。[#98306](https://github.com/ClickHouse/ClickHouse/pull/98306) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 为 UBSan 构建启用 jemalloc 分配器，以避免因 glibc malloc 内存回收能力较差而导致 RSS 累积。[#98444](https://github.com/ClickHouse/ClickHouse/pull/98444) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 使用 Rust v0 符号修饰，并从 PRQL 库中剥离内部符号，以减少解析器组合器库带来的符号名膨胀。[#98446](https://github.com/ClickHouse/ClickHouse/pull/98446) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 向 `tests/benchmarks` 添加 TPC-H 基准测试套件和 TPC-DS README。[#98495](https://github.com/ClickHouse/ClickHouse/pull/98495) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 为全部 99 个 TPC-DS 查询添加正确性测试。[#99204](https://github.com/ClickHouse/ClickHouse/pull/99204) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 添加一个集成测试，用于复现离线副本场景下 DDL CREATE TABLE + ALTER 的 bug ([#44070](https://github.com/ClickHouse/ClickHouse/issues/44070)) ，并将其标记为预期失败。[#99259](https://github.com/ClickHouse/ClickHouse/pull/99259) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 以 `je_` 前缀集成 jemalloc，并移除对链接器 `--wrap` 的使用。[#99342](https://github.com/ClickHouse/ClickHouse/pull/99342) ([Azat Khuzhin](https://github.com/azat)).

<div id="262">
  ### ClickHouse 26.2 版本发布，2026-02-26。[演示文稿](https://presentations.clickhouse.com/2026-release-26.2/)，[视频](https://www.youtube.com/watch?v=7qHba08vNfo)
</div>

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

* 默认情况下，所有插入操作都启用去重。此前，异步插入和 MV 的默认去重是关闭的，而同步插入则默认开启。此更改的目的是让这两种插入方式使用相同的默认设置。如果你在集群上显式禁用了去重，则必须显式设置 `deduplicate_insert='backward_compatible_choice'` 以保留原有行为。`deduplicate_blocks_in_dependent_materialized_views` 也是如此。[#95970](https://github.com/ClickHouse/ClickHouse/pull/95970) ([Sema Checherinda](https://github.com/CheSema)) 。
* 统计信息的存储格式已优化。现在，所有统计信息都存储在一个文件中。[#93414](https://github.com/ClickHouse/ClickHouse/pull/93414) ([Anton Popov](https://github.com/CurtizJ)) 。如果你没有明确启用表统计信息，可以忽略此项。
* 限制 S3(Azure)Queue 在内存中保存的元数据。系统表已从 `azure_queue` 更名为 `azure_queue_metadata_cache`，并将 `system.s3queue` 更名为 `s3queue_metadata_cache`。[#95809](https://github.com/ClickHouse/ClickHouse/pull/95809) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 此前，对 `Variant` 列应用函数时，如果变体子类型与函数不兼容，会静默返回 NULL；现在则会抛出异常，这可能会导致依赖这种静默返回 NULL 行为的查询失效。 [#95811](https://github.com/ClickHouse/ClickHouse/pull/95811) ([Bharat Nallan](https://github.com/bharatnc)).
* 来自 PostgreSQL 的 `DATE` 列现在在 ClickHouse 中会推断为 `Date32` (在之前的版本中，它们会被推断为 `Date`，这会导致超出较小范围的值发生溢出) 。现已支持将 `Date32` 值再插入 PostgreSQL。关闭 [#73084](https://github.com/ClickHouse/ClickHouse/issues/73084)。[#95999](https://github.com/ClickHouse/ClickHouse/pull/95999) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `do_not_merge_across_partitions_select_final` 设置的语义现在更加明确了。此前，如果未在 config 中显式设置该 setting，这一功能可能会被自动启用。这一行为反复引发困惑，而且遗憾的是，还在生产环境中导致了一些问题。现在，规则更简单了：`do_not_merge_across_partitions_select_final=1` 会无条件启用该功能。如果 `do_not_merge_across_partitions_select_final=0`，则仅当新的 setting `enable_automatic_decision_for_merging_across_partitions_for_final=1` 时才会使用自动模式，否则不会使用。为了尽可能保留旧行为，默认值被设置为 `do_not_merge_across_partitions_select_final=0` 和 `enable_automatic_decision_for_merging_across_partitions_for_final=1`。[#96110](https://github.com/ClickHouse/ClickHouse/pull/96110) ([Nikita Taranov](https://github.com/nickitat)) 。
* 现在，在创建显式指定列的 S3 表时，ClickHouse 会验证这些列名是否确实存在于远程文件的 schema 中。此前列名不匹配时仍可正常运行的查询，现在会在建表时失败。此更改修复了 [#96089](https://github.com/ClickHouse/ClickHouse/issues/96089)。[#96194](https://github.com/ClickHouse/ClickHouse/pull/96194) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 禁止在 ORDER BY 和其他表键表达式中使用子查询。[#96847](https://github.com/ClickHouse/ClickHouse/pull/96847) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 默认启用 `apply_row_policy_after_final`。最初，当 `optimize_move_to_prewhere_if_final=0` 时，ROW POLICY 和 PREWHERE 都会遵循 FINAL，并在 FINAL 之后生效。[#87303](https://github.com/ClickHouse/ClickHouse/issues/87303) 破坏了这一行为，因为它在 ROW POLICY 过滤器上忽略了 `optimize_move_to_prewhere_if_final`。为修复此问题，此 PR 启用了 [#91065](https://github.com/ClickHouse/ClickHouse/issues/91065) 中引入的设置 `apply_row_policy_after_final`。启用 `apply_row_policy_after_final` 后，ROW POLICY 将像之前一样默认继续遵循 FINAL。此 PR 属于不兼容变更，因为它改变了 `optimize_move_to_prewhere_if_final=1` 时的行为。现在，如果要让 ROW POLICY 在 FINAL 之前生效，应使用 `apply_row_policy_after_final`，而不是 `optimize_move_to_prewhere_if_final`。[#97279](https://github.com/ClickHouse/ClickHouse/pull/97279) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* `Date` 类型现在在 Arrow/ArrowStream 格式中会序列化为 Arrow 原生的 `date32` 类型，而不再是 `uint16`。像 PyArrow 这样的工具现在可以正确地将该列识别为日期类型。旧行为可通过 `output_format_arrow_date_as_uint16` 设置恢复。仍然支持读取旧版 Arrow 文件，这些文件对 `Date` 列使用了 `uint16`。[#96860](https://github.com/ClickHouse/ClickHouse/pull/96860) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

<div id="267-new-feature">
  #### 新特性
</div>

* 用户现在可以直接在 ClickHouse 中使用 ClickStack (一款可观测性 UI) ，这对调试和本地开发很有帮助。[#96597](https://github.com/ClickHouse/ClickHouse/pull/96597) ([Aaron Knudtson](https://github.com/knudtty)) 。
* 支持将基于时间的一次性密码 (TOTP) 用作身份验证方法。[#71273](https://github.com/ClickHouse/ClickHouse/pull/71273) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 新增 `lazy_load_tables` 数据库设置。启用后，数据库启动时不会加载表，而是先创建一个轻量级的 `StorageTableProxy`，并在首次访问时再将真实的表引擎 materialized。[#96283](https://github.com/ClickHouse/ClickHouse/pull/96283) ([xiaohuanlin](https://github.com/xiaohuanlin)) 。
* 新增了 `input_format_max_block_wait_ms` 设置，以便在超时后输出数据块，并允许在 HTTP 连接意外关闭时继续处理剩余数据。[#94509](https://github.com/ClickHouse/ClickHouse/pull/94509) ([Mostafa Mohamed Salah](https://github.com/Sasao4o)).
* Google BigLake catalog 集成。已关闭 [#95339](https://github.com/ClickHouse/ClickHouse/issues/95339)。[#97104](https://github.com/ClickHouse/ClickHouse/pull/97104) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 新增系统表 `system.tokenizers`，用于展示所有可用的分词器。[#96753](https://github.com/ClickHouse/ClickHouse/pull/96753) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 新增系统表 `system.user_defined_functions`，用于监控 UDF 的加载状态及其配置。[#90340](https://github.com/ClickHouse/ClickHouse/pull/90340) ([Xu Jia](https://github.com/XuJia0210)) 。
* 新增 `system.jemalloc_stats` 表，用于公开 jemalloc 内存分配器的统计信息 (通过 `malloc_stats_print`) ，以便诊断使用 jemalloc 构建的服务器上的内存使用情况。另在 ClickHouse HTTP interface 上新增了 `/jemalloc.html` HTTP 端点，用于以交互方式可视化这些统计信息。[#97077](https://github.com/ClickHouse/ClickHouse/pull/97077) ([Antonio Andelic](https://github.com/antonio2368)).
* 新增了 `system.jemalloc_profile_text` 表，用于读取和分析 jemalloc 堆内存剖析数据。输出格式由 `jemalloc_profile_text_output_format` 设置控制 (raw、symbolized 或 collapsed；默认为 collapsed) 。内联帧解析由 `jemalloc_profile_text_symbolize_with_inline` 控制 (启用时，会包含内联帧，但符号化速度会变慢；禁用时，则会跳过内联帧以加快输出) 。对于 collapsed 格式，`jemalloc_profile_text_collapsed_use_count` 控制技术栈是按存活分配次数 (true) 还是按存活字节数 (false，默认) 加权。这使 jemalloc 堆内存剖析的内存分析和火焰图可视化更加便捷。修复了 [#93248](https://github.com/ClickHouse/ClickHouse/issues/93248)。[#97218](https://github.com/ClickHouse/ClickHouse/pull/97218) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 新增 `default_dictionary_database` 设置，使 ClickHouse 能够在指定的默认数据库中解析未带数据库限定符的 external dictionaries 引用。这简化了从以 XML 定义的全局字典迁移到以 SQL 定义的按数据库划分的字典——让现有的字典查询 (例如 dictGet('name', …)) 无需修改即可继续使用。[#91412](https://github.com/ClickHouse/ClickHouse/pull/91412) ([Dmitrii Plotnikov](https://github.com/dimbo4ka)) 。
* 为 `DatabaseReplicated` 添加对辅助 ZooKeeper 的支持。[#91683](https://github.com/ClickHouse/ClickHouse/pull/91683) ([RinChanNOW](https://github.com/RinChanNOWWW)) 。
* 新增了表函数 `primes` 和系统表 `system.primes`，其中包含按升序排列的质数。关闭 [#90839](https://github.com/ClickHouse/ClickHouse/issues/90839)。[#92776](https://github.com/ClickHouse/ClickHouse/pull/92776) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 异步插入支持并行 quorum。插入的数据会复制到满足 quorum 的副本上。如果发现重复项，查询会等待，直到先前插入的数据也完成复制。[#93356](https://github.com/ClickHouse/ClickHouse/pull/93356) ([Sema Checherinda](https://github.com/CheSema)).
* 新增函数 `colorOKLABToSRGB` 和 `colorSRGBToOKLAB`，用于在 sRGB 与 OKLAB 之间相互转换值。[#93361](https://github.com/ClickHouse/ClickHouse/pull/93361) ([Pranav Tiwari](https://github.com/pranavt84)).
* 新增 `deduplicate_insert` 设置，用于覆盖 `insert_deduplicate` 和 `async_insert_deduplicate`。[#94413](https://github.com/ClickHouse/ClickHouse/pull/94413) ([Sema Checherinda](https://github.com/CheSema)) 。
* 服务器级设置 `insert_deduplication_version` 支持迁移到统一的去重哈希。[#95409](https://github.com/ClickHouse/ClickHouse/pull/95409) ([Sema Checherinda](https://github.com/CheSema)) 。
* 新增 `xxh3_128` 哈希函数。[#96055](https://github.com/ClickHouse/ClickHouse/pull/96055) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增了 `OPTIMIZE <table> DRY RUN PARTS <part names>` 查询，可在不提交结果分片的情况下模拟合并操作。它可用于测试场景：验证新版本中合并操作的正确性、确定性地复现与合并相关的 bug，以及可靠地对合并性能进行基准测试。[#96122](https://github.com/ClickHouse/ClickHouse/pull/96122) ([Anton Popov](https://github.com/CurtizJ)).
* 新增一项默认启用的检查，可通过设置 `check_named_collection_dependencies` 控制，以避免删除被表使用的命名集合。[#96181](https://github.com/ClickHouse/ClickHouse/pull/96181) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 新增了 `system.fail_points`，可用于查看服务器中现有的 failpoint 以及它们是否已启用。这将有助于实现测试自动化。[#96762](https://github.com/ClickHouse/ClickHouse/pull/96762) ([Pedro Ferreira](https://github.com/PedroTadim)) 。
* 为 Glue catalog 添加基于角色的访问。使用 `aws_role_arn` 设置，以及可选的 `aws_role_session_name` 设置。[#90825](https://github.com/ClickHouse/ClickHouse/pull/90825) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 新增设置 `add_minmax_index_for_temporal_columns`；启用后，会自动为所有 `Date`、`Date32`、`Time`、`Time64`、`DateTime` 和 `DateTime64` 列创建 MinMax 索引。[#93355](https://github.com/ClickHouse/ClickHouse/pull/93355) ([Michael Jarrett](https://github.com/EmeraldShift)) 。
* 支持用于 JOIN 的扩展表别名 (例如 `SELECT * FROM (SELECT 1) AS t(a) JOIN (SELECT 1) AS u(b) ON a = b` 这样的查询) 。已关闭 [#95131](https://github.com/ClickHouse/ClickHouse/issues/95131)。[#95331](https://github.com/ClickHouse/ClickHouse/pull/95331) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 新增了对 Iceberg 表执行 `ALTER TABLE RENAME COLUMN` 的支持。此前仅支持 `ADD COLUMN, DROP COLUMN, and MODIFY COLUMN`。[#97455](https://github.com/ClickHouse/ClickHouse/pull/97455) ([murphy-4o](https://github.com/murphy-4o)) 。

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

* 文本索引现已 GA。[#96794](https://github.com/ClickHouse/ClickHouse/pull/96794) ([Robert Schulze](https://github.com/rschu1ze))。
* 用于量化位打包向量存储 (用于近似最近邻搜索) 的 `QBit` 数据类型现已正式可用，不再需要启用实验性设置。[#95358](https://github.com/ClickHouse/ClickHouse/pull/95358) ([Raufs Dunamalijevs](https://github.com/rienath))。
* ClickHouse 中的向量搜索现在可以利用集群中的副本来\_分摊\_负载，并搜索向量索引 parts。这使 ClickHouse 能够支持超出单台 VM 内存容量的大型向量索引。[#95876](https://github.com/ClickHouse/ClickHouse/pull/95876) ([Shankar Iyer](https://github.com/shankar-iyer))。
* 新增由 `ast_fuzzer_runs` 和 `ast_fuzzer_any_query` 设置控制的服务端 AST fuzzer。启用后，服务器会在每个查询正常执行完毕后，对其随机变更版本再次执行，并丢弃结果。[#97568](https://github.com/ClickHouse/ClickHouse/pull/97568) ([Alexey Milovidov](https://github.com/alexey-milovidov))。
* 在实验性的 KQL 方言中新增 `iif` 函数。[#94790](https://github.com/ClickHouse/ClickHouse/pull/94790) ([happyso](https://github.com/sunyeongchoi))。
* schema 推断现在会遵循 `allow_experimental_nullable_tuple_type`。启用后，推断出的 Tuple 类型可以为 `Nullable(Tuple(...))`，这样缺失的嵌套对象就会变为 `NULL`，而不是由 `NULL` 元素组成的 Tuple。[#95525](https://github.com/ClickHouse/ClickHouse/pull/95525) ([Nihal Z. Miaji](https://github.com/nihalzp))。
* `use_statistics_cache` 设置现已默认启用，因此列统计信息会缓存在内存中，从而加快查询优化，而无需从每个 part 重新加载。[#95950](https://github.com/ClickHouse/ClickHouse/pull/95950) ([Han Fei](https://github.com/hanfei1991))。

<div id="267-performance-improvement">
  #### 性能提升
</div>

* 允许将主键中的任何确定性表达式用于数据跳过 (例如 `ORDER BY cityHash64(user_id)`/ `ORDER BY length(user_id)`) 。对于确定性表达式，ClickHouse 可以将该表达式应用到查询常量上，并在主键索引中使用其结果来处理 `=`、`IN` 和 `has` 等谓词。如果该表达式还是单射的 (例如 `ORDER BY hex(p)` 或 `ORDER BY reverse(tuple(reverse(p), hex(p)))`) ，我们还可以有效地将索引用于其否定形式：`!=`、`NOT IN` 和 `NOT has`。解决了 [#10685](https://github.com/ClickHouse/ClickHouse/issues/10685)。解决了 [#82161](https://github.com/ClickHouse/ClickHouse/issues/82161)。[#92952](https://github.com/ClickHouse/ClickHouse/pull/92952) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 优化了统计信息的存储格式。现在，所有统计信息都存储在一个文件中。[#93414](https://github.com/ClickHouse/ClickHouse/pull/93414) ([Anton Popov](https://github.com/CurtizJ)) 。
* 支持对文件系统缓存中的远程表引擎/函数进行并行读取。[#71781](https://github.com/ClickHouse/ClickHouse/pull/71781) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 允许在本地文件和对象存储表函数中使用用户态页缓存。[#77874](https://github.com/ClickHouse/ClickHouse/pull/77874) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 避免用户态页缓存中不必要的 memcpy 操作。[#77884](https://github.com/ClickHouse/ClickHouse/pull/77884) ([Michael Kolupaev](https://github.com/al13n321)) 。
* `concurrent_threads_scheduler` 的默认值现已由 `fair_round_robin` 改为 `max_min_fair`。这一调整通过优先处理已分配槽位较少的查询，提升了高负载下的公平性，从而避免短时查询因长时查询而吃亏。[#95300](https://github.com/ClickHouse/ClickHouse/pull/95300) ([Sergei Trifonov](https://github.com/serxa)).
* 如果某个 `FINAL` 查询先使用主键条件进行过滤，再对其他条件使用跳过索引，那么 `PrimaryKeyExpand` 处理步骤现在只会检查最初筛选出的主键范围是否相交。[#94903](https://github.com/ClickHouse/ClickHouse/pull/94903) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 当并行副本与 `s3(...)` 等表函数配合使用时，仅包含一个封装该表函数的子查询的查询现在也会自动在各个副本间并行执行；而此前只有直接引用表函数的查询才会并行执行。关闭 [#92264](https://github.com/ClickHouse/ClickHouse/issues/92264)。[#96332](https://github.com/ClickHouse/ClickHouse/pull/96332) ([phulv94](https://github.com/phulv94)).
* 支持将缓存中的数据文件和系统文件分别拆分到独立的分段中。[#87834](https://github.com/ClickHouse/ClickHouse/pull/87834) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 通过为 `ColumnVector::replicate` 实现动态分派，提升了某些哈希 join 操作的速度。[#79573](https://github.com/ClickHouse/ClickHouse/pull/79573) ([Raúl Marín](https://github.com/Algunenano)) 。
* 针对复杂谓词场景下的并行哈希连接进行了性能提升。此前，未连接的行仅由单个线程处理，这样的效率并不理想；此次优化的思路是将未连接行的处理并行化，分配到多个线程中执行。可通过 `parallel_non_joined_rows_processing` 设置控制。默认启用。 [#92068](https://github.com/ClickHouse/ClickHouse/pull/92068) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 小幅优化 JSON 类型的解析。[#93614](https://github.com/ClickHouse/ClickHouse/pull/93614) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 优化 AST 的内存占用。在未启用高亮且不解析 VALUES 时，这些字段不会被使用，因此这项优化是合理的。[#93974](https://github.com/ClickHouse/ClickHouse/pull/93974) ([Ilya Yatsishin](https://github.com/qoega)) 。
* 优化命名 Tuple AST 对象的内存占用。将列名作为字符串存放在 tuple 对象中，而不是存放在通用的 AST 字面量节点中。[#94704](https://github.com/ClickHouse/ClickHouse/pull/94704) ([Ilya Yatsishin](https://github.com/qoega)) 。
* 通过增加额外的链接器选项，去虚拟化得到了改进。[#94737](https://github.com/ClickHouse/ClickHouse/pull/94737) ([Nikita Taranov](https://github.com/nickitat)).
* 通过批量处理 ZooKeeper 请求，提升包含大量 parts 的 ReplicatedMergeTree 表的副本克隆性能。[#94847](https://github.com/ClickHouse/ClickHouse/pull/94847) ([c-end](https://github.com/c-end)) 。
* 当 read step 已有 PREWHERE 过滤器时，就无法再添加新的过滤器。此更改将 PREWHERE 优化推迟到 JOIN 运行时过滤器优化之后，以便也能将运行时过滤器下推到 PREWHERE。 [#95838](https://github.com/ClickHouse/ClickHouse/pull/95838) ([Alexander Gololobov](https://github.com/davenger)).
* 通过在 x86 上使用动态分派，加速 `T64` 编解码器的压缩。 [#95881](https://github.com/ClickHouse/ClickHouse/pull/95881) ([Raúl Marín](https://github.com/Algunenano)).
* 在可能的情况下，通过对插入操作进行批处理来加速数值类型上的 `uniq` (非 NULL、非 -If、无 GROUP BY、无 IPv6 或 String) 。[#95904](https://github.com/ClickHouse/ClickHouse/pull/95904) ([Raúl Marín](https://github.com/Algunenano)) 。
* Keeper 的底层优化：经发现，`ZooKeeper::observeOperations` 占 ZooKeeper 接收线程 CPU 占用的 >20%。此次更改通过以下方式对此进行优化：1. 对于 `AggregatedZooKeeperLog::stats`，使用 `CityHash64` 替代 `SipHash`，速度快 >10 倍。2. 对于 `Coordination::ErrorCounter`，使用 `std::array<std::atomic<UInt32>, N>` 替代 `std::unordered_map` 和 `std::mutex`。[#95962](https://github.com/ClickHouse/ClickHouse/pull/95962) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 取消 ProfileEvents::Counter 的 64 字节对齐以节省内存。[#96097](https://github.com/ClickHouse/ClickHouse/pull/96097) ([Azat Khuzhin](https://github.com/azat)) 。
* 内存优化：将 `CachedOnDiskReadBufferFromFile` 结构体的大小缩小了 50 倍。[#96098](https://github.com/ClickHouse/ClickHouse/pull/96098) ([Azat Khuzhin](https://github.com/azat)).
* 如果哈希表为空，调整大小时不要复制旧数据。[#96180](https://github.com/ClickHouse/ClickHouse/pull/96180) ([Raúl Marín](https://github.com/Algunenano)).
* 支持在 `RIGHT OUTER` JOIN 中使用运行时过滤器。[#96183](https://github.com/ClickHouse/ClickHouse/pull/96183) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 优化项 `enable_join_runtime_filters` 现在默认启用。[#89314](https://github.com/ClickHouse/ClickHouse/pull/89314) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 此前，只有当所有 parts 都具有 materialized 文本索引时，才会应用文本索引直接读取优化。此 PR 新增了部分支持：如果某些 parts 具有 materialized 文本索引，这些 parts 将使用该索引；而没有 materialized 文本索引的 parts 则会回退到执行原始过滤表达式。[#96411](https://github.com/ClickHouse/ClickHouse/pull/96411) ([Anton Popov](https://github.com/CurtizJ)).
* 为系统日志表中的时间列添加了 `minmax` 次级索引，并为 `query_id`/`initial_query_id` 列添加了 `bloom_filter` 索引，以提升过滤速度。[#96712](https://github.com/ClickHouse/ClickHouse/pull/96712) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 现在，惰性物化优化已扩展到 `UNION ALL` 查询的所有分支，不再仅作用于第一个分支。对于通过 `UNION ALL` 组合来自不同 `MergeTree` 表的多个已排序且带 LIMIT 的读取操作的查询，现在每个分支都能受益于延迟列读取，从而减少 I/O。[#96832](https://github.com/ClickHouse/ClickHouse/pull/96832) ([Federico Ginosa](https://github.com/menxit)).
* 通过移除不必要的数据拷贝，并为数值列启用向量化的最小/最大值计算，优化 INSERT 期间 minmax 跳过索引的计算。[#97392](https://github.com/ClickHouse/ClickHouse/pull/97392) ([Raúl Marín](https://github.com/Algunenano)).
* `DeltaLake` 存储现会从 Delta Lake 元数据中获取 `count()` 的结果，并在 system.tables 中显示正确的表统计信息 (总字节数/总行数) 。[#96190](https://github.com/ClickHouse/ClickHouse/pull/96190) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 如果从 MergeTree 读取，未使用的列也会在读取阶段被移除。当过滤器被下推到 `PREWHERE` 时，这项优化尤其有用。[#89982](https://github.com/ClickHouse/ClickHouse/pull/89982) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 通过仅拉取表名，优化了 `SHOW TABLES` 查询的处理，并改进了 getLightweightTablesIterator，使其仅返回包含表名的结构。解决了 [#93835](https://github.com/ClickHouse/ClickHouse/issues/93835)。[#94467](https://github.com/ClickHouse/ClickHouse/pull/94467) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 改进 `assumeNotNull`、`coalesce` 和 `ifNull`：当键列被这些函数包裹时，可针对范围谓词启用主键和跳过索引剪枝。关闭 [#94689](https://github.com/ClickHouse/ClickHouse/issues/94689)。[#94754](https://github.com/ClickHouse/ClickHouse/pull/94754) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 为 Keeper 的 getChildren 请求添加 with\_data 和 with\_stat 扩展。这样一来，一次操作不仅可以拉取子节点列表，还能获取它们的 `stat` 和/或 `data`。[#94826](https://github.com/ClickHouse/ClickHouse/pull/94826) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 无论最终执行的是本地 plan，还是带有并行副本的 plan，索引分析 (在大多数情况下) 都只需进行一次。 [#94854](https://github.com/ClickHouse/ClickHouse/pull/94854) ([Nikita Taranov](https://github.com/nickitat)) 。
* 支持根据 parts 数量 (`distributed_index_analysis_min_parts_to_activate`) 和索引大小 (`distributed_index_analysis_min_indexes_size_to_activate`) 启用分布式索引分析。[#95216](https://github.com/ClickHouse/ClickHouse/pull/95216) ([Azat Khuzhin](https://github.com/azat)) 。
* 为 Iceberg 表启用 PREWHERE 优化。[#95476](https://github.com/ClickHouse/ClickHouse/pull/95476) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 降低某些 AST 类的内存占用。[#95514](https://github.com/ClickHouse/ClickHouse/pull/95514) ([Raúl Marín](https://github.com/Algunenano)) 。
* 限制在启用 `split_intersecting_parts_ranges_into_layers` 时生成的管道流数量，以避免内存消耗过高。[#96478](https://github.com/ClickHouse/ClickHouse/pull/96478) ([Nikita Taranov](https://github.com/nickitat)).
* 为多个连接实现等价集合优化。包含多个连续 `INNER JOIN` 操作的查询现在可受益于改进后的过滤器下推优化。当表基于等价列进行连接时 (例如，`t1 JOIN t2 ON t1.id = t2.id JOIN t3 ON t2.id = t3.id WHERE t1.id > 10`) ，应用于该连接链中任意表的过滤器都会自动下推到所有表。关闭 [#96550](https://github.com/ClickHouse/ClickHouse/issues/96550)。[#96596](https://github.com/ClickHouse/ClickHouse/pull/96596) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 优化 delta lake 元数据扫描。采用了 delta-kernel PR [https://github.com/delta-io/delta-kernel-rs/pull/1827](https://github.com/delta-io/delta-kernel-rs/pull/1827) 中的变更。[#96686](https://github.com/ClickHouse/ClickHouse/pull/96686) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 Replicated database 中，不必为每个虚拟查询都更新已缓存的集群。[#96897](https://github.com/ClickHouse/ClickHouse/pull/96897) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 如果前缀只包含 ASCII 字符，则在使用 `startsWithUTF8` 进行过滤时会使用主键索引。[#97055](https://github.com/ClickHouse/ClickHouse/pull/97055) ([vkcku](https://github.com/vkcku)).

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

* 为 Keeper 请求添加 OpenTelemetry 链路追踪。[#91332](https://github.com/ClickHouse/ClickHouse/pull/91332) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新的配置选项：`logger.startup_console_level` & `logger.shutdown_console_level`，分别用于在 ClickHouse 启动和关闭期间覆盖控制台的日志级别。[#95919](https://github.com/ClickHouse/ClickHouse/pull/95919) ([Garrett Thomas](https://github.com/garrettthomaskth)) 。
* 重新加载配置时遵循命令行覆盖设置。关闭 [#80294](https://github.com/ClickHouse/ClickHouse/issues/80294)。[#80295](https://github.com/ClickHouse/ClickHouse/pull/80295) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 允许在 `mongodb` 表函数中以键值对方式覆盖命名集合参数。[#89616](https://github.com/ClickHouse/ClickHouse/pull/89616) ([vanchaklar](https://github.com/vanchaklar)).
* 现在，Iceberg 表的按序读取优化也支持 `icebergBucket` 和 `icebergTruncate` 这类复杂排序函数，不再局限于简单的列引用。[#90256](https://github.com/ClickHouse/ClickHouse/pull/90256) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 在 system.mutations 中新增一个名为 parts\_postpone\_reasons 的列，以增强诊断能力，用于显示 parts 的延迟原因。[#92206](https://github.com/ClickHouse/ClickHouse/pull/92206) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 在 `DataflowStatisticsCache` 中跟踪待读取行数的变化 (由插入/删除操作或查询条件缓存的使用导致) 。[#93636](https://github.com/ClickHouse/ClickHouse/pull/93636) ([Nikita Taranov](https://github.com/nickitat)) 。
* 支持 SYSTEM RESET DDL WORKER \[ON CLUSTER] 查询。该查询会请求在 DDLWorker 的主线程中重置其状态。当 host ID 更新时，这有助于刷新副本的活跃状态。[#93780](https://github.com/ClickHouse/ClickHouse/pull/93780) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 在 `system.part_log` 中为 `MUTATE_PART` 和 `MUTATE_PART_START` 事件类型添加了对 `mutation_ids` 的支持。[#93811](https://github.com/ClickHouse/ClickHouse/pull/93811) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 后台操作 (Mutate、Merge) 现在可通过 'background' profile 单独配置。此前，这类操作通过 'default' profile 与常规查询共用设置。[#93905](https://github.com/ClickHouse/ClickHouse/pull/93905) ([Arsen Muk](https://github.com/arsenmuk)).
* 向 `system.crash_log` 中添加更多信息。[#94112](https://github.com/ClickHouse/ClickHouse/pull/94112) [#95857](https://github.com/ClickHouse/ClickHouse/pull/95857) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增了 `QueryNonInternal` 指标，用于跟踪当前正在执行的非内部查询数量。该指标以 `ClickHouseMetrics_QueryNonInternal` 的形式暴露，帮助运维人员针对 `max_concurrent_queries` 限制监控查询并发度，而该限制仅适用于非内部查询。[#94284](https://github.com/ClickHouse/ClickHouse/pull/94284) ([Ashwath Singh](https://github.com/ashwath)).
* 在 `RuntimeDataflowStatisticsCacheUpdater` 中支持收集来自 compact parts 的列的输入字节统计信息。[#94626](https://github.com/ClickHouse/ClickHouse/pull/94626) ([Nikita Taranov](https://github.com/nickitat)) 。
* 增加一项检查，用于发现可能导致集群组建失败的 Keeper 配置错误。关闭了 [#60932](https://github.com/ClickHouse/ClickHouse/issues/60932)。[#94682](https://github.com/ClickHouse/ClickHouse/pull/94682) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 改进分片加载期间对 JSON 前缀的反序列化。[#94848](https://github.com/ClickHouse/ClickHouse/pull/94848) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 将写入流程重构为使用完整的 INSERT 管道，以触发目标表上的 materialized views。 [#94890](https://github.com/ClickHouse/ClickHouse/pull/94890) ([Kai Zhu](https://github.com/nauu)).
* 仅当搜索列上存在索引时，才使用向量相似性搜索的查询计划优化。[#94998](https://github.com/ClickHouse/ClickHouse/pull/94998) ([Eduard Karacharov](https://github.com/korowa)) 。
* 在用户身份验证之前检查总内存限制；如果总限制超过允许值，则抛出 `(total) memory limit exceeded`。[#95003](https://github.com/ClickHouse/ClickHouse/pull/95003) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 新增了 `throw_on_unmatched_row_policies` 配置选项；启用后，如果用户查询的表存在行策略，但其中没有任何一条适用于该用户，则会抛出异常，从而避免因访问控制配置错误而返回所有行这种语义含糊的行为。 [#95014](https://github.com/ClickHouse/ClickHouse/pull/95014) ([Vitaly Baranov](https://github.com/vitlibar)).
* 在使用 Unity Catalog 的长时间运行查询中动态更新 S3 访问令牌。此更改关闭了 [#93981](https://github.com/ClickHouse/ClickHouse/issues/93981)。[#95069](https://github.com/ClickHouse/ClickHouse/pull/95069) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 如果 ClickHouse 持续处于内存压力下达 `memory_worker_decay_adjustment_period_ms` 毫秒，则禁用 jemalloc 的脏页衰减。如果 ClickHouse 在相同时间内恢复正常运行，则重新启用 jemalloc 的脏页衰减。[#95145](https://github.com/ClickHouse/ClickHouse/pull/95145) ([Antonio Andelic](https://github.com/antonio2368)) 。
* S3Queue 现已支持辅助 ZooKeeper，可使用 s3Queue 中的 `keeper_path` 设置。[#95203](https://github.com/ClickHouse/ClickHouse/pull/95203) ([Diego Nieto](https://github.com/lesandie)) 。
* 在生存时间 (TTL) drop part merge 中遵循 `max_parts_to_merge_at_once` 限制。[#95315](https://github.com/ClickHouse/ClickHouse/pull/95315) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 向 query\_log 添加 `connection_address` 和 `connection_port`，以反映物理连接 (当通过 proxy 连接且 auth\_use\_forwarded\_address=1 时，`address` 和 `port` 会被替换) 。[#95471](https://github.com/ClickHouse/ClickHouse/pull/95471) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了查询条件缓存的内存统计错误。问题的关键在于，之前没有将由多个字符串组成的缓存键计入统计 (例如 part\_name、表 ID 以及整个 SQL 条件) 。[#95478](https://github.com/ClickHouse/ClickHouse/pull/95478) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 使用嵌入式配置启动的服务器将像常规配置一样，支持管理用户和授权，并将其保存到 `access` 目录中。这改进了测试体验。此外，还在嵌入式配置和 clickhouse-local 中启用了所有 access\_control\_improvements。[#95481](https://github.com/ClickHouse/ClickHouse/pull/95481) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进了 S3 身份验证错误消息：当访问被拒绝时，会提示检查凭据。[#95648](https://github.com/ClickHouse/ClickHouse/pull/95648) ([Gerald Latkovic](https://github.com/batkovic75)) 。
* 启用统计信息缓存，并将缓存更新周期设置为 300 秒。[#95841](https://github.com/ClickHouse/ClickHouse/pull/95841) ([Han Fei](https://github.com/hanfei1991)).
* 为 `system.aggregated_zookeeper_log` 添加组件名称。[#95882](https://github.com/ClickHouse/ClickHouse/pull/95882) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 从 `system.tables` 查询 `DeltaLake` 表时，跳过对对象存储的读取。[#95899](https://github.com/ClickHouse/ClickHouse/pull/95899) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 当 `compatibility` 设置为 `26.2` 或更高版本时，默认启用 `enable_max_bytes_limit_for_min_age_to_force_merge`。[#95917](https://github.com/ClickHouse/ClickHouse/pull/95917) ([Christoph Wurm](https://github.com/cwurm)) 。
* Delta Lake 现已可在 macOS 上使用。修复 #95979。[#95985](https://github.com/ClickHouse/ClickHouse/pull/95985) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在先前版本中，将存在冲突的 ALTER 表达式与 UPDATE 和 RENAME COLUMN 组合使用时，抛出的是逻辑错误，而不是正确的异常。关闭了 [#70678](https://github.com/ClickHouse/ClickHouse/issues/70678)。[#96022](https://github.com/ClickHouse/ClickHouse/pull/96022) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 改进所有 ClickHouse 应用程序的帮助输出，新增 `--no-sudo` 选项，并修复了一些问题。这是对 [Ilya Yatsishin](https://github.com/qoega) 提交的 [#58244](https://github.com/ClickHouse/ClickHouse/issues/58244) 的延续。[#96025](https://github.com/ClickHouse/ClickHouse/pull/96025) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 `cosineDistance` 新增 `distanceCosine` 别名，因为其他所有距离函数都已有这种形式的别名。[#96065](https://github.com/ClickHouse/ClickHouse/pull/96065) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 新增对 `with_data` Keeper 扩展的支持，以改进 Database Replicated 中的表拉取能力。[#96090](https://github.com/ClickHouse/ClickHouse/pull/96090) ([Nikolay Degterinsky](https://github.com/evillique)).
* 将 chdig 更新至 [v26.2.1](https://github.com/azat/chdig/releases/tag/v26.2.1) (新增功能并支持 MacOS) 。[#96113](https://github.com/ClickHouse/ClickHouse/pull/96113) ([Azat Khuzhin](https://github.com/azat)) 。
* 改进了 `numbers` 和 `primes` 的过滤器下推。现在，当无法推导出精确边界时，ClickHouse 可以根据 `WHERE` 条件推导出保守的取值边界，并据此限制序列生成 (例如，对于 `WHERE number % 5 < 2 AND number > 100 AND number < 300`，ClickHouse 只会生成 100 到 300 之间的数字，然后再应用谓词) ，从而避免无界扫描。关闭 [#84853](https://github.com/ClickHouse/ClickHouse/issues/84853)。关闭 [#93913](https://github.com/ClickHouse/ClickHouse/issues/93913)。[#96115](https://github.com/ClickHouse/ClickHouse/pull/96115) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 此前，当存在 `COMMENT` 子句时，为避免解析歧义，格式说明符会用括号将 SELECT 括起来。现在改为在 `AS SELECT` 之前输出 `COMMENT`，无需加括号也能消除歧义。[#96293](https://github.com/ClickHouse/ClickHouse/pull/96293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `allow_impersonate_user` 配置项现已移至 `access_control_improvements` 部分中，不再作为独立的服务器级设置。[#96451](https://github.com/ClickHouse/ClickHouse/pull/96451) ([Vitaly Baranov](https://github.com/vitlibar)).
* 使 `core_dump.size_limit` 配置项支持热重载，避免为使配置更改生效而必须重启服务器。[#96524](https://github.com/ClickHouse/ClickHouse/pull/96524) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 改进了 CPU 和实时 Profiler 与套接字超时机制之间的兼容性。[#96601](https://github.com/ClickHouse/ClickHouse/pull/96601) ([Sergei Trifonov](https://github.com/serxa)) 。
* 如果在 DROP COLUMN 变更后很快执行 ADD COLUMN，可防止已删除的数据重新出现。[#96713](https://github.com/ClickHouse/ClickHouse/pull/96713) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `system.instrumentation` 中的 `function_id` 类型从 LowCardinality(Int32) 改为 Int32。[#96726](https://github.com/ClickHouse/ClickHouse/pull/96726) (Copilot) 。
* 同步等待变更时，将遵循查询取消和时限。[#96756](https://github.com/ClickHouse/ClickHouse/pull/96756) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 新增了系统命令 `SYSTEM RELOAD DELTA KERNEL TRACING <level>`，可用于调整 delta-kernel 日志，这在调试时可能很有帮助。[#96763](https://github.com/ClickHouse/ClickHouse/pull/96763) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 按 IP 地址家族进行过滤 (即 `dns_allow_resolve_names_to_ipv4/ipv6` 设置) 即使在禁用 DNS 缓存时也会生效。[#96810](https://github.com/ClickHouse/ClickHouse/pull/96810) ([c-end](https://github.com/c-end)) 。
* 改进 jemalloc 内部信息。[#96840](https://github.com/ClickHouse/ClickHouse/pull/96840) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `/play` Web UI 查询系统表时抛出 `QUERY_CACHE_USED_WITH_SYSTEM_TABLE` 的问题。[#96869](https://github.com/ClickHouse/ClickHouse/pull/96869) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 改进 Web UI：更改 favicon 以指示查询运行状态；显示辅助查询 (加载数据库和表) 返回的错误，而不是悄悄忽略它们。关闭 [#85055](https://github.com/ClickHouse/ClickHouse/issues/85055)。[#96883](https://github.com/ClickHouse/ClickHouse/pull/96883) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 使 `/play` UI 中的左侧面板支持点击，以切换数据库列表的显示状态。[#96884](https://github.com/ClickHouse/ClickHouse/pull/96884) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `DROP DATABASE` 现在会按依赖关系的逆序删除表，从而在数据库包含存在加载依赖项的表 (例如使用 `joinGet` 的 `Distributed` 表) 时提高崩溃安全性。[#97057](https://github.com/ClickHouse/ClickHouse/pull/97057) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 升级 yaml-cpp，以防无效的 YAML 被跳过。[#97333](https://github.com/ClickHouse/ClickHouse/pull/97333) ([Azat Khuzhin](https://github.com/azat)) 。
* 在拉取表期间，在 `play.html` 侧边栏显示加载指示器。[#97531](https://github.com/ClickHouse/ClickHouse/pull/97531) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在内置 web UI (play.html) 中，为原始查询结果新增了一个复制到剪贴板的按钮。[#97532](https://github.com/ClickHouse/ClickHouse/pull/97532) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复查询混淆器 (`clickhouse-format --obfuscate`) ，使其在更多情况下生成可被解析的 SQL。[#97584](https://github.com/ClickHouse/ClickHouse/pull/97584) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。

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

* 在仅修改 metadata 的 ALTER 操作 (例如扩展枚举的元素) 之后，使用投影优化聚合时最终可能会导致异常。[#84143](https://github.com/ClickHouse/ClickHouse/pull/84143) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* materialized views 现在会使用其创建所在的 database 作为执行上下文，这意味着：- 可以在视图的 select 查询中省略所引用名称的显式 database 限定 - 如果未显式指定 database 限定，则默认使用创建 materialized view 时所在的同一个 database。 [#88193](https://github.com/ClickHouse/ClickHouse/pull/88193) ([Dmitry Kovalev](https://github.com/dk-github)).
* 修复了在使用 ON CLUSTER 时，CREATE USER 身份验证方法中的查询参数替换问题。身份验证方法中的查询参数 (例如密码) 此前不会被替换，导致远程节点上出现 UNKNOWN\_QUERY\_PARAMETER 错误。[#92777](https://github.com/ClickHouse/ClickHouse/pull/92777) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* 修复了 `has`、`mapContainsKey` 和 `mapContainsValue` 函数在文本索引分析中的结果不一致问题。此前，使用这些函数的查询在表达式通过文本索引求值或不通过文本索引求值时，可能返回不同的结果。[#93578](https://github.com/ClickHouse/ClickHouse/pull/93578) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在将表附加到 `MaterializedPostgreSQL` 数据库时，若 `dropReplicationSlot` 在栈展开过程中抛出异常而导致崩溃的问题。[#96871](https://github.com/ClickHouse/ClickHouse/pull/96871) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 如果同时对同一文件执行大量彼此冲突的备份操作，可能会导致服务器崩溃。[#93659](https://github.com/ClickHouse/ClickHouse/pull/93659) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在使用并行副本且对非 MT 表执行 JOIN 时的查询问题。关闭 [#92056](https://github.com/ClickHouse/ClickHouse/issues/92056)。[#93902](https://github.com/ClickHouse/ClickHouse/pull/93902) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 修复了一个问题：当 Iceberg 列名中包含点号时，其值会返回为 NULL。[#94335](https://github.com/ClickHouse/ClickHouse/pull/94335) ([Mikhail Koviazin](https://github.com/mkmkme)).
* 修复了 `stringJaccardIndexUTF8` 中 UTF8 字符串处理的问题，并提升了性能。[#94613](https://github.com/ClickHouse/ClickHouse/pull/94613) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 修复 `WITH FILL STALENESS` 中可能发生的溢出问题 (会导致 UB 和/或无限循环) 。修复因跨度过大而导致的潜在无限循环。新增对旧 analyzer 的支持 (主要用于压力测试) 。[#94663](https://github.com/ClickHouse/ClickHouse/pull/94663) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在主机名解析到多个地址且远程副本冻结时，分布式查询可能挂起的问题。[#94726](https://github.com/ClickHouse/ClickHouse/pull/94726) ([c-end](https://github.com/c-end)).
* 修复在连接多个表表达式时，当最左侧的表表达式为 `-Cluster` 表函数时结果无效的问题。解决了 [#89996](https://github.com/ClickHouse/ClickHouse/issues/89996)。[#94748](https://github.com/ClickHouse/ClickHouse/pull/94748) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 修复涉及 `toWeek`、`toYearWeek`、`toStartOfWeek`、`toLastDayOfWeek` 和 `toDayOfWeek` 的谓词时，主键和跳过索引剪枝不正确的问题，并修复其中部分函数在对 `LowCardinality(String)` 执行有效查询时抛出异常的问题。[#94816](https://github.com/ClickHouse/ClickHouse/pull/94816) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 移除了对启用 SQL Security 的视图执行 `ATTACH` 查询时不必要的权限检查跳过逻辑。这可防止用户在未验证所需访问权限的情况下附加带有 definer 的视图时发生潜在的权限提升。[#94865](https://github.com/ClickHouse/ClickHouse/pull/94865) ([pufit](https://github.com/pufit)).
* 修复了 `ReplicatedMergeTree` 启动期间因并发移除 `delete_tmp_*` 目录而导致的崩溃。[#94892](https://github.com/ClickHouse/ClickHouse/pull/94892) ([myeongjun](https://github.com/myeongjjun)).
* 修复了对带有 materialized view 的 Iceberg 表执行 `INSERT` 时丢失去重信息并导致异常的问题。 [#94938](https://github.com/ClickHouse/ClickHouse/pull/94938) ([Daniil Ivanik](https://github.com/divanik)).
* 修复了一个 bug：`SYSTEM DROP QUERY CACHE TAG 'TAGNAME' ON CLUSTER <CLUSTERNAME>` 原本会删除整个集群上的全部缓存。[#94978](https://github.com/ClickHouse/ClickHouse/pull/94978) ([Rory Crispin](https://github.com/RoryCrispin)).
* 在 Vertical merge 后保留恒定的索引粒度 (use\_const\_adaptive\_granularity)  (包括修复了 Nested 的 v2 以及一般情况) 。[#95013](https://github.com/ClickHouse/ClickHouse/pull/95013) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在 \[ClickHouse/ClickHouse[#82764](https://github.com/ClickHouse/ClickHouse/issues/82764)]\([https://github.com/ClickHouse/ClickHouse/pull/82764](https://github.com/ClickHouse/ClickHouse/pull/82764)) 之后，26.1 版本中文件系统缓存的竞争问题。[#95042](https://github.com/ClickHouse/ClickHouse/pull/95042) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复在 clickhouse-client 中使用 KILL QUERY 和取消查询 (Ctrl+C) 时，无法取消 postgresql() 表函数的问题。[#95136](https://github.com/ClickHouse/ClickHouse/pull/95136) ([Roman Vasin](https://github.com/rvasin)).
* 修复了在使用多个 join 且带有 `USING` 子句时，对源表中带限定名前缀的列进行类型推断的问题。此前，后续 join 会错误地将底层源列的类型更新为共同超类型，即使该列并未参与该 join (例如，在 `SELECT t2.a FROM t1 LEFT JOIN t2 USING (a) LEFT JOIN t3 USING (a)` 中，`t2.a` 列仅用于第一个 join，因此其类型应为 `t1.a` 和 `t2.a` 的超类型，不应包含 `t3.a`) 。当函数预期的列类型与执行计划中实际出现的类型不一致时，这可能会导致逻辑错误或崩溃。[#95157](https://github.com/ClickHouse/ClickHouse/pull/95157) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 在获取清单 .avro 列表和文件内容时，仅对列执行一次转换。[#95164](https://github.com/ClickHouse/ClickHouse/pull/95164) ([Daniil Ivanik](https://github.com/divanik)).
* 修复了 JSON 列大小计算错误的问题，此问题可能导致内存占用过高或列统计信息错误。[#95207](https://github.com/ClickHouse/ClickHouse/pull/95207) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在轻量级更新后应用大型补丁分区片段时内存统计不准确的问题。此前，应用大型补丁可能导致内存占用过高，并使服务器进程被 OOM killer 杀死。[#95231](https://github.com/ClickHouse/ClickHouse/pull/95231) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了一处未定义行为：当启用 `max_parallel_replicas` 的分布式查询在索引分析期间回退到本地副本时，可能导致结果错误或抛出异常。 [#95263](https://github.com/ClickHouse/ClickHouse/pull/95263) ([Azat Khuzhin](https://github.com/azat)).
* 修复在 `group_by_overflow_mode` 设为 `any` 时，`sum` 和时间序列对稀疏列的聚合问题。[#95301](https://github.com/ClickHouse/ClickHouse/pull/95301) ([Mikhail Koviazin](https://github.com/mkmkme)) 。
* 修复了 `plain_rewritable` disk policy 中的一个可靠性问题：如果在解除元数据文件链接的过程中途发生网络错误，可能会导致存储处于不一致状态。[#95302](https://github.com/ClickHouse/ClickHouse/pull/95302) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 将 Iceberg 的 Date 替换为 Date32。[#95322](https://github.com/ClickHouse/ClickHouse/pull/95322) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* `redis` 表函数的密码参数现在会在日志和系统表 (例如：`query_log`) 中进行脱敏处理。[#95325](https://github.com/ClickHouse/ClickHouse/pull/95325) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 修复了一个 bug：在分布式查询仍在访问某些表时，这些表可能被删除或修改，从而导致异常或错误结果。[#95356](https://github.com/ClickHouse/ClickHouse/pull/95356) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了某些情况下在分布式查询中使用负数 `LIMIT/OFFSET` 时的逻辑错误。[#95357](https://github.com/ClickHouse/ClickHouse/pull/95357) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了一个问题：通过 ssh 连接时，clickhouse-client 会要求输入两次密码。 [#95372](https://github.com/ClickHouse/ClickHouse/pull/95372) ([Isak Ellmer](https://github.com/spinojara)).
* 修复存储 S3(Azure)Queue 中的数据竞争问题。[#95385](https://github.com/ClickHouse/ClickHouse/pull/95385) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了由 prewhere 中的 lambda 表达式引发的 prewhere 过滤器错误。[#95395](https://github.com/ClickHouse/ClickHouse/pull/95395) ([Xiaozhe Yu](https://github.com/wudidapaopao)) 。
* 修复 `optimize_syntax_fuse_functions`：当聚合参数为 `Nullable` 时，不再将 `sum/count/avg` 重写为 `sumCount()`。关闭 [#95390](https://github.com/ClickHouse/ClickHouse/issues/95390)。[#95441](https://github.com/ClickHouse/ClickHouse/pull/95441) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 避免在取消时分布式查询可能发生的崩溃。[#95466](https://github.com/ClickHouse/ClickHouse/pull/95466) ([Aleksandr Musorin](https://github.com/AVMusorin)) 。
* 修复 S3(Azure)Queue 引擎流式传输时的去重问题。[#95467](https://github.com/ClickHouse/ClickHouse/pull/95467) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在分布式查询中更新分配给初始用户的行策略时出现的问题。[#95469](https://github.com/ClickHouse/ClickHouse/pull/95469) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复 plain\_rewritable 上加密磁盘的检查问题 (修复了可能出现的 `It is not possible to register multiple plain-rewritable disks with the same object storage prefix`) 。[#95470](https://github.com/ClickHouse/ClickHouse/pull/95470) ([Azat Khuzhin](https://github.com/azat)) 。
* `mergeTreeProjection` 表函数此前缺少访问检查，导致没有某个表的 SELECT 权限 (但拥有表函数权限) 的用户仍可从其投影中读取数据。此修复补充了与 `mergeTreeIndex` 和 `mergeTreeAnalyzeIndexes` 已具备的相同访问检查。[#95480](https://github.com/ClickHouse/ClickHouse/pull/95480) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了从 Dynamic/JSON 类型的动态子列中读取 size 子列时可能出现的逻辑错误。[#95573](https://github.com/ClickHouse/ClickHouse/pull/95573) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了由 [#94262](https://github.com/ClickHouse/ClickHouse/issues/94262) 引入的 (Experimental) 零拷贝复制回归问题：共享 parts 可能会在其他副本完成拉取前被删除。[#95597](https://github.com/ClickHouse/ClickHouse/pull/95597) ([filimonov](https://github.com/filimonov)) 。
* 修复对 JSON 数组使用 `tupleElement` 时发生的崩溃。关闭 [#95581](https://github.com/ClickHouse/ClickHouse/issues/95581)。[#95647](https://github.com/ClickHouse/ClickHouse/pull/95647) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在带有 USING 的 JOIN 中，当在 VALUES 子句中的 lambda 函数内使用匹配器 (`*`) 时会抛出逻辑错误异常的问题。关闭 [#93675](https://github.com/ClickHouse/ClickHouse/issues/93675)。[#95661](https://github.com/ClickHouse/ClickHouse/pull/95661) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在等待分布式 DDL 且同时删除 Replicated 数据库时出现的 `There was an error: Cannot obtain error message` 逻辑错误。修复 [#95539](https://github.com/ClickHouse/ClickHouse/issues/95539)。[#95664](https://github.com/ClickHouse/ClickHouse/pull/95664) ([Alexander Tokmakov](https://github.com/tavplubix)) 。
* 修复了在启用 `transform_null_in` 时，`IN` 函数对 `NULL` 值返回不正确结果的问题。关闭 [#65776](https://github.com/ClickHouse/ClickHouse/issues/65776)。[#95674](https://github.com/ClickHouse/ClickHouse/pull/95674) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 当设置 `cast_keep_nullable` 启用时，在 `CAST` 中正确处理 LowCardinality Nullable 类型。修复了 [#95670](https://github.com/ClickHouse/ClickHouse/issues/95670)。[#95747](https://github.com/ClickHouse/ClickHouse/pull/95747) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复分区 delta lake 数据在 squashing 过程中的问题。[#95773](https://github.com/ClickHouse/ClickHouse/pull/95773) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复运行时过滤器中 Nullable join 列的竞态条件。[#95775](https://github.com/ClickHouse/ClickHouse/pull/95775) ([Hechem Selmi](https://github.com/m-selmi)) 。
* 修复了这样一种查询中可能出现的逻辑错误：当 `USING` 列在表和选择列表中的类型不同时，查询使用了匹配器 (`*`、`table.*`) 和 `analyzer_compatibility_join_using_top_level_identifier`。关闭 [#90477](https://github.com/ClickHouse/ClickHouse/issues/90477)。[#95808](https://github.com/ClickHouse/ClickHouse/pull/95808) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复并行线程池操作 (备份、聚合、分布式查询) 中的内存安全问题；这些问题可能会在任务调度期间发生错误时引发异常。 [#95818](https://github.com/ClickHouse/ClickHouse/pull/95818) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了这样一个崩溃问题：在与使用即将被删除的 workload 的查询并发执行时运行 DROP WORKLOAD，可能会导致崩溃。[#95856](https://github.com/ClickHouse/ClickHouse/pull/95856) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了当用户仅在许多数据库上具有受限授权时，查询系统表性能缓慢的问题。关闭 [#89371](https://github.com/ClickHouse/ClickHouse/issues/89371)。[#95874](https://github.com/ClickHouse/ClickHouse/pull/95874) ([pufit](https://github.com/pufit))。
* 修复了在带有嵌套路径的 JSON 上执行 tupleElement 时的问题，此前该问题可能导致查询结果错误。[#95907](https://github.com/ClickHouse/ClickHouse/pull/95907) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在空 MergeTree 表上使用 `direct` join 算法时可能出现的 `NOT_SUPPORTED` 错误。[#95935](https://github.com/ClickHouse/ClickHouse/pull/95935) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复客户端不会为设置项建议并自动补全别名的问题，关闭 [#92190](https://github.com/ClickHouse/ClickHouse/issues/92190)。[#95945](https://github.com/ClickHouse/ClickHouse/pull/95945) ([phulv94](https://github.com/phulv94)) 。
* 修复 system.asynchronous\_metric\_log 中的 event\_date 问题。 [#95947](https://github.com/ClickHouse/ClickHouse/pull/95947) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 JSON 数据类型中的 skipping paths 问题。此前，使用 `JSON(SKIP path)` 时，所有以前缀 `path` 开头的 JSON 键都会被跳过，甚至包括 `"pathpath"` 这样的键，因此在插入时可能导致这些 paths 的数据丢失。现在该问题已修复，只有键 `"path"` 会被跳过。[#95948](https://github.com/ClickHouse/ClickHouse/pull/95948) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 包含未知投影的分片不应被永久标记为丢失。[#95952](https://github.com/ClickHouse/ClickHouse/pull/95952) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 修复 `Join` 表中使用 `Nullable(String)` 键时空字符串变为 `NULL` 的问题。关闭 [#71414](https://github.com/ClickHouse/ClickHouse/issues/71414)。[#96002](https://github.com/ClickHouse/ClickHouse/pull/96002) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 现在，PostgreSQL 引擎已能正确读取 `BOOLEAN[]`。修复了 [#72754](https://github.com/ClickHouse/ClickHouse/issues/72754)。[#96006](https://github.com/ClickHouse/ClickHouse/pull/96006) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了从空文件读取时 `ProtobufList` 格式的问题。关闭 [#70059](https://github.com/ClickHouse/ClickHouse/issues/70059)。[#96007](https://github.com/ClickHouse/ClickHouse/pull/96007) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `ProtobufList` format 在空表中产生幽灵记录的问题。关闭 [#72596](https://github.com/ClickHouse/ClickHouse/issues/72596)。[#96010](https://github.com/ClickHouse/ClickHouse/pull/96010) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在涉及 distributed queries、PREWHERE 和类型推断的一种特殊情况下，`if` 函数在 `UInt64` 与 `Int32` 之间的类型不匹配问题。关闭 [#70017](https://github.com/ClickHouse/ClickHouse/issues/70017)。[#96012](https://github.com/ClickHouse/ClickHouse/pull/96012) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了涉及 `Bool` 类型的 `JIT` 编译查询问题。[#96013](https://github.com/ClickHouse/ClickHouse/pull/96013) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了从 SQLite 的 TEXT 列读取 UUID 列时出现的逻辑错误。已关闭 [#71263](https://github.com/ClickHouse/ClickHouse/issues/71263)。[#96016](https://github.com/ClickHouse/ClickHouse/pull/96016) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 SQLite 引擎对 `DateTime`、`Date`、`UUID` 等类型的转换问题。关闭 [#73481](https://github.com/ClickHouse/ClickHouse/issues/73481)。[#96017](https://github.com/ClickHouse/ClickHouse/pull/96017) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在对外部数据库 SQLite 和 PostgreSQL 的查询中，`FixedString` 值的转义方式不正确。已关闭 [#73519](https://github.com/ClickHouse/ClickHouse/issues/73519)。与 @jh0x 共同完成。[#96019](https://github.com/ClickHouse/ClickHouse/pull/96019) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 WindowTransform 在 PRECEDING 偏移量过大时触发的断言失败。已关闭 [#75852](https://github.com/ClickHouse/ClickHouse/issues/75852)。[#96026](https://github.com/ClickHouse/ClickHouse/pull/96026) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个可能导致数据损坏的问题：当并发异步插入使用相同的参数名但包含不同的值时，会出现该问题。 [#96035](https://github.com/ClickHouse/ClickHouse/pull/96035) ([Seva Potapov](https://github.com/seva-potapov)).
* 修复全局性能分析器的周期设置问题 (由 `global_profiler_real_time_period_ns` 和 `global_profiler_cpu_time_period_ns` 控制) 。此前使用的是截断后的值，而不是设定值，导致性能分析器的唤醒频率高于预期。[#96048](https://github.com/ClickHouse/ClickHouse/pull/96048) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 此前，如果用于 position delete 的 Iceberg manifest 文件中，引用的数据文件在某个条目里存在但其值为 NULL，我们就无法获取对应数据文件的正确范围。此 PR 修复了这个 bug。[#96061](https://github.com/ClickHouse/ClickHouse/pull/96061) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复撤销默认角色时出现的问题。[#96103](https://github.com/ClickHouse/ClickHouse/pull/96103) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复了索引分析中的释放后使用问题，该问题会在罕见情况下出现：禁用 `use_primary_key`，且使用索引的条件析取数量非常大。[#96112](https://github.com/ClickHouse/ClickHouse/pull/96112) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `Gorilla` 编解码器中的一个回归问题：当显式指定的大小与数据类型大小不一致，且缓冲区大小过小时，先前版本会在解压缩时抛出异常。关闭 [#78253](https://github.com/ClickHouse/ClickHouse/issues/78253)。[#96118](https://github.com/ClickHouse/ClickHouse/pull/96118) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 避免在字典加载时出现死锁：当某个字典引用了一个又递归引用该字典的 Merge 表时。关闭 [#78360](https://github.com/ClickHouse/ClickHouse/issues/78360)。[#96120](https://github.com/ClickHouse/ClickHouse/pull/96120) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `formatDateTime` 在使用非固定宽度格式说明符 (如 MySQL 和 JODA 风格) 时会使用未初始化值的问题。[#96133](https://github.com/ClickHouse/ClickHouse/pull/96133) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 设置 `use_const_adaptive_granularity` 与 `index_granularity_bytes` 的组合 (即“非自适应粒度”) 会导致待读取行数计算错误，并引发异常。[#96143](https://github.com/ClickHouse/ClickHouse/pull/96143) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在对象存储的类文件表 (如 S3 和 Azure) 上执行无效的 ALTER UPDATE 变更，可能会导致空指针解引用。已关闭 [#92994](https://github.com/ClickHouse/ClickHouse/issues/92994)。[#96162](https://github.com/ClickHouse/ClickHouse/pull/96162) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `AccessRights::contains` 在部分撤销权限时返回错误结果的问题。[#96170](https://github.com/ClickHouse/ClickHouse/pull/96170) ([pufit](https://github.com/pufit)) 。
* 修复了 CTE 折叠常量导致的查询条件缓存哈希冲突问题，该问题可能会导致查询结果错误。关闭 [#96060](https://github.com/ClickHouse/ClickHouse/issues/96060)。[#96172](https://github.com/ClickHouse/ClickHouse/pull/96172) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 ProcessList 中可能出现的死锁问题。当我们向 cancellation checker 添加任务时，如果此时触发了内存 overcommit 跟踪器，可能会因潜在的锁顺序反转而导致这种情况发生。[#96182](https://github.com/ClickHouse/ClickHouse/pull/96182) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了一个错误：当包含外连接 (LEFT、RIGHT 或 FULL) 的查询与多个 INNER JOIN 结合使用时，由于不合法的 JOIN 重排序，可能会返回错误结果。当外连接的 ON 条件引用了之前已连接的多个表中的列时，优化器未能正确考虑所有表依赖关系，因此可能错误地重排 JOIN，导致部分行丢失。关闭 [#95972](https://github.com/ClickHouse/ClickHouse/issues/95972)。[#96193](https://github.com/ClickHouse/ClickHouse/pull/96193) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 当表未定义统计信息时，ClickHouse 不应尝试加载这些统计信息。这样可避免为检查统计信息文件是否存在而带来的额外开销 (100+ms) 。 (issue [#96068](https://github.com/ClickHouse/ClickHouse/issues/96068)) 。[#96233](https://github.com/ClickHouse/ClickHouse/pull/96233) ([Han Fei](https://github.com/hanfei1991)) 。
* 修复 `optimize_syntax_fuse_functions`：当聚合参数为 `LowCardinality(Nullable)` 时，不再将 `sum/count/avg` 重写为 `sumCount()`。关闭 [#95390](https://github.com/ClickHouse/ClickHouse/issues/95390)。[#96239](https://github.com/ClickHouse/ClickHouse/pull/96239) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了某些情况下 `not IN` 和 `not has` 函数的分区裁剪错误。[#96241](https://github.com/ClickHouse/ClickHouse/pull/96241) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复向量相似度索引中的 `stack-use-after-scope` 错误。[#96259](https://github.com/ClickHouse/ClickHouse/pull/96259) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在查询前有 SQL 注释时，测试运行器无法识别错误提示注释的问题。[#96336](https://github.com/ClickHouse/ClickHouse/pull/96336) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 修复了以下逻辑错误：当表的主键为 Nullable，且查询使用了 `coalesce` 函数并且其第一个参数为常量时，KeyCondition 会出现逻辑错误。[#96340](https://github.com/ClickHouse/ClickHouse/pull/96340) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `GROUPING SETS`、`group_by_use_nulls` 以及内部包含 `LowCardinality` 的 `Tuple` 数据类型相互作用时，可能会在查询管道中产生异常的块结构，进而导致逻辑错误。这个问题是在引入 `Nullable` `Tuple` 之后出现的。[#96358](https://github.com/ClickHouse/ClickHouse/pull/96358) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 此前可以创建将空表达式 `()` 用作索引的表，这会导致无效的内存访问。[#96363](https://github.com/ClickHouse/ClickHouse/pull/96363) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了旧版 analyzer 在 JOIN 与重复别名同时出现时的崩溃问题。[#96405](https://github.com/ClickHouse/ClickHouse/pull/96405) ([Ilya Golshtein](https://github.com/ilejn)).
* 修复了因对 Variant 列进行错误的原地过滤优化而导致的 `Nested columns sizes are inconsistent with local_discriminators` 错误。[#96410](https://github.com/ClickHouse/ClickHouse/pull/96410) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 `CREATE TABLE ... CLONE AS ...` 忽略源表完整限定名称的问题。[#96415](https://github.com/ClickHouse/ClickHouse/pull/96415) ([Hasyimi Bahrudin](https://github.com/hasyimibhar)) 。
* 修复在 clickhouse-client 中通过 KILL QUERY 和取消查询 (Ctrl+C) 取消 `mysql` 表函数时的问题。[#96437](https://github.com/ClickHouse/ClickHouse/pull/96437) ([Roman Vasin](https://github.com/rvasin)) 。
* 修复了高 `max_execution_time` 值查询的取消检查线程中的活锁问题。[#96450](https://github.com/ClickHouse/ClickHouse/pull/96450) ([Sergei Trifonov](https://github.com/serxa)).
* 修复了在某些情况下，分布式查询中使用带小数的 `LIMIT/OFFSET` 时出现的逻辑错误。[#96475](https://github.com/ClickHouse/ClickHouse/pull/96475) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复某些包含 lambda 函数的表达式中的空指针解引用问题。[#96479](https://github.com/ClickHouse/ClickHouse/pull/96479) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复将 `LowCardinality` 列转换为 `Nullable` 时结果错误的问题。[#96483](https://github.com/ClickHouse/ClickHouse/pull/96483) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复了创建 Iceberg 表时的崩溃问题：`ORDER BY` 子句引用了不存在的列，或使用了位置参数。已关闭 [#93280](https://github.com/ClickHouse/ClickHouse/issues/93280)。[#96484](https://github.com/ClickHouse/ClickHouse/pull/96484) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了带有 Nullable 子字段的 Tuple 列触发的运行时过滤器异常。[#96509](https://github.com/ClickHouse/ClickHouse/pull/96509) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 Parquet V3 原生读取器中的 `LOGICAL_ERROR` 异常：当用于 `PREWHERE` 过滤的列包含非布尔 UInt8 值时，会触发该异常。[#96594](https://github.com/ClickHouse/ClickHouse/pull/96594) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在元数据变更期间复制表中隐式索引重新生成的问题。[#96600](https://github.com/ClickHouse/ClickHouse/pull/96600) ([Raúl Marín](https://github.com/Algunenano)).
* 修复了执行 DROP WORKLOAD 时的竞态条件。[#96614](https://github.com/ClickHouse/ClickHouse/pull/96614) ([Sergei Trifonov](https://github.com/serxa)).
* 修复了 Iceberg 表写入中的一个缺陷：分区插入可能导致数据在各分区文件间分布不正确。[#96620](https://github.com/ClickHouse/ClickHouse/pull/96620) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了在带约束的 `CREATE TABLE` 中出现的 `heap-use-after-free` 问题。[#96669](https://github.com/ClickHouse/ClickHouse/pull/96669) ([Nikita Taranov](https://github.com/nickitat)).
* 在 bech32 中校验 witness version，以避免缓冲区溢出。[#96671](https://github.com/ClickHouse/ClickHouse/pull/96671) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复在使用无效的 `auth_header` 设置创建数据湖 REST catalog 时，`system.tables` 报错的问题。[#96680](https://github.com/ClickHouse/ClickHouse/pull/96680) ([Han Fei](https://github.com/hanfei1991)).
* 修复在生存时间 (TTL) 合并后，当一个块中的所有行都被过滤掉时，`_minmax_count_projection` 会使 `min(timestamp)` 返回纪元 (`1970-01-01`) 的问题。 [#96703](https://github.com/ClickHouse/ClickHouse/pull/96703) ([Raquel Barbadillo](https://github.com/rbarbadillo)).
* 改进了对 `iceberg_metadata_file_path` 设置项的校验，以防止路径遍历，并确保指定的元数据文件位于表目录内。[#96754](https://github.com/ClickHouse/ClickHouse/pull/96754) ([Daniil Ivanik](https://github.com/divanik)) 。
* 修复了在 `GROUP BY` 中使用 `Variant` 参数时 `ifNull` 崩溃的问题。[#96790](https://github.com/ClickHouse/ClickHouse/pull/96790) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了启用 `table_disk=1` 设置的表之间发生的缓存键冲突。[#96818](https://github.com/ClickHouse/ClickHouse/pull/96818) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了因竞态条件导致 MemoryWorker 的清理线程卡住的问题。[#96819](https://github.com/ClickHouse/ClickHouse/pull/96819) ([Antonio Andelic](https://github.com/antonio2368)).
* 不要在 Iceberg 目录中记录包含凭据的数据。[#96831](https://github.com/ClickHouse/ClickHouse/pull/96831) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复 `clickhouse-client` 在发生服务器错误后的退出状态。[#96841](https://github.com/ClickHouse/ClickHouse/pull/96841) ([Vitaly Baranov](https://github.com/vitlibar)).
* 使用 CROSS JOIN 且启用并行副本的查询可能会返回错误结果。修复了 [#74337](https://github.com/ClickHouse/ClickHouse/issues/74337)。[#96848](https://github.com/ClickHouse/ClickHouse/pull/96848) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 修复了这样一个问题：如果此前已在同一列上执行过轻量级更新，`ALTER TABLE DROP COLUMN` 查询会失败。[#96861](https://github.com/ClickHouse/ClickHouse/pull/96861) ([Anton Popov](https://github.com/CurtizJ)).
* 修复在向 `plain_rewritable` 对象存储磁盘创建基于归档的备份 (`.zip`、`.tzst`) 时发生的栈溢出 (崩溃) 问题。[#96872](https://github.com/ClickHouse/ClickHouse/pull/96872) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了当目标端文件系统磁盘已满或发生其他 I/O 错误而导致备份失败时，server 崩溃的问题。[#96873](https://github.com/ClickHouse/ClickHouse/pull/96873) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `EXCEPT ALL` 和 `INTERSECT ALL` 忽略行重数、表现得与对应的 `DISTINCT` 版本相同的问题。[#96876](https://github.com/ClickHouse/ClickHouse/pull/96876) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了使用不兼容类型调用 `indexOfAssumeSorted` 时触发的 `std::terminate` 异常 (例如，在 `IPv4` 数组中使用整数作为搜索值) 。[#96877](https://github.com/ClickHouse/ClickHouse/pull/96877) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在使用窗口函数且 `group_by_use_nulls = 1` 并配合 CUBE/ROLLUP/GROUPING SETS 时出现的异常 `Bad cast from type DB::ColumnNullable to DB::ColumnString`。[#96878](https://github.com/ClickHouse/ClickHouse/pull/96878) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 JIT 已编译表达式将 `DateTime` 转换为 `DateTime64` 时结果不正确的问题 (例如，在混用 DateTime 类型的 `CASE`/`if`/`multiIf` 中) 。该值此前被重新解释，而不是按正确标度进行缩放，导致表达式编译生效后生成错误的时间戳。[#96879](https://github.com/ClickHouse/ClickHouse/pull/96879) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `CoalescingMergeTree` 在跳过索引表达式生成常量列时抛出逻辑错误异常的问题 (例如，对整型列上的 `ifNotFinite(1, c0)` 使用 `bloom_filter`) 。[#96880](https://github.com/ClickHouse/ClickHouse/pull/96880) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在误用 HTTP 连接启用 TLS 的原生协议端口时，错误消息中端口号显示错误的问题。[#96881](https://github.com/ClickHouse/ClickHouse/pull/96881) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在 CTE 和子查询中，按子查询设置的 `SETTINGS` 未应用到 `file` 等表函数上的问题。[#96882](https://github.com/ClickHouse/ClickHouse/pull/96882) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复读取 X509 证书时 BIO 对象发生的内存泄漏问题。[#96885](https://github.com/ClickHouse/ClickHouse/pull/96885) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了查询分析器中的 `LOGICAL_ERROR` 异常：当在应传入具体值的位置传入 lambda 表达式时，会触发该异常 (例如作为 `arrayFold` 的 accumulator 参数) 。[#96892](https://github.com/ClickHouse/ClickHouse/pull/96892) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复对复杂嵌套类型 (Array 中包含 Nullable Tuple，而该 Tuple 又包含带有 Nullable 枚举值的 Map) 进行类型转换时出现的 `ColumnNullable is not compatible with original` 异常。[#96924](https://github.com/ClickHouse/ClickHouse/pull/96924) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了分片 `HASHED` 字典并行加载中的一个竞态条件，该问题偶尔会导致某些行未能加载。[#96953](https://github.com/ClickHouse/ClickHouse/pull/96953) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `REPLACE PARTITION` 与后台变更之间的竞态条件，该问题可能导致替换后新旧数据同时可见。[#96955](https://github.com/ClickHouse/ClickHouse/pull/96955) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `arrayJoin` 函数在与 INNER JOIN 和 WHERE 子句一起使用时产生重复行的问题。其原因是部分谓词下推优化错误地将包含 `arrayJoin` 的过滤器下推到 JOIN 之下。[#96989](https://github.com/ClickHouse/ClickHouse/pull/96989) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `clearCaches` 中的崩溃 (SEGFAULT) ：由于 `BlockIO::operator=` 未移动 `query_metadata_cache`，导致已缓存的存储快照被过早销毁，并引发对 `MergeTreeData` 存储的释放后使用。 [#96995](https://github.com/ClickHouse/ClickHouse/pull/96995) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `IfTransformStringsToEnumPass` 中的断言失败：当 `if` 或 `transform` 函数返回 `Nullable(String)` 时会触发该问题 (例如使用 `GROUP BY ... WITH CUBE` 且 `group_by_use_nulls = true` 时) 。[#97002](https://github.com/ClickHouse/ClickHouse/pull/97002) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在包含 `UNION ALL` 和 `JOIN` 的 `INSERT ... SELECT` 中写入错误数据的问题：常量字符串列在块合并后可能会写入错误的值。[#97019](https://github.com/ClickHouse/ClickHouse/pull/97019) ([Hasyimi Bahrudin](https://github.com/hasyimibhar)).
* 修复在 `ALTER TABLE MODIFY COLUMN` 更改列类型后构建列统计信息时触发的 `assert_cast` 异常 (或在 release 构建中导致静默数据损坏) 问题。[#97027](https://github.com/ClickHouse/ClickHouse/pull/97027) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 Azure Blob 存储、SSH 协议和 Arrow Flight 接口中读取未初始化内存的问题。[#97053](https://github.com/ClickHouse/ClickHouse/pull/97053) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在带有 ROW POLICY/PREWHERE 和 FINAL 的查询中，索引会对结果产生影响的问题。[#97076](https://github.com/ClickHouse/ClickHouse/pull/97076) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了 `MergeTree` 表中 `REPLACE PARTITION` 与后台变更之间仍然存在的竞态条件，该问题可能导致旧数据重新出现。[#97105](https://github.com/ClickHouse/ClickHouse/pull/97105) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复包含别名列的隐式索引，并在创建前执行完整验证。[#97115](https://github.com/ClickHouse/ClickHouse/pull/97115) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了 `FunctionVariantAdaptor` 在处理需要常量参数的函数 (如 `arrayROCAUC`) 时出现的逻辑错误。[#97116](https://github.com/ClickHouse/ClickHouse/pull/97116) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 修复以下问题：当 `PartCheckThread` 为已变更的 part 重新将 `GET_PART` 入队时，会导致变更卡住，并在 `parts_to_do` 中留下幽灵条目。[#97162](https://github.com/ClickHouse/ClickHouse/pull/97162) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了带有 `ORDER BY ... LIMIT` 的子查询在查询计划中的行数估算问题，该问题可能导致优化器选择次优的 JOIN 顺序。[#97193](https://github.com/ClickHouse/ClickHouse/pull/97193) ([Alexander Gololobov](https://github.com/davenger)).
* 修复了 `FunctionVariantAdaptor` 中的 `LOGICAL_ERROR` 异常：当作用于 Variant 列的函数返回 `Nothing` 类型时，可能会出现该问题；这种情况可能发生在 `UNION ALL` 查询中的空数组场景下。[#97213](https://github.com/ClickHouse/ClickHouse/pull/97213) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 S3 多部分复制操作 (例如向 S3 执行 `BACKUP`/`RESTORE` 时) 中的数据竞争问题，该问题在并发访问时可能导致异常。[#97227](https://github.com/ClickHouse/ClickHouse/pull/97227) ([Azat Khuzhin](https://github.com/azat)).
* 修复了这样一个 `LOGICAL_ERROR` 异常：当 `WHERE` 子句中的 `arrayJoin` 引用 `JOIN` 两侧的列时会触发该异常。[#97239](https://github.com/ClickHouse/ClickHouse/pull/97239) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复在带有 PREWHERE 的 Tuple 中读取稀疏 `Nullable(String)` 的 `.size` 子列时触发的 `LOGICAL_ERROR` 异常。[#97264](https://github.com/ClickHouse/ClickHouse/pull/97264) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复在使用 `ORDER BY ... LIMIT` 从采用非自适应索引粒度 (`index_granularity_bytes = 0`) 的表读取数据时，`LazyMaterializingTransform` 中出现的异常 "lazy chunk 中的行数与 offsets 数量不一致"。[#97270](https://github.com/ClickHouse/ClickHouse/pull/97270) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了一个问题：当因非 ZooKeeper 异常 (例如 `memory limit`) 导致表重建失败时，`SYSTEM RESTART REPLICA` 会使该表从数据库中丢失，从而导致 `DatabaseReplicated` 中的元数据摘要不匹配。[#97276](https://github.com/ClickHouse/ClickHouse/pull/97276) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* `system.merge_tree_settings` 中的 `readonly` 字段现在会正确显示某些 merge tree 设置 (例如 `index_granularity`) 为无条件只读。[#97277](https://github.com/ClickHouse/ClickHouse/pull/97277) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了在对 `MergeTree` 表进行 `count()` 优化时的崩溃问题：当存储快照是在没有数据的情况下创建时，会触发该问题。 [#97281](https://github.com/ClickHouse/ClickHouse/pull/97281) ([Pablo Marcos](https://github.com/pamarcos)).
* 修复了在从堆栈跟踪的调试信息中解析函数名时可能发生的崩溃问题。[#97294](https://github.com/ClickHouse/ClickHouse/pull/97294) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `analyzer&#95;compatibility&#95;join&#95;using&#95;top&#95;level&#95;identifier` 与 ALIAS 列有关的逻辑错误。关闭 [#96228](https://github.com/ClickHouse/ClickHouse/issues/96228)。[#97297](https://github.com/ClickHouse/ClickHouse/pull/97297) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在配合 `QUALIFY` 子句使用带有文本索引的列时，`applyOrder` 中出现的 `LOGICAL_ERROR` 异常。[#97313](https://github.com/ClickHouse/ClickHouse/pull/97313) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 系统表 `system.functions` 现在会将内部函数显示为 `categories = 'Internal'`，而不是 `categories = ''`。[#97315](https://github.com/ClickHouse/ClickHouse/pull/97315) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 启用并行副本时，包含 RIGHT JOIN 链的查询可能会产生错误结果。修复了 [#74341](https://github.com/ClickHouse/ClickHouse/issues/74341)。[#97316](https://github.com/ClickHouse/ClickHouse/pull/97316) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 修复了在可刷新materialized view 以及其他表被重命名的场景中可能出现的误报 `TABLE_UUID_MISMATCH` 错误。[#97323](https://github.com/ClickHouse/ClickHouse/pull/97323) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复 `StorageKeeperMap` 备份中的 segfault，原因是在惰性备份批次中对悬空存储指针发生了释放后使用。 [#97336](https://github.com/ClickHouse/ClickHouse/pull/97336) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在启用 `mutations_execute_subqueries_on_initiator` 时，`ALTER UPDATE/DELETE` 中带有标量子查询的 `exists` 函数。此前该标量子查询会被错误地求值，可能导致报错，或生成损坏的变更命令，从而使表在下次服务器重启时无法加载。[#97347](https://github.com/ClickHouse/ClickHouse/pull/97347) ([Kirill Kopnev](https://github.com/Fgrtue)).
* 修复了在将 NULL 与包含 LowCardinality 类型的 Variant 列比较时出现的逻辑异常 `Unexpected return type from equals. Expected Nullable(UInt8). Got Const(LowCardinality(Nullable(UInt8)))`。 [#97379](https://github.com/ClickHouse/ClickHouse/pull/97379) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在启用分片查询缓存时并行执行 `EXCHANGE TABLES` 可能引发的竞态条件。[#97411](https://github.com/ClickHouse/ClickHouse/pull/97411) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了 Array 到 `QBit` 转换中的 `LOGICAL_ERROR` 异常：当外层 `Tuple` 包装器中的 `nullable_source` 以不匹配的列类型替换已转换的数组列时，会触发该异常。关闭 [#97389](https://github.com/ClickHouse/ClickHouse/issues/97389)。[#97413](https://github.com/ClickHouse/ClickHouse/pull/97413) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复括号内带别名的元组字面量在 AST 格式化往返时出现的不一致问题。例如，`(('a', 'b') AS x)` 之前会被错误地重新格式化为 `tuple(('a', 'b') AS x)`。[#97418](https://github.com/ClickHouse/ClickHouse/pull/97418) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了在启用去重的异步插入过程中，因解析失败生成零行空块时引发的异常。 [#97460](https://github.com/ClickHouse/ClickHouse/pull/97460) ([Sema Checherinda](https://github.com/CheSema)).
* 修复在使用 `ORDER BY ... LIMIT` 从采用非自适应索引粒度 (`index_granularity_bytes = 0`) 的表读取数据时，`LazyMaterializingTransform` 中出现的异常 "lazy chunk 中的行数与 offsets 数量不匹配"。 [#97482](https://github.com/ClickHouse/ClickHouse/pull/97482) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复向 Iceberg 插入数据的相关设置问题。为 `allow_experimental_insert_into_iceberg` 设置添加别名。[#97483](https://github.com/ClickHouse/ClickHouse/pull/97483) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了一个问题：当 `optimize_inverse_dictionary_lookup` 优化重写 `dictGet(...)` 谓词时，没有 `CREATE TEMPORARY TABLE` 权限的用户会收到 `ACCESS_DENIED`。ClickHouse 现在会跳过该重写，执行原始表达式。关闭 [#97269](https://github.com/ClickHouse/ClickHouse/issues/97269)。[#97484](https://github.com/ClickHouse/ClickHouse/pull/97484) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了 `Set` 和 `MergeTreeIndexSet` 在处理包含内部稀疏子列的列时触发的断言失败问题 (在 debug/sanitizer 构建中表现为异常) ，例如来自具有不同稀疏序列化 profile 的 MergeTree parts 的 `Tuple` 列。[#97493](https://github.com/ClickHouse/ClickHouse/pull/97493) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 StorageKafka2 中一个可能的释放后使用 (use-after-free) 问题。[#97520](https://github.com/ClickHouse/ClickHouse/pull/97520) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复当输出路径包含目录时，`INTO OUTFILE` 与 `TRUNCATE` 及 `into_outfile_create_parent_directories` 设置配合使用时的问题。[#97549](https://github.com/ClickHouse/ClickHouse/pull/97549) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在启用 analyzer 时，通过 `merge()` 表函数查询其 ALIAS 列中包含 lambda 表达式的表时出现的 `BAD_ARGUMENTS` 错误。[#97551](https://github.com/ClickHouse/ClickHouse/pull/97551) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 Keeper zxid 为 0 时 `system.zookeeper_info` 抛出异常的问题。[#97553](https://github.com/ClickHouse/ClickHouse/pull/97553) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `ip_trie` 字典在键类型不是 `String` 时可能存在的逻辑错误。[#97555](https://github.com/ClickHouse/ClickHouse/pull/97555) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了基础 `RestCatalog` 的 REST catalog OAuth 身份验证失效的问题 (此前仅对 `OneLakeCatalog` 等派生 catalog 生效) 。这导致在引入 BigLake catalog 后，默认 REST catalog 无法正常工作。 [#97561](https://github.com/ClickHouse/ClickHouse/pull/97561) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Geometry 函数 (`perimeterSpherical`、`areaSpherical` 等) 现在除了 `Geometry` Variant 类型外，也接受单独的几何子类型 (`Polygon`、`Ring`、`Point` 等) 。[#97571](https://github.com/ClickHouse/ClickHouse/pull/97571) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在对 `Nullable(Tuple(... Nullable(T) ...))` 类型的子列使用 `isNull`/`isNotNull` 时触发的 `LOGICAL_ERROR` 异常。关闭 [#97224](https://github.com/ClickHouse/ClickHouse/issues/97224)。[#97582](https://github.com/ClickHouse/ClickHouse/pull/97582) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在轻量级更新期间应用补丁分区片段时的空指针解引用问题。[#97583](https://github.com/ClickHouse/ClickHouse/pull/97583) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `BaseSettings::readBinary` 将 `accessor.find` 返回的索引直接传给 `field_infos[]`，但没有检查“未找到”的哨兵值 (即 `-1`) ，这可能导致 `std::vector` 越界访问。这个问题得益于 libcxx 的加固机制才被发现。它很可能发生在查询计划反序列化期间：较新的服务器向较旧的服务器发送了后者无法识别的 setting。基于字符串的读取方法已经正确处理了这种情况；`readBinary` 则缺少同样的检查。[#97585](https://github.com/ClickHouse/ClickHouse/pull/97585) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 `UNION ALL` 查询在某个分支的谓词恒为假时返回错误结果的问题——该分支本应不返回任何内容，却会错误地读取数据。[#97620](https://github.com/ClickHouse/ClickHouse/pull/97620) ([Bharat Nallan](https://github.com/bharatnc)).
* 修复了 `IN (col)` 在仅引用单个列时会失败并报 `UNSUPPORTED_METHOD` 错误的问题。[#97646](https://github.com/ClickHouse/ClickHouse/pull/97646) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在 `GROUP BY ... WITH ROLLUP/CUBE` 期间，当键在 `Nullable(Tuple(...))` 内包含 `LowCardinality(Nullable(...))` 时出现的逻辑错误异常。[#97647](https://github.com/ClickHouse/ClickHouse/pull/97647) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 `NOT (1, 1, 1)` 的 AST 格式化不一致问题，该问题可能会在调试构建中触发 `LOGICAL_ERROR`。[#97653](https://github.com/ClickHouse/ClickHouse/pull/97653) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `keeper-converter` 在遇到空的 ZooKeeper 事务日志文件时发生异常的问题。 [#97673](https://github.com/ClickHouse/ClickHouse/pull/97673) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* ClickHouse 现已可使用 clang-23 (master) 构建。[#95578](https://github.com/ClickHouse/ClickHouse/pull/95578) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复：当配置了 `bind_host` 时，强制将 `is_local` 设为 false，并改为使用集成测试。对 [#74741](https://github.com/ClickHouse/ClickHouse/pull/74741) 的后续跟进。[#93109](https://github.com/ClickHouse/ClickHouse/pull/93109) [#96018](https://github.com/ClickHouse/ClickHouse/pull/96018) ([Zhigao Hong](https://github.com/zghong)) 。
* 压力测试：修复 CI 中的压力测试和升级测试；忽略 `no-{build}` 标签；增加兼容性随机化。[#94693](https://github.com/ClickHouse/ClickHouse/pull/94693) ([Nikita Fomichev](https://github.com/fm4v)) 。
* 从构建产物中发布 parser\_memory\_profiler 二进制文件。该工具可用于分析 AST 的内存占用。[#95826](https://github.com/ClickHouse/ClickHouse/pull/95826) ([Ilya Yatsishin](https://github.com/qoega)).
* 为 `parser_memory_profiler` 工具新增 `--symbolize` 标志，使其在结果中生成包含已解析符号的 `.heap.sym` 文件。[#96477](https://github.com/ClickHouse/ClickHouse/pull/96477) ([Ilya Yatsishin](https://github.com/qoega)).
* 将集成测试中使用的第三方 Docker 镜像固定为特定版本。[#96500](https://github.com/ClickHouse/ClickHouse/pull/96500) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 恢复了对 `OpenSSL` 进行动态链接的能力。不建议这样做，而且任何生产构建都不会使用它，但互联网上的爱好者仍然可以使用这个选项。[#96506](https://github.com/ClickHouse/ClickHouse/pull/96506) ([Govind R Nair](https://github.com/Revertionist)).
* 通过为 `Coordination::OpNum` 进行按类型特化，将 `magic_enum` 的范围从 \[-100, 1000] 缩小到默认的 \[-128, 127]，从而缩短构建时间。[#96632](https://github.com/ClickHouse/ClickHouse/pull/96632) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 从 Function 类中移除不必要的 C++ 模板，以减少构建时间。[#96646](https://github.com/ClickHouse/ClickHouse/pull/96646) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `StorageSystemLicenses` 的生成提前到配置时，以提升构建并行度。[#96697](https://github.com/ClickHouse/ClickHouse/pull/96697) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将许可证扫描并行化。[#96727](https://github.com/ClickHouse/ClickHouse/pull/96727) ([Raúl Marín](https://github.com/Algunenano)) 。
* 新增支持 SSH 协议的无状态功能测试。[#96996](https://github.com/ClickHouse/ClickHouse/pull/96996) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 在无状态功能测试基础设施中新增 Kafka 3.9.0，使得可以使用 ClickHouse Keeper 充当 ZooKeeper，直接测试 Kafka 和 Kafka2 表引擎。六个新的无状态测试涵盖基础的生产/消费、虚拟列、INSERT、多种格式、损坏消息处理，以及基于 Keeper 的偏移量存储。[#96997](https://github.com/ClickHouse/ClickHouse/pull/96997) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增一个 CI 工作流，用于构建经 PGO+BOLT 优化的 clang 工具链。[#96991](https://github.com/ClickHouse/ClickHouse/pull/96991) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 CI 中使用经过 PGO 优化的 LLVM/Clang 构建，可将构建速度提高 20..30%。 [#97031](https://github.com/ClickHouse/ClickHouse/pull/97031) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 用 llvm-libc 的实现替换 glibc 中的数学函数。 [#90151](https://github.com/ClickHouse/ClickHouse/pull/90151) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* 将 Boost 从 1.83 升级到 1.90，修复了调试构建中 `devector` 断言失败的问题。[#97037](https://github.com/ClickHouse/ClickHouse/pull/97037) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 将 `postgres` 升级到 REL\_18\_1。[#95189](https://github.com/ClickHouse/ClickHouse/pull/95189) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 改用 `libexpat` 2.7.3。[#95218](https://github.com/ClickHouse/ClickHouse/pull/95218) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `OpenSSL` 3.5.5。 [#95345](https://github.com/ClickHouse/ClickHouse/pull/95345) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `simdjson` v4.2.4。[#97129](https://github.com/ClickHouse/ClickHouse/pull/97129) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 升级到 `libarchive` 3.8.5。[#97131](https://github.com/ClickHouse/ClickHouse/pull/97131) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `fast_float` v8.2.3。 [#97133](https://github.com/ClickHouse/ClickHouse/pull/97133) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 使用 `abseil-cpp` 20260107.1，并将 `s2geometry` 升级至 v0.13.1。[#97134](https://github.com/ClickHouse/ClickHouse/pull/97134) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 `libxml2` 更新至 2.15.1。 [#95574](https://github.com/ClickHouse/ClickHouse/pull/95574) ([Robert Schulze](https://github.com/rschu1ze)).
* 将 7 个 Tier-3 集成测试 Docker 镜像所用的、已停止支持或已移除的基础镜像升级到了当前受支持的版本。[#97314](https://github.com/ClickHouse/ClickHouse/pull/97314) ([Rahul](https://github.com/motsc)) 。
* 新增 TPC-DS 基准测试查询。[#97349](https://github.com/ClickHouse/ClickHouse/pull/97349) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 将各个单独的 x86 指令集 CMake 选项 (`ENABLE_SSSE3`、`ENABLE_AVX2`、`NO_SSE3_OR_HIGHER`、`ARCH_NATIVE` 等) 替换为一个数值型 `X86_ARCH_LEVEL` 选项 (`1`/`2`/`3`/`4`) ，与运行时分发系统已采用的标准 x86-64 微架构级别保持一致。[#97354](https://github.com/ClickHouse/ClickHouse/pull/97354) ([Raúl Marín](https://github.com/Algunenano)) 。
* 避免在 `FunctionBinaryArithmetic` 中为非除法操作实例化 `division_by_nullable=true` 的模板变体，从而缩短编译时间并减小二进制文件体积。[#97496](https://github.com/ClickHouse/ClickHouse/pull/97496) ([Raúl Marín](https://github.com/Algunenano)) 。
* 通过将 `Exception.h` 从 `typeid_cast.h`、`assert_cast.h`、`Context_fwd.h`、`IDataType.h` 以及各类 Column 头文件中移除，缩小 `Exception.h` 的包含范围。[#97497](https://github.com/ClickHouse/ClickHouse/pull/97497) ([Raúl Marín](https://github.com/Algunenano)).
* 始终使用随附的 `compiler-rt` 头文件 (`sanitizer` 和 XRay 接口) ，而不要使用宿主编译器的头文件，并且默认从源码构建 `compiler-rt` 库。[#97499](https://github.com/ClickHouse/ClickHouse/pull/97499) ([Raúl Marín](https://github.com/Algunenano)) 。
* 在具备足够 `long double` 支持的平台上，避免在 `wide_integer_impl.h` 中包含 boost/multiprecision 头文件，以缩短构建时间。[#96633](https://github.com/ClickHouse/ClickHouse/pull/96633) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 实现 LLVM 代码覆盖率任务，并先在 master 分支上启用。[#90952](https://github.com/ClickHouse/ClickHouse/pull/90952) ([Alexey Bakharew](https://github.com/alexbakharew)) 。
* 为正式版构建启用快速 libcxx 加固。这主要用于越界检查。根据性能测试结果，预计不会对性能产生明显影响。[#94757](https://github.com/ClickHouse/ClickHouse/pull/94757) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。

<div id="261">
  ### ClickHouse 26.1 版本发布，2026-01-29。 [演示文稿](https://presentations.clickhouse.com/2026-release-26.1/), [视频](https://www.youtube.com/watch?v=fWuYt4M0xE4)
</div>

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

* 修复了因在格式说明符中错误替换别名而导致的格式不一致问题。此项更改关闭了 [#82833](https://github.com/ClickHouse/ClickHouse/issues/82833)。此项更改关闭了 [#82832](https://github.com/ClickHouse/ClickHouse/issues/82832)。此项更改关闭了 [#68296](https://github.com/ClickHouse/ClickHouse/issues/68296)。此项更改可能会带来向后不兼容：当 analyzer 被禁用时，某些在 `IN` 中引用别名的 CREATE VIEW 查询将无法处理。为避免这种不兼容，请启用 analyzer (自 24.3 起默认已启用) 。[#82838](https://github.com/ClickHouse/ClickHouse/pull/82838) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 编解码器 `DEFLATE_QPL` 和 `ZSTD_QAT` 已移除。建议用户在升级前，将现有使用 `DEFLATE_QPL` 或 `ZSTD_QAT` 压缩的数据转换为使用其他编解码器压缩。请注意，要使用这些编解码器，必须启用设置 `enable_deflate_qpl_codec` 和 `enable_zstd_qat_codec`。[#92150](https://github.com/ClickHouse/ClickHouse/pull/92150) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 通过在 `system.query_log.exception` 中启用 stderr 捕获，改进了 UDF 调试体验。此前，UDF 的 stderr 只会记录到文件中，不会显示在查询日志里，因此几乎无法调试。现在，stderr 默认会触发异常，并且会在抛出前完整收集 (最多 1MB) ，因此完整的 Python 回溯信息和错误消息都会出现在 `system.query_log.exception` 中，从而便于故障排查。[#92209](https://github.com/ClickHouse/ClickHouse/pull/92209) ([Xu Jia](https://github.com/XuJia0210)).
* `JOIN USING ()` 子句中的空列列表现在会被视为语法错误。此前，它原本应在查询执行期间报为 `INVALID_JOIN_ON_EXPRESSION`。在某些情况下，例如与 `Join` 存储进行连接时，还会导致 `LOGICAL_ERROR`，修复 [#82502](https://github.com/ClickHouse/ClickHouse/issues/82502)。[#92371](https://github.com/ClickHouse/ClickHouse/pull/92371) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 默认在 JSON 类型中对 SKIP REGEXP 使用部分匹配。解决了 [#79250](https://github.com/ClickHouse/ClickHouse/issues/79250)。[#92847](https://github.com/ClickHouse/ClickHouse/pull/92847) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 撤销“允许向简单 ALIAS 列执行 INSERT” (回退了 ClickHouse/ClickHouse[#84154](https://github.com/ClickHouse/ClickHouse/issues/84154)) 。它无法与自定义格式配合使用，也没有任何设置项加以保护。[#92849](https://github.com/ClickHouse/ClickHouse/pull/92849) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增一项设置：当数据湖目录无法访问对象存储时抛出错误。[#93606](https://github.com/ClickHouse/ClickHouse/pull/93606) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* `Lazy` 数据库引擎已移除，不再可用。已关闭 [#91231](https://github.com/ClickHouse/ClickHouse/issues/91231)。[#93627](https://github.com/ClickHouse/ClickHouse/pull/93627) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 移除 `metric_log` 的 `transposed_with_wide_view` 模式——由于存在缺陷，该模式不可用。现在已无法再以此模式定义 `system.metric_log`。这部分回退了 [#78412](https://github.com/ClickHouse/ClickHouse/issues/78412) 中的更改。[#93867](https://github.com/ClickHouse/ClickHouse/pull/93867) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 工作负载的 CPU 调度现已默认采用抢占式。参见 `cpu_slot_preemption` 服务器级设置。[#94060](https://github.com/ClickHouse/ClickHouse/pull/94060) ([Sergei Trifonov](https://github.com/serxa)).
* 对索引文件名进行转义，以避免 parts 损坏。此更改后，ClickHouse 将无法加载由旧版本创建、名称中包含非 ASCII 字符的索引。要处理这个问题，你可以使用 MergeTree 设置 `escape_index_filenames`。[#94079](https://github.com/ClickHouse/ClickHouse/pull/94079) ([Raúl Marín](https://github.com/Algunenano)) 。
* 格式设置 `exact_rows_before_limit`、`rows_before_aggregation`、`cross_to_inner_join_rewrite`、`regexp_dict_allow_hyperscan`、`regexp_dict_flag_case_insensitive`、`regexp_dict_flag_dotall` 和 `dictionary_use_async_executor` 现已改为普通设置 (非格式设置) 。这是一项纯内部变更，除非你在 Iceberg、DeltaLake、Kafka、S3、S3Queue、Azure、Hive、RabbitMQ、Set、FileLog 或 NATS 表引擎定义中指定了这些设置 (这种情况不太可能发生) ，否则不会产生用户可见的副作用。在这些情况下，这些设置以前会被忽略，而现在此类定义会报错。[#94106](https://github.com/ClickHouse/ClickHouse/pull/94106) ([Robert Schulze](https://github.com/rschu1ze)).
* `joinGet/joinGetOrNull` 函数现在会对底层 Join 表强制检查 `SELECT` 权限。此变更后，执行 `joinGet('db.table', 'column', key)` 时，用户必须同时拥有 Join 表中定义的键列以及要获取的 attribute 列的 `SELECT` 权限。缺少这些权限的查询将因 `ACCESS_DENIED` 而失败。迁移时，可使用 `GRANT SELECT ON db.join_table TO user` 授予整表访问所需的授权；或使用 `GRANT SELECT(key_col, attr_col) ON db.join_table TO user` 授予列级访问权限。此变更会影响所有依赖 `joinGet`/`joinGetOrNull` 且此前未显式配置 `SELECT` 授权的用户和应用程序。[#94307](https://github.com/ClickHouse/ClickHouse/pull/94307) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 对 `CREATE TABLE ... AS ...` 查询检查 `SHOW COLUMNS`。此前检查的是 `SHOW TABLES`，但对这类权限检查而言，这并不是正确的 grant。 [#94556](https://github.com/ClickHouse/ClickHouse/pull/94556) ([pufit](https://github.com/pufit)).
* 使 `Hash` 输出格式不再依赖块大小。[#94503](https://github.com/ClickHouse/ClickHouse/pull/94503) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。请注意，与之前的版本相比，这会改变输出的哈希值。

<div id="267-new-feature">
  #### 新特性
</div>

* ClickHouse Keeper 的 HTTP API 和内嵌 Web UI。 [#78181](https://github.com/ClickHouse/ClickHouse/pull/78181) ([pufit](https://github.com/pufit) 和 [speeedmaster](https://github.com/speeedmaster)) 。
* 异步插入去重现在可用于带有依赖 materialized view 的场景。当发生 block\_id 冲突时，系统会先过滤原始块，移除与该 block\_id 相关的行，再通过所有相关 materialized view 的 SELECT 查询转换剩余行，从而重建不含冲突行的原始块。[#89140](https://github.com/ClickHouse/ClickHouse/pull/89140) ([Sema Checherinda](https://github.com/CheSema))。当涉及 materialized view 时，现在允许将去重与异步插入结合使用。[#93957](https://github.com/ClickHouse/ClickHouse/pull/93957) ([Sema Checherinda](https://github.com/CheSema))。
* 引入了新的语法和框架，用于简化并扩展投影索引功能。这是对 [https://github.com/ClickHouse/ClickHouse/pull/81021](https://github.com/ClickHouse/ClickHouse/pull/81021) 的后续完善。[#91844](https://github.com/ClickHouse/ClickHouse/pull/91844) ([Amos Bird](https://github.com/amosbird)) 。
* 新增对 `Array` 列的文本索引支持。[#89895](https://github.com/ClickHouse/ClickHouse/pull/89895) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 默认启用 `use_variant_as_common_type`，这样你就可以在 `Array` 中、在 `UNION` 查询中，以及在 `if`/`multiIf`/`case` 的分支中使用不兼容的类型。[#90677](https://github.com/ClickHouse/ClickHouse/pull/90677) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 新增系统表 `zookeeper_info`。实现 [#88014](https://github.com/ClickHouse/ClickHouse/issues/88014)。[#90809](https://github.com/ClickHouse/ClickHouse/pull/90809) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)) 。
* 所有函数现已支持 `Variant` 类型。[#90900](https://github.com/ClickHouse/ClickHouse/pull/90900) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 向 Prometheus 的 `/metrics` 端点添加了 `ClickHouse_Info` 指标，其中主要包含版本信息，因此可以构建图表来跟踪详细版本信息随时间推移的变化。[#91125](https://github.com/ClickHouse/ClickHouse/pull/91125) ([Christoph Wurm](https://github.com/cwurm)) 。
* 为 keeper 新增了一个四字母命令 `rcfg`，可用于更改集群配置。与标准的 `reconfigure` 请求相比，该命令在配置变更方面提供了更广泛的能力。该命令接受 `json` 字符串作为参数。发送到 TCP 接口的完整字节序列应如下所示：`rcfg{json_string_length_big_endian}{json_string}`。该命令的一些示例如下：`{"preconditions": {"leaders": [1, 2], "members": [1, 2, 3, 4, 5]}, "actions": [{"transfer_leadership": [3]}, {"remove_members": [1, 2]}, {"set_priority": [{"id": 4, "priority": 100}, {"id": 5, "priority": 100}]}, {"transfer_leadership": [4, 5]}, {"set_priority": [{"id": 3, "priority": 0}]}]}`。[#91354](https://github.com/ClickHouse/ClickHouse/pull/91354) ([alesapin](https://github.com/alesapin)) 。
* 新增函数 `reverseBySeparator`，用于将字符串中按指定分隔符分隔的各个子字符串顺序反转。解决 [#91463](https://github.com/ClickHouse/ClickHouse/issues/91463)。[#91780](https://github.com/ClickHouse/ClickHouse/pull/91780) ([Xuewei Wang](https://github.com/Sallery-X)) 。
* 新增设置 `max_insert_block_size_bytes`，可更细致地控制插入块的形成方式。[#92833](https://github.com/ClickHouse/ClickHouse/pull/92833) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* 如果启用了 `ignore_on_cluster_for_replicated_database` 设置，则可对 Replicated 数据库执行带有 `ON CLUSTER` 子句的 DDL 查询。在这种情况下，将忽略集群名称。[#92872](https://github.com/ClickHouse/ClickHouse/pull/92872) ([Kirill](https://github.com/kirillgarbar)) 。
* 新增 `mergeTreeAnalyzeIndexes` 函数。[#92954](https://github.com/ClickHouse/ClickHouse/pull/92954) ([Azat Khuzhin](https://github.com/azat)) 。
* 新增设置 `use_primary_key`。将其设为 `false`，以禁用基于主键的粒度剪枝。[#93319](https://github.com/ClickHouse/ClickHouse/pull/93319) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 新增了 `icebergLocalCluster` 表函数。[#93323](https://github.com/ClickHouse/ClickHouse/pull/93323) ([Anton Ivashkin](https://github.com/ianton-ru)) 。
* 新增了 `cosineDistanceTransposed` 函数，可近似计算两点之间的[余弦距离](https://en.wikipedia.org/wiki/Cosine_similarity#Cosine_distance)。[#93621](https://github.com/ClickHouse/ClickHouse/pull/93621) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 为 system.parts 表新增 `files` 列，用于显示每个数据分区片段中的文件数量。[#94337](https://github.com/ClickHouse/ClickHouse/pull/94337) ([Match](https://github.com/gayanMatch)) 。
* 新增了一个用于并发控制的 max-min fair 调度器。在高超额订阅场景下 (即大量查询竞争有限的 CPU 插槽时) ，可提供更好的公平性。短时运行的查询不会因为长期运行、且随着时间推移占用更多插槽的查询而受到影响。可通过将 `concurrent_threads_scheduler` 服务器设置设为 `max_min_fair` 来启用。[#94732](https://github.com/ClickHouse/ClickHouse/pull/94732) ([Sergei Trifonov](https://github.com/serxa)) 。
* 支持 ClickHouse client 在连接到服务器时覆盖 TLS SNI。[#89761](https://github.com/ClickHouse/ClickHouse/pull/89761) ([Matt Klein](https://github.com/mattklein123)) 。
* 支持在 `joinGet` 函数调用中使用临时表。[#92973](https://github.com/ClickHouse/ClickHouse/pull/92973) ([Eduard Karacharov](https://github.com/korowa)) 。
* `DeltaLake` 表引擎现已支持删除向量。[#93852](https://github.com/ClickHouse/ClickHouse/pull/93852) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 为 `deltaLakeCluster` 增加对删除向量的支持。[#94365](https://github.com/ClickHouse/ClickHouse/pull/94365) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持 Google 云存储数据湖。[#93866](https://github.com/ClickHouse/ClickHouse/pull/93866) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。

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

* 将 `QBit` 从 Experimental 调整为 Beta。[#93816](https://github.com/ClickHouse/ClickHouse/pull/93816) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 新增对 `Nullable(Tuple)` 的支持。设置 `allow_experimental_nullable_tuple_type = 1` 即可启用。[#89643](https://github.com/ClickHouse/ClickHouse/pull/89643) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 支持 Paimon REST catalog，是对 [https://github.com/ClickHouse/ClickHouse/pull/84423](https://github.com/ClickHouse/ClickHouse/pull/84423) 的延续。[#92011](https://github.com/ClickHouse/ClickHouse/pull/92011) ([JIaQi Tang](https://github.com/JiaQiTang98)).

<div id="267-performance-improvement">
  #### 性能提升
</div>

* 设置 `use_skip_indexes_on_data_read` 现已默认启用。该设置支持在读取数据的同时以流式方式进行过滤，从而提升查询性能并缩短启动时间。[#93407](https://github.com/ClickHouse/ClickHouse/pull/93407) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 提升 `LowCardinality` 列上 `DISTINCT` 的性能。关闭 [#5917](https://github.com/ClickHouse/ClickHouse/issues/5917)。[#91639](https://github.com/ClickHouse/ClickHouse/pull/91639) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 优化 `distinctJSONPaths` 聚合函数，使其仅从数据分区片段中读取 JSON 路径，而非整个 JSON 列。[#92196](https://github.com/ClickHouse/ClickHouse/pull/92196) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 更多过滤器可下推到 JOIN 中。 [#85556](https://github.com/ClickHouse/ClickHouse/pull/85556) ([Nikita Taranov](https://github.com/nickitat)).
* 当过滤器只使用一侧输入时，支持更多将 JOIN ON 条件下推的场景。支持 `ANY`、`SEMI` 和 `ANTI` JOIN。[#92584](https://github.com/ClickHouse/ClickHouse/pull/92584) ([Dmitry Novik](https://github.com/novikd)) 。
* 允许使用等价集合将过滤器下推到 `SEMI JOIN`。已关闭 [#85239](https://github.com/ClickHouse/ClickHouse/issues/85239)。[#92837](https://github.com/ClickHouse/ClickHouse/pull/92837) ([Dmitry Novik](https://github.com/novikd)).
* 当右侧为空时，跳过读取 `hash join` 的左侧。此前，我们会一直读取左侧，直到遇到第一个非空块；而在过滤或聚合开销较大的情况下，这可能会导致大量额外工作。[#94062](https://github.com/ClickHouse/ClickHouse/pull/94062) ([Alexander Gololobov](https://github.com/davenger)).
* 在查询管道中使用 “fastrange” (Daniel Lemire) 方法对数据进行分区。这有望提升并行排序和 JOIN 的性能。[#93080](https://github.com/ClickHouse/ClickHouse/pull/93080) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 当 PARTITION BY 与排序键一致或为其前缀时，窗口函数性能得到提升。[#87299](https://github.com/ClickHouse/ClickHouse/pull/87299) ([Nikita Taranov](https://github.com/nickitat)) 。
* 外层过滤器可下推到视图中，从而能够在本地和远程节点上应用 PREWHERE。已解决 [#88189](https://github.com/ClickHouse/ClickHouse/issues/88189)。[#88316](https://github.com/ClickHouse/ClickHouse/pull/88316) ([Igor Nikonov](https://github.com/devcrafter)) 。
* 为更多函数实现了 JIT 编译。关闭 [#73509](https://github.com/ClickHouse/ClickHouse/issues/73509)。[#88770](https://github.com/ClickHouse/ClickHouse/pull/88770) ([Alexey Milovidov](https://github.com/alexey-milovidov) 与 [Taiyang Li](https://github.com/taiyang-li)) 。
* 如果在 `FINAL` 查询中使用的跳过索引位于主键列上，那么就无需再额外检查其他 parts 中的主键交集，现已不再执行该步骤。解决了 [#85897](https://github.com/ClickHouse/ClickHouse/issues/85897)。[#93899](https://github.com/ClickHouse/ClickHouse/pull/93899) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 优化对小数 `LIMIT` 和 `OFFSET` 的性能及内存占用。[#91167](https://github.com/ClickHouse/ClickHouse/pull/91167) ([Ahmed Gouda](https://github.com/0xgouda)).
* 修复 Parquet Reader V3 预取器未使用更快随机读取逻辑的问题。关闭 [#90890](https://github.com/ClickHouse/ClickHouse/issues/90890)。[#91435](https://github.com/ClickHouse/ClickHouse/pull/91435) ([Arsen Muk](https://github.com/arsenmuk)) 。
* 提升 `icebergCluster` 性能。关闭 [#91462](https://github.com/ClickHouse/ClickHouse/issues/91462)。[#91537](https://github.com/ClickHouse/ClickHouse/pull/91537) ([Yang Jiang](https://github.com/Ted-Jiang)) 。
* 不要在常量过滤条件中按虚拟列进行过滤。[#91588](https://github.com/ClickHouse/ClickHouse/pull/91588) ([c-end](https://github.com/c-end)) 。
* 通过启用自适应写入缓冲区，利用 wide parts 降低超宽表在 INSERT/merges 时的内存占用。新增对加密磁盘的自适应写入缓冲区支持。[#92250](https://github.com/ClickHouse/ClickHouse/pull/92250) ([Azat Khuzhin](https://github.com/azat)).
* 通过减少索引中需要搜索的标记数量，提升了使用文本索引和 `sparseGrams` 分词器进行全文检索的性能。[#93078](https://github.com/ClickHouse/ClickHouse/pull/93078) ([Anton Popov](https://github.com/CurtizJ)) 。
* 函数 `isValidASCII` 已针对返回正向结果的情况进行了优化，即输入值全部为 ASCII 时。[#93347](https://github.com/ClickHouse/ClickHouse/pull/93347) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 现在，按序读取优化已能够识别因 WHERE 条件而变为常量的 ORDER BY 列，从而实现高效的逆序读取。这让多租户查询 (如 `WHERE tenant='42' ORDER BY tenant, event_time DESC`) 也能从中受益，因为它们现在可以使用 InReverseOrder，而无需再进行完整排序。". [#94103](https://github.com/ClickHouse/ClickHouse/pull/94103) ([matanper](https://github.com/matanper)).
* 引入一个专门的 Enum AST 类，以 `(string, integer)` 成对形式存储值参数，替代 ASTLiteral 子节点，从而优化内存占用。[#94178](https://github.com/ClickHouse/ClickHouse/pull/94178) ([Ilya Yatsishin](https://github.com/qoega)) 。
* 支持在多个副本上执行分布式索引分析。对于共享存储场景以及集群中的海量数据尤为有利。该功能适用于 SharedMergeTree (ClickHouse Cloud) ，也可能适用于共享存储上的其他 MergeTree 表类型。[#86786](https://github.com/ClickHouse/ClickHouse/pull/86786) ([Azat Khuzhin](https://github.com/azat)) 。
* 在以下情况下禁用 join 运行时过滤器，以降低开销：- bloom filter 中置位过多 - 运行时被过滤掉的行过少。[#91578](https://github.com/ClickHouse/ClickHouse/pull/91578) ([Alexander Gololobov](https://github.com/davenger)) 。
* 对关联子查询的输入使用内存缓冲区，以避免被多次求值。属于 [#79890](https://github.com/ClickHouse/ClickHouse/issues/79890) 的一部分。[#91205](https://github.com/ClickHouse/ClickHouse/pull/91205) ([Dmitry Novik](https://github.com/novikd)).
* 允许所有副本在并行副本读取期间并行接管孤立范围。这有助于改善负载均衡并降低长尾延迟。[#91374](https://github.com/ClickHouse/ClickHouse/pull/91374) ([zoomxi](https://github.com/zoomxi)).
* 外部聚合/排序/连接现在会在所有上下文中遵循查询设置 `temporary_files_codec`。修复了 grace hash join 缺少 profile events 的问题。[#92388](https://github.com/ClickHouse/ClickHouse/pull/92388) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 提升了在聚合/排序过程中对落盘场景下查询内存使用情况检测的稳健性。[#92500](https://github.com/ClickHouse/ClickHouse/pull/92500) ([Azat Khuzhin](https://github.com/azat)) 。
* 估算聚合键列的总行数以及 NDV (不同值数量) 统计信息。[#92812](https://github.com/ClickHouse/ClickHouse/pull/92812) ([Alexander Gololobov](https://github.com/davenger)) 。
* 利用 simdcomp 优化倒排列表压缩。[#92871](https://github.com/ClickHouse/ClickHouse/pull/92871) ([Peng Jian](https://github.com/fastio)) 。
* 使用桶机制重构 S3Queue 的 ordered 模式处理流程。这也应提升性能，减少 Keeper 请求次数。[#92889](https://github.com/ClickHouse/ClickHouse/pull/92889) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 函数 `mapContainsKeyLike` 和 `mapContainsValueLike` 现在可分别利用 `mapKeys()` 或 `mapValues()` 上的文本索引。[#93049](https://github.com/ClickHouse/ClickHouse/pull/93049) ([Michael Jarrett](https://github.com/EmeraldShift)) 。
* 降低非 Linux 系统上的内存占用 (启用 jemalloc 脏页的即时清理) 。[#93360](https://github.com/ClickHouse/ClickHouse/pull/93360) ([Eduard Karacharov](https://github.com/korowa)).
* 当脏页大小占 `max_server_memory_usage` 的比例超过 `memory_worker_purge_dirty_pages_threshold_ratio` 时，强制清理 jemalloc arena。 [#93500](https://github.com/ClickHouse/ClickHouse/pull/93500) ([Eduard Karacharov](https://github.com/korowa)).
* 减少 AST 的内存占用。[#93601](https://github.com/ClickHouse/ClickHouse/pull/93601) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 在某些情况下，我们发现 ClickHouse 在从表中读取数据时不会遵守内存限制。此问题已修复。[#93715](https://github.com/ClickHouse/ClickHouse/pull/93715) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 默认启用 `CHECK_STAT` 和 `TRY_REMOVE` 这两个 Keeper 扩展。[#93886](https://github.com/ClickHouse/ClickHouse/pull/93886) ([Mikhail Artemenko](https://github.com/Michicosun)) 。
* 解析 Iceberg manifest 文件条目中与位置删除对应的文件名上下界，以便更准确地筛选相应的数据文件。[#93980](https://github.com/ClickHouse/ClickHouse/pull/93980) ([Daniil Ivanik](https://github.com/divanik)).
* 新增两个设置，用于控制 JSON 列中动态子列的最大数量。第一个是 MergeTree 设置 `merge_max_dynamic_subcolumns_in_compact_part` (类似于已添加的 `merge_max_dynamic_subcolumns_in_wide_part`) ，用于限制合并到 Compact 分片时创建的动态子列数量。第二个是查询级设置 `max_dynamic_subcolumns_in_json_type_parsing`，用于限制解析 JSON 数据时创建的动态子列数量，从而支持在 insert 时指定该限制。[#94184](https://github.com/ClickHouse/ClickHouse/pull/94184) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在某些情况下，对 JSON 列的压缩合并进行了小幅优化。 [#94247](https://github.com/ClickHouse/ClickHouse/pull/94247) ([Pavel Kruglov](https://github.com/Avogar)).
* 根据生产环境中的实践经验，下调线程池队列大小。在从 MergeTree 读取任何数据之前，增加显式的内存占用检查。[#94692](https://github.com/ClickHouse/ClickHouse/pull/94692) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 确保调度器在 CPU 资源严重不足时优先调度 MemoryWorker 线程，因为这可以保护 ClickHouse 进程免受致命威胁。[#94864](https://github.com/ClickHouse/ClickHouse/pull/94864) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)) 。
* 将 jemalloc 脏页的清理放到独立于 MemoryWorker 主线程的其他线程中执行。如果清理速度较慢，可能会延迟 RSS 使用量的更新，从而导致进程因内存不足而被杀死。引入新的 config `memory_worker_purge_total_memory_threshold_ratio`，根据总内存使用量的比例开始清理脏页。[#94902](https://github.com/ClickHouse/ClickHouse/pull/94902) ([Antonio Andelic](https://github.com/antonio2368)) 。

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

* 现已支持在 Azure Blob 存储中使用 `system.blob_storage_log`。[#93105](https://github.com/ClickHouse/ClickHouse/pull/93105) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 Local 和 HDFS 实现 `blob_storage_log`。修复了 `S3Queue` 在 `blob_storage_log` 中记录日志时未使用磁盘名称而导致的错误。为 `blob_storage_log` 添加 `error_code` 列。拆分测试配置文件，以简化本地测试。[#93106](https://github.com/ClickHouse/ClickHouse/pull/93106) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `clickhouse-client` 和 `clickhouse-local` 现在会在输入时高亮数字字面量中的数字分组 (千位、百万位等) 。此更改解决了 [#93100](https://github.com/ClickHouse/ClickHouse/issues/93100)。[#93108](https://github.com/ClickHouse/ClickHouse/pull/93108) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 为 `clickhouse-client` 增加了对命令行参数中等号前后带空格写法的支持。已关闭 [#93077](https://github.com/ClickHouse/ClickHouse/issues/93077)。[#93174](https://github.com/ClickHouse/ClickHouse/pull/93174) ([Cole Smith](https://github.com/colesmith54)) 。
* 启用 `<interactive_history_legacy_keymap>true</interactive_history_legacy_keymap>` 后，CLI client 现在可以像以前一样使用 Ctrl-R 进行常规搜索，同时 Ctrl-T 用于模糊搜索。[#87785](https://github.com/ClickHouse/ClickHouse/pull/87785) ([Larry Snizek](https://github.com/larry-cdn77)).
* 用于清除缓存的语句 `SYSTEM DROP [...] CACHE` 容易让人误以为该语句会禁用缓存。ClickHouse 现已支持语句 `SYSTEM CLEAR [...] CACHE`，含义更直观。旧语法仍然可用。[#93727](https://github.com/ClickHouse/ClickHouse/pull/93727) ([Pranav Tiwari](https://github.com/pranavt84)) 。
* 支持在 `EmbeddedRocksDB` 中使用多列作为主键。已关闭 [#32819](https://github.com/ClickHouse/ClickHouse/issues/32819)。[#33917](https://github.com/ClickHouse/ClickHouse/pull/33917) ([usurai](https://github.com/usurai)) 。
* 现在支持对标量使用非常量 IN (例如 `val1 NOT IN if(cond, val2, val3)` 这样的查询) 。[#93495](https://github.com/ClickHouse/ClickHouse/pull/93495) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 防止将 `x-amz-server-side-encryption` 请求头传递到 `HeadObject`、`UploadPart` 和 `CompleteMultipartUpload` 的 S3 请求中，因为这些请求不支持该请求头。[#64577](https://github.com/ClickHouse/ClickHouse/pull/64577) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)).
* 为 S3Queue 的 ordered 模式添加对 Hive 分区的跟踪支持。解决了 [#71161](https://github.com/ClickHouse/ClickHouse/issues/71161)。[#81040](https://github.com/ClickHouse/ClickHouse/pull/81040) ([Anton Ivashkin](https://github.com/ianton-ru)) 。
* 优化文件系统缓存中的空间预留。`FileCache::collectCandidatesForEviction` 将在不加 unique lock 的情况下执行。[#82764](https://github.com/ClickHouse/ClickHouse/pull/82764) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 支持服务器日志的组合轮换策略 (大小 + 时间) 。[#87620](https://github.com/ClickHouse/ClickHouse/pull/87620) ([Jianmei Zhang](https://github.com/zhangjmruc)).
* CLI 客户端现在可指定 `<warnings>false</warnings>`，无需再使用命令行参数 `--no-warnings`。 [#87783](https://github.com/ClickHouse/ClickHouse/pull/87783) ([Larry Snizek](https://github.com/larry-cdn77)).
* 新增了对 `avg` 聚合函数的支持，可将 Date、日期时间和 Time 值用作参数。解决了 [#82267](https://github.com/ClickHouse/ClickHouse/issues/82267)。[#87845](https://github.com/ClickHouse/ClickHouse/pull/87845) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 优化项 `use_join_disjunctions_push_down` 默认处于启用状态。[#89313](https://github.com/ClickHouse/ClickHouse/pull/89313) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 关联子查询现已支持更多表引擎和数据源类型。关闭了 [#80775](https://github.com/ClickHouse/ClickHouse/issues/80775)。[#90175](https://github.com/ClickHouse/ClickHouse/pull/90175) ([Dmitry Novik](https://github.com/novikd)).
* 如果显式指定了参数化视图的 schema，则会显示该 schema。已关闭 [#88875](https://github.com/ClickHouse/ClickHouse/issues/88875) 和 [#81385](https://github.com/ClickHouse/ClickHouse/issues/81385)。[#90220](https://github.com/ClickHouse/ClickHouse/pull/90220) ([Grigorii Sokolik](https://github.com/GSokol)) 。
* 如果日志早于最后一个已提交索引，能够正确处理 Keeper 日志条目中的空缺。[#90403](https://github.com/ClickHouse/ClickHouse/pull/90403) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 改进 `min_free_disk_bytes_to_perform_insert` 设置，使其在 JBOD 卷上也能正常工作。[#90878](https://github.com/ClickHouse/ClickHouse/pull/90878) ([Aleksandr Musorin](https://github.com/AVMusorin)) 。
* 现在可以在用于 `S3` 表引擎和 `s3` 表函数的 named collections 中指定 `storage_class_name` 设置。[#91926](https://github.com/ClickHouse/ClickHouse/pull/91926) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)) 。
* 支持通过 `system.zookeeper` 向辅助 ZooKeeper 插入数据。[#92092](https://github.com/ClickHouse/ClickHouse/pull/92092) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* 为 Keeper 新增以下指标：`KeeperChangelogWrittenBytes`、`KeeperChangelogFileSyncMicroseconds`、`KeeperSnapshotWrittenBytes` 和 `KeeperSnapshotFileSyncMicroseconds` profile events，以及 `KeeperBatchSizeElements` 和 `KeeperBatchSizeBytes` 直方图指标。[#92149](https://github.com/ClickHouse/ClickHouse/pull/92149) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 新增设置 `trace_profile_events_list`，将 `trace_profile_event` 的 tracing 限定为指定的事件名称列表，从而能够在大型工作负载上更精确地收集数据。[#92298](https://github.com/ClickHouse/ClickHouse/pull/92298) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 支持可暂停 failpoint 的 SYSTEM NOTIFY FAILPOINT。- 支持 SYSTEM WAIT FAILPOINT fp PAUSE/RESUME。[#92368](https://github.com/ClickHouse/ClickHouse/pull/92368) ([Shaohua Wang](https://github.com/tiandiwonder)) 。
* 为 `system.data_skipping_indices` 新增 `creation` (隐式/显式) 列。[#92378](https://github.com/ClickHouse/ClickHouse/pull/92378) ([Raúl Marín](https://github.com/Algunenano)) 。
* 允许将 YTsaurus dyn tables 的列描述传递给字典源。[#92391](https://github.com/ClickHouse/ClickHouse/pull/92391) ([MikhailBurdukov](https://github.com/MikhailBurdukov)) 。
* 在 [#63985](https://github.com/ClickHouse/ClickHouse/pull/63985) 中，我们实现了可按端口分别指定 TLS 配置所需的全部参数 (参见[可组合协议](https://clickhouse.com/docs/operations/settings/composable-protocols)) ，因此不再依赖全局 TLS 配置。不过，当前实现仍会隐式要求存在全局 `openSSL.server` 配置节，这与不同端口需要不同 TLS 配置的场景存在冲突。比如，在 keeper-in-server 部署中，我们需要为 keeper 之间的通信和 clickhouse client 连接分别配置独立的 TLS。[#92457](https://github.com/ClickHouse/ClickHouse/pull/92457) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 引入新设置 `input_format_binary_max_type_complexity`，用于限制以二进制格式解码的类型节点总数，以防止恶意载荷。[#92519](https://github.com/ClickHouse/ClickHouse/pull/92519) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 在 `system.background_schedule_pool{,_log}` 中体现正在运行的任务。补充文档。[#92587](https://github.com/ClickHouse/ClickHouse/pull/92587) ([Azat Khuzhin](https://github.com/azat)) 。
* 如果在客户端的 Ctrl+R 搜索中未找到匹配的历史记录，就执行当前查询。[#92749](https://github.com/ClickHouse/ClickHouse/pull/92749) ([Azat Khuzhin](https://github.com/azat)) 。
* 支持将 `EXPLAIN indices = 1` 用作 `EXPLAIN indexes = 1` 的别名。关闭了 [#92483](https://github.com/ClickHouse/ClickHouse/issues/92483)。[#92774](https://github.com/ClickHouse/ClickHouse/pull/92774) ([Pranav Tiwari](https://github.com/pranavt84)).
* Parquet 读取器现已支持将 Tuple 或 Map 列按 JSON 读取：`select x from file(f.parquet, auto, 'x JSON')` 即使 `f.parquet` 中的列 `x` 类型为 tuple 或 map，也能正常工作。[#92864](https://github.com/ClickHouse/ClickHouse/pull/92864) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 支持 Parquet reader 处理空元组。[#92868](https://github.com/ClickHouse/ClickHouse/pull/92868) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 当原生复制因 BadRequest 失败时 (例如块列表无效) ，会回退为对 Azure Blob 存储执行读写复制。此前，只有在将 blob 复制到不同存储账户时遇到 Unauthorized 错误，才会执行这种回退。但我们有时也会遇到“指定的块列表无效”错误。因此，现在已更新条件：只要原生复制失败，都会回退到读写方式。[#92888](https://github.com/ClickHouse/ClickHouse/pull/92888) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* 修复了在使用 EC2 实例 profile 凭证运行大量并发 S3 查询时，EC2 metadata 端点遭到限流的问题。此前，每个查询都会各自创建一个 `AWSInstanceProfileCredentialsProvider`，从而并发请求 EC2 metadata 服务，这可能导致超时和 `HTTP response code: 403` 错误。现在，凭证提供商会被缓存，并在所有查询间共享。[#92891](https://github.com/ClickHouse/ClickHouse/pull/92891) ([Sav](https://github.com/sberss)).
* 调整 `insert_select_deduplicate` 设置，新增保持向后兼容的能力。[#92951](https://github.com/ClickHouse/ClickHouse/pull/92951) ([Sema Checherinda](https://github.com/CheSema)) 。
* 将慢于平均水平的后台任务记入日志 (`background_schedule_pool_log.duration_threshold_milliseconds=30`) ，以避免记录过多任务日志。[#92965](https://github.com/ClickHouse/ClickHouse/pull/92965) ([Azat Khuzhin](https://github.com/azat)) 。
* 在早期版本中，`system.trace_log` 和 `system.symbols` 中部分 C++ 函数名显示不正确 (“mangled”) ，而且 `demangle` 函数也无法很好地处理这些名称。关闭 [#93074](https://github.com/ClickHouse/ClickHouse/issues/93074)。[#93075](https://github.com/ClickHouse/ClickHouse/pull/93075) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 引入了 `backup_data_from_refreshable_materialized_view_targets` 备份设置，用于跳过可刷新materialized views 目标表数据的备份。采用 APPEND 刷新策略的 RMV 始终会被备份。 [#93076](https://github.com/ClickHouse/ClickHouse/pull/93076) ([Julia Kartseva](https://github.com/jkartseva)). [#93658](https://github.com/ClickHouse/ClickHouse/pull/93658) ([Julia Kartseva](https://github.com/jkartseva))
* 对于较大的编译单元 (如函数) ，使用最少的调试信息，而不是完全禁用调试信息。[#93079](https://github.com/ClickHouse/ClickHouse/pull/93079) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 通过为 MinIO 特有错误实现错误码映射，AWS S3 C++ SDK 现已增加对 MinIO 的兼容性支持。此变更使 ClickHouse 在使用 MinIO 部署而非 AWS S3 时，能够正确处理并重试 MinIO 服务器错误，从而提升在 self-hosted MinIO 集群上运行对象存储的用户的可靠性。[#93082](https://github.com/ClickHouse/ClickHouse/pull/93082) ([XiaoBinMu](https://github.com/Binnn-MX)).
* 写入带符号信息的 jemalloc 配置文件 (生成堆内存剖析时无需二进制可执行文件) 。[#93099](https://github.com/ClickHouse/ClickHouse/pull/93099) ([Azat Khuzhin](https://github.com/azat)) 。
* 恢复 `clickhouse git-import` 工具——此前它在处理过大或无效的提交时会失效。参见 [https://presentations.clickhouse.com/2020-matemarketing/。](https://presentations.clickhouse.com/2020-matemarketing/。) [#93202](https://github.com/ClickHouse/ClickHouse/pull/93202) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 不要在查询日志中显示 URL 存储中的密码。[#93245](https://github.com/ClickHouse/ClickHouse/pull/93245) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 为 `flipCoordinates` 新增对 `Geometry` 类型的支持。[#93303](https://github.com/ClickHouse/ClickHouse/pull/93303) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 改进 SYSTEM INSTRUMENT ADD/REMOVE 的用户体验：对函数名使用 String 字面量，修正所有匹配的函数，并允许在 `REMOVE` 中使用 function\_name。[#93345](https://github.com/ClickHouse/ClickHouse/pull/93345) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 新增设置 `materialize_statistics_on_merge`，用于在 merge 期间启用/禁用统计信息物化。默认值为 `1`。[#93379](https://github.com/ClickHouse/ClickHouse/pull/93379) ([Han Fei](https://github.com/hanfei1991)) 。
* ClickHouse 现在可以解析 `DESCRIBE SELECT` 查询中不带括号的 `SELECT`。修复了 [#58382](https://github.com/ClickHouse/ClickHouse/issues/58382)。[#93429](https://github.com/ClickHouse/ClickHouse/pull/93429) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 为缓存正确性检查增加了按概率随机执行的机制。[#93439](https://github.com/ClickHouse/ClickHouse/pull/93439) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 新增设置 `type_json_allow_duplicated_key_with_literal_and_nested_object`，允许 JSON 中出现重复路径，其中一个为字面量，另一个为嵌套对象，例如 `{"a" : 42, "a" : {"b" : 42}}`。在 [https://github.com/ClickHouse/ClickHouse/pull/79317](https://github.com/ClickHouse/ClickHouse/pull/79317) 中引入这一重复路径限制之前，某些数据可能已经创建；现在若继续操作这些数据，可能会导致错误。启用此设置后，这类旧数据仍可继续使用而不会报错。[#93604](https://github.com/ClickHouse/ClickHouse/pull/93604) ([Pavel Kruglov](https://github.com/Avogar)).
* 不要在 Pretty JSON 中将简单类型的值单独打印成一行。[#93836](https://github.com/ClickHouse/ClickHouse/pull/93836) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 当存在大量 `alter table ... modify setting ...` 语句时，可能会在 5 秒内无法获取锁。与其返回 `logical error`，不如返回 `timeout`。[#93856](https://github.com/ClickHouse/ClickHouse/pull/93856) ([Han Fei](https://github.com/hanfei1991)) 。
* 防止在出现语法错误时输出过多内容。此前，它会输出整个 SQL 脚本，其中可能包含大量查询。[#93876](https://github.com/ClickHouse/ClickHouse/pull/93876) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在 Keeper 中，正确计算带统计信息的 `check` 请求的字节大小。[#93907](https://github.com/ClickHouse/ClickHouse/pull/93907) ([Mikhail Artemenko](https://github.com/Michicosun)).
* 新增 `use_hash_table_stats_for_join_reordering` 设置，用于控制在 join 重排序时是否使用运行时哈希表大小统计信息。该设置默认启用，因此会保留 `collect_hash_table_stats_during_joins` 的现有行为。[#93912](https://github.com/ClickHouse/ClickHouse/pull/93912) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 现在，用户可以在 `system.server_settings` 表中部分查看嵌套的全局服务器设置 (例如 `logger.level`) 。这仅适用于具有固定结构的设置 (不包括列表、枚举、重复项等) 。[#94001](https://github.com/ClickHouse/ClickHouse/pull/94001) ([Hechem Selmi](https://github.com/m-selmi)) 。
* `QBit` 现已支持相等比较。[#94078](https://github.com/ClickHouse/ClickHouse/pull/94078) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 当 Keeper 检测到损坏的快照或不一致的更新日志时，会抛出异常，而不是要求手动中止或自动清理文件。这会让 Keeper 采用更安全的行为，即依赖人工干预。[#94168](https://github.com/ClickHouse/ClickHouse/pull/94168) ([Antonio Andelic](https://github.com/antonio2368)).
* 修复了 `CREATE TABLE` 失败时可能留下残留内容的问题。[#94174](https://github.com/ClickHouse/ClickHouse/pull/94174) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复在使用受密码保护的 TLS 私钥时对未初始化内存的访问问题 (OpenSSL 中的一个缺陷) 。[#94182](https://github.com/ClickHouse/ClickHouse/pull/94182) ([Konstantin Bogdanov](https://github.com/thevar1able)) 。
* 将 chdig 更新至 [v26.1.1](https://github.com/azat/chdig/releases/tag/v26.1.1)。[#94290](https://github.com/ClickHouse/ClickHouse/pull/94290) ([Azat Khuzhin](https://github.com/azat)) 。
* 支持 S3Queue ordered 模式下更通用的分区方式。[#94321](https://github.com/ClickHouse/ClickHouse/pull/94321) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 为设置 `allow_statistics_optimize` 新增了别名 `use_statistics`。这与现有设置 `use_primary_key` 和 `use_skip_indexes` 的命名更加一致。[#94366](https://github.com/ClickHouse/ClickHouse/pull/94366) ([Robert Schulze](https://github.com/rschu1ze)).
* 启用了设置 `input_format_numbers_enum_on_conversion_error`，以在从 Numbers 转换为枚举类型时检查元素是否存在。[#94384](https://github.com/ClickHouse/ClickHouse/pull/94384) ([Elmi Ahmadov](https://github.com/ahmadov)) 。
* 在 S3(Azure)Queue 的 ordered 模式下，借助跟踪限制清理失败节点 (此前仅在 Unordered 模式下对失败节点和已处理节点执行此操作；现在 Ordered 模式下也会执行，但仅限失败节点) 。[#94412](https://github.com/ClickHouse/ClickHouse/pull/94412) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 在 `clickhouse-local` 中为 `default` 用户启用访问管理。此前，`clickhouse-local` 中的 `default` 用户缺少 access\_management 权限，导致 `DROP ROW POLICY IF EXISTS` 之类的操作会因 `ACCESS_DENIED` 错误而失败，尽管该用户本应拥有不受限制的访问权限。[#94501](https://github.com/ClickHouse/ClickHouse/pull/94501) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 为 YTsaurus 字典和表启用 named collection 功能。[#94582](https://github.com/ClickHouse/ClickHouse/pull/94582) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* 为 BACKUP/RESTORE 添加了对用于 S3 和 Azure Blob 存储的 SQL 定义命名集合的支持。已关闭 [#94604](https://github.com/ClickHouse/ClickHouse/issues/94604)。[#94605](https://github.com/ClickHouse/ClickHouse/pull/94605) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 支持在 S3Queue 的 ordered 模式下按分区键分桶。[#94698](https://github.com/ClickHouse/ClickHouse/pull/94698) ([Bharat Nallan](https://github.com/bharatnc)) 。
* 新增一个异步指标，用于显示耗时最长的 merge 的运行时间。[#94825](https://github.com/ClickHouse/ClickHouse/pull/94825) ([Raúl Marín](https://github.com/Algunenano)).
* 在使用 IcebergBitmapPositionDeleteTransform 应用位置删除前，先添加归属文件检查。[#94897](https://github.com/ClickHouse/ClickHouse/pull/94897) ([Yang Jiang](https://github.com/Ted-Jiang)) 。
* 现在，`view_duration_ms` 显示的是 group 处于活跃状态的时长，而不是其中各线程耗时的总和。[#94966](https://github.com/ClickHouse/ClickHouse/pull/94966) ([Sema Checherinda](https://github.com/CheSema)) 。
* 移除了 `hasAnyTokens` 和 `hasAllTokens` 函数中搜索标记最大数量的限制，此前上限为 64。示例：`SELECT count() FROM table WHERE hasAllTokens(text, ['token_1', 'token_2', [...], 'token_65']]);` 该查询会因包含 65 个搜索标记而报 `BAD_ARGUMENTS` 错误。通过此 PR，该限制已被完全移除，因此相同的查询现在可以无错误运行。[#95152](https://github.com/ClickHouse/ClickHouse/pull/95152) ([Elmi Ahmadov](https://github.com/ahmadov)).
* 新增设置项 `input_format_numbers_enum_on_conversion_error`，用于在从 Numbers 转换为枚举时检查相应元素是否存在。关闭：[#56144](https://github.com/ClickHouse/ClickHouse/issues/56144)。[#56240](https://github.com/ClickHouse/ClickHouse/pull/56240) ([Nikolay Degterinsky](https://github.com/evillique)) 。
* 在 Iceberg 表中，在读取数据文件和位置删除文件时共享 format 解析器资源，以减少内存分配。[#94701](https://github.com/ClickHouse/ClickHouse/pull/94701) ([Yang Jiang](https://github.com/Ted-Jiang)).

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

* 修复了一个问题：在执行插入时，预定义查询处理程序会将末尾空白解析为数据。[#83604](https://github.com/ClickHouse/ClickHouse/pull/83604) ([Fabian Ponce](https://github.com/FabianPonce)).
* 修复了在 Join 存储上应用 outer to inner join 优化时出现的 INCOMPATIBLE\_TYPE\_OF\_JOIN 错误。解决了 [#80794](https://github.com/ClickHouse/ClickHouse/issues/80794)。[#84292](https://github.com/ClickHouse/ClickHouse/pull/84292) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在启用 `allow_experimental_join_right_table_sorting` 时使用 hash join 会报出异常 "Invalid number of rows in Chunk" 的问题。[#86440](https://github.com/ClickHouse/ClickHouse/pull/86440) ([yanglongwei](https://github.com/ylw510)).
* 如果 filesystem 大小写不敏感，则在 MergeTree 中始终将文件名替换为哈希。此前，在使用大小写不敏感 filesystem (如 MacOS) 的系统上，如果多个列/子列名称仅大小写不同，可能会导致数据损坏。[#86559](https://github.com/ClickHouse/ClickHouse/pull/86559) ([Pavel Kruglov](https://github.com/Avogar)).
* 在创建阶段，对 materialized view 中的底层查询执行完整的权限检查。[#89180](https://github.com/ClickHouse/ClickHouse/pull/89180) ([pufit](https://github.com/pufit)) 。
* 修复了 `icebergHash` 函数在常量参数情况下发生崩溃的问题。[#90335](https://github.com/ClickHouse/ClickHouse/pull/90335) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了以下逻辑错误：无事务的变更会修改处于活动事务中的 parts，而该事务最终会被回滚。[#90469](https://github.com/ClickHouse/ClickHouse/pull/90469) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 在普通数据库转换为 atomic 数据库后，`system.warnings` 会被正确更新。[#90473](https://github.com/ClickHouse/ClickHouse/pull/90473) ([sdk2](https://github.com/sdk2)) 。
* 修复了以下断言问题：从 Parquet 文件读取数据时，如果 **prewhere** 表达式的一部分也在查询的其他位置使用，就会触发该断言。[#90635](https://github.com/ClickHouse/ClickHouse/pull/90635) ([Max Kainov](https://github.com/maxknv)).
* 修复了在 split-by-buckets 模式下从 Iceberg 读取时单节点集群发生崩溃的问题。此更改关闭了 [#90913](https://github.com/ClickHouse/ClickHouse/issues/90913#issue-3668583963)。[#91553](https://github.com/ClickHouse/ClickHouse/pull/91553) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复了 Log 引擎在读取子列时可能出现的逻辑错误。关闭 [#91710](https://github.com/ClickHouse/ClickHouse/issues/91710)。[#91711](https://github.com/ClickHouse/ClickHouse/pull/91711) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复 ATTACH AS REPLICATED 期间出现的逻辑错误：'Storage 不支持事务'。[#91772](https://github.com/ClickHouse/ClickHouse/pull/91772) ([Shaohua Wang](https://github.com/tiandiwonder)).
* 修复了在 LEFT ANTI JOIN 带有额外后置条件时，运行时过滤器无法正常工作的问题。[#91824](https://github.com/ClickHouse/ClickHouse/pull/91824) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复了一个在涉及 Nothing 类型的 NULL 安全比较时出现的错误。关闭 [#91834](https://github.com/ClickHouse/ClickHouse/issues/91834)。关闭 [#84870](https://github.com/ClickHouse/ClickHouse/issues/84870)。关闭 [#91821](https://github.com/ClickHouse/ClickHouse/issues/91821)。[#91884](https://github.com/ClickHouse/ClickHouse/pull/91884) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复 native Parquet reader 中影响高度重复字符串数据的 DELTA\_BYTE\_ARRAY 解码问题。[#91929](https://github.com/ClickHouse/ClickHouse/pull/91929) ([Daniel Muino](https://github.com/dmuino)) 。
* 在 schema inference 期间，对于通配符中的文件，仅缓存推断出该 schema 的那个文件的 schema，而不是缓存所有文件的 schema。关闭了 [#91745](https://github.com/ClickHouse/ClickHouse/issues/91745)。[#92006](https://github.com/ClickHouse/ClickHouse/pull/92006) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了因归档条目大小头部信息错误导致的 `Couldn't pack tar archive: Failed to write all bytes` 错误。修复 [#89075](https://github.com/ClickHouse/ClickHouse/issues/89075)。[#92122](https://github.com/ClickHouse/ClickHouse/pull/92122) ([Julia Kartseva](https://github.com/jkartseva)) 。
* 在 insert select 中释放请求流，以避免关闭 HTTP 连接。[#92175](https://github.com/ClickHouse/ClickHouse/pull/92175) ([Sema Checherinda](https://github.com/CheSema)) 。
* 修复了在使用 `USING` 子句和 `join_use_nulls` 时，包含多个 JOIN 的查询中的逻辑错误。[#92251](https://github.com/ClickHouse/ClickHouse/pull/92251) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复启用 join\_use\_nulls 时进行 join 重排序时的逻辑错误，关闭 [https://github.com/clickhouse/clickhouse/issues/90795。](https://github.com/clickhouse/clickhouse/issues/90795。) [#92289](https://github.com/ClickHouse/ClickHouse/pull/92289) ([Vladimir Cherkasov](https://github.com/vdimir))。
* 修复了 `arrayElement` 与取反字面量一起使用时 AST 格式不一致的问题。关闭了 [#92288](https://github.com/ClickHouse/ClickHouse/issues/92288) 关闭了 [#92212](https://github.com/ClickHouse/ClickHouse/issues/92212) 关闭了 [#91832](https://github.com/ClickHouse/ClickHouse/issues/91832) 关闭了 [#91789](https://github.com/ClickHouse/ClickHouse/issues/91789) 关闭了 [#91735](https://github.com/ClickHouse/ClickHouse/issues/91735) 关闭了 [#88495](https://github.com/ClickHouse/ClickHouse/issues/88495) 关闭了 [#92386](https://github.com/ClickHouse/ClickHouse/issues/92386)。[#92293](https://github.com/ClickHouse/ClickHouse/pull/92293) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了 `join_on_disk_max_files_to_merge` 设置可能引发崩溃的问题。[#92335](https://github.com/ClickHouse/ClickHouse/pull/92335) ([Bharat Nallan](https://github.com/bharatnc)).
* 相关 issue：#[https://github.com/ClickHouse/support-escalation/issues/6365。\[#92339](https://github.com/ClickHouse/support-escalation/issues/6365。\[#92339)]\([https://github.com/ClickHouse/ClickHouse/pull/92339](https://github.com/ClickHouse/ClickHouse/pull/92339)) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复了 `SYSTEM SYNC FILE CACHE` 中遗漏的访问检查。关闭了 [#92101](https://github.com/ClickHouse/ClickHouse/issues/92101)。[#92372](https://github.com/ClickHouse/ClickHouse/pull/92372) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 修复 `count_distinct_optimization` 在窗口函数和多个参数场景下的处理问题。[#92376](https://github.com/ClickHouse/ClickHouse/pull/92376) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在某些聚合函数与窗口函数一起使用时出现的 "Cannot write to finalized buffer" 错误。关闭 [#91415](https://github.com/ClickHouse/ClickHouse/issues/91415)。[#92395](https://github.com/ClickHouse/ClickHouse/pull/92395) ([Jimmy Aguilar Mena](https://github.com/Ergus)) 。
* 修复了 `CREATE TABLE ... AS urlCluster()` 与数据库引擎 `Replicated` 搭配使用时的逻辑错误。关闭 [#92216](https://github.com/ClickHouse/ClickHouse/issues/92216)。[#92418](https://github.com/ClickHouse/ClickHouse/pull/92418) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在 MergeTree 中执行变更时，继承源数据分片的序列化信息设置。这样可修复在数据类型序列化发生变化后，查询已变更分片时可能返回错误结果的问题。[#92419](https://github.com/ClickHouse/ClickHouse/pull/92419) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复列与同名子列之间可能存在的冲突，该问题会导致使用错误的序列化方式并引发查询失败。关闭 [#90219](https://github.com/ClickHouse/ClickHouse/issues/90219)。关闭 [#85161](https://github.com/ClickHouse/ClickHouse/issues/85161)。[#92453](https://github.com/ClickHouse/ClickHouse/pull/92453) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了一个 `LOGICAL_ERROR`：其原因是在将 outer join 转换为 inner join 时，对查询计划进行了非预期的修改。同时放宽了该优化的适用条件，使其也能用于在 join 过程中对聚合键应用单射函数的情况。[#92503](https://github.com/ClickHouse/ClickHouse/pull/92503) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了对空 Tuple 列排序时可能出现的错误 `SIZES_OF_COLUMNS_DOESNT_MATCH`。关闭了 [#92422](https://github.com/ClickHouse/ClickHouse/issues/92422)。[#92520](https://github.com/ClickHouse/ClickHouse/pull/92520) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 检查 JSON 类型中不兼容的类型化路径。关闭 [#91577](https://github.com/ClickHouse/ClickHouse/issues/91577)。[#92539](https://github.com/ClickHouse/ClickHouse/pull/92539) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复对 Backup 数据库执行 SHOW CREATE DATABASE 时出现的死锁问题。[#92541](https://github.com/ClickHouse/ClickHouse/pull/92541) ([Azat Khuzhin](https://github.com/azat)) 。
* 验证 hypothesis 索引时使用正确的错误代码。[#92559](https://github.com/ClickHouse/ClickHouse/pull/92559) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 analyzer 中列别名里的动态子列解析问题。此前，列别名中的动态子列会被包裹在 `getSubcolumn` 中，因此在某些情况下可能根本无法解析。关闭了 [#91434](https://github.com/ClickHouse/ClickHouse/issues/91434)。[#92583](https://github.com/ClickHouse/ClickHouse/pull/92583) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 防止 tokens() 在第二个参数为 NULL 时发生崩溃。[#92586](https://github.com/ClickHouse/ClickHouse/pull/92586) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了一个潜在崩溃问题：其原因是底层 const PREWHERE 列被原地变更。这种情况可能发生在列收缩 (`IColumn::shrinkToFit`) 或过滤 (`IColumn::filter`) 时，并且可能被多个线程同时触发。[#92588](https://github.com/ClickHouse/ClickHouse/pull/92588) ([Arsen Muk](https://github.com/arsenmuk)) 。
* 在包含大型 parts (超过 4,294,967,295 行) 的表上创建和物化文本索引的功能已被暂时禁用。此限制可防止查询结果出错，因为当前的索引实现尚不支持如此大的 parts。[#92644](https://github.com/ClickHouse/ClickHouse/pull/92644) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了执行 JOIN 时出现的逻辑错误 `Too large size (A) passed to allocator`。已关闭 [#92043](https://github.com/ClickHouse/ClickHouse/issues/92043)。[#92667](https://github.com/ClickHouse/ClickHouse/pull/92667) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了一个问题：当 `ngrambf_v1` 索引的 ngram 长度 (第 1 个参数) > 8 时，会抛出异常。[#92672](https://github.com/ClickHouse/ClickHouse/pull/92672) ([Robert Schulze](https://github.com/rschu1ze)) 。
* 修复在使用 ZooKeeper 存储时，后台重新加载 named collections 期间出现的未捕获异常。关闭 [https://github.com/ClickHouse/clickhouse-private/issues/44180。](https://github.com/ClickHouse/clickhouse-private/issues/44180。) [#92717](https://github.com/ClickHouse/ClickHouse/pull/92717) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修正了通配符授权的访问授权检查中的错误逻辑。此前的尝试 [https://github.com/ClickHouse/ClickHouse/pull/90928](https://github.com/ClickHouse/ClickHouse/pull/90928) 虽然修复了一个严重漏洞，但限制过于严格，导致某些通配符 `GRANT` 语句会因无关的 `REVOKE` 操作而失败。[#92725](https://github.com/ClickHouse/ClickHouse/pull/92725) ([pufit](https://github.com/pufit)).
* 修复了在 `WHERE` 中使用 `not match(...)` 时数据跳过逻辑中的一个缺陷，该缺陷会导致结果错误。关闭了 [#92492](https://github.com/ClickHouse/ClickHouse/issues/92492)。[#92726](https://github.com/ClickHouse/ClickHouse/pull/92726) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 如果在只读磁盘上创建了 MergeTree 表，则启动时不要尝试删除临时目录。[#92748](https://github.com/ClickHouse/ClickHouse/pull/92748) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复 ALTER TABLE REWRITE PARTS (v2) 中“无法向空的 ExpressionActionsChain 添加操作”的问题。 [#92754](https://github.com/ClickHouse/ClickHouse/pull/92754) ([Azat Khuzhin](https://github.com/azat)).
* 避免因从已断开的 `Connection` 中读取而崩溃。[#92807](https://github.com/ClickHouse/ClickHouse/pull/92807) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 修复了 `S3Queue` 存储在 `Ordered` 模式下的逻辑错误 ` Failed to set file processing within 100 retries`。该错误现已改为警告。在 25.10 之前的版本中，如果 Keeper 会话过期，可能会出现此错误；不过在 25.10+ 版本中，它也只会显示为警告，因为理论上在 `Ordered` 模式下处理并发较高时，仍有可能触发此错误。[#92814](https://github.com/ClickHouse/ClickHouse/pull/92814) ([Kseniia Sumarokova](https://github.com/kssenii)).
* 此前，一些在 PK 分片中使用恒假条件的查询会失败。现在已不会。[https://github.com/ClickHouse/ClickHouse/pull/89313](https://github.com/ClickHouse/ClickHouse/pull/89313) 需要此修复。[#92815](https://github.com/ClickHouse/ClickHouse/pull/92815) ([Yarik Briukhovetskyi](https://github.com/yariks5s)) 。
* 修复了 `system.parts` 表中文本索引未压缩大小的计算问题。[#92832](https://github.com/ClickHouse/ClickHouse/pull/92832) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了轻量级更新中主索引的使用问题：当 `WHERE` 子句中的谓词包含带子查询的 `IN` 子句时，会出现该问题。[#92838](https://github.com/ClickHouse/ClickHouse/pull/92838) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了在 JSON 中为路径 'skip' 创建类型提示时的问题。关闭了 [#92731](https://github.com/ClickHouse/ClickHouse/issues/92731)。[#92842](https://github.com/ClickHouse/ClickHouse/pull/92842) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 在 S3 表引擎中，如果存在非确定性函数，则不应缓存分区键。[#92844](https://github.com/ClickHouse/ClickHouse/pull/92844) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了在对设置 `ratio_of_defaults_for_sparse_serialization=0.0` 的稀疏列执行变更后，可能出现 `FILE_DOESNT_EXIST` 错误的问题。关闭 [#92633](https://github.com/ClickHouse/ClickHouse/issues/92633)。[#92860](https://github.com/ClickHouse/ClickHouse/pull/92860) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复旧版 Parquet 读取器 (默认不使用) 在 JSON 列位于 Tuple 列之后时的 Parquet schema 推断问题。修复旧版 Parquet 读取器 (默认不使用) 在处理空 Tuple 时失败的问题。[#92867](https://github.com/ClickHouse/ClickHouse/pull/92867) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复在常量条件下进行多个 join 且启用 `join_use_nulls` 时的逻辑错误，关闭 [#92640](https://github.com/ClickHouse/ClickHouse/issues/92640)。[#92892](https://github.com/ClickHouse/ClickHouse/pull/92892) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复在向分区表达式包含子列的表中插入数据时，可能出现的错误 `NOT_FOUND_COLUMN_IN_BLOCK`。关闭 [#93210](https://github.com/ClickHouse/ClickHouse/issues/93210)。关闭 [#83406](https://github.com/ClickHouse/ClickHouse/issues/83406)。[#92905](https://github.com/ClickHouse/ClickHouse/pull/92905) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 Merge 引擎在带别名的表上报错 `NO_SUCH_COLUMN_IN_TABLE` 的问题。关闭 [#88665](https://github.com/ClickHouse/ClickHouse/issues/88665)。[#92910](https://github.com/ClickHouse/ClickHouse/pull/92910) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在 LowCardinality(Nullable(T)) 列上执行 full\_sorting\_join 时 NULL != NULL 的问题。[#92924](https://github.com/ClickHouse/ClickHouse/pull/92924) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了 `MergeTree` 表中文本索引合并期间发生的多次崩溃。[#92925](https://github.com/ClickHouse/ClickHouse/pull/92925) ([Anton Popov](https://github.com/CurtizJ)).
* 如有需要，在生存时间 (TTL) 聚合期间恢复 SET 表达式结果上的 LowCardinality 封装，以避免在表优化过程中出现异常。[#92971](https://github.com/ClickHouse/ClickHouse/pull/92971) ([Seva Potapov](https://github.com/seva-potapov)) 。
* 修复了在 `has` 函数中使用空数组时，索引分析过程中的逻辑错误。关闭 [#92906](https://github.com/ClickHouse/ClickHouse/issues/92906)。[#92995](https://github.com/ClickHouse/ClickHouse/pull/92995) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复终止后台调度池时可能卡住的问题 (可能导致服务器关闭时卡住) 。[#93008](https://github.com/ClickHouse/ClickHouse/pull/93008) ([Azat Khuzhin](https://github.com/azat)).
* 修复了这样一种可能出现的错误：通过 alter 将设置 `ratio_of_defaults_for_sparse_serialization` 更改为 `1.0` 后，在执行稀疏列变更时可能会出现 FILE\_DOESNT\_EXIST。[#93016](https://github.com/ClickHouse/ClickHouse/pull/93016) ([Pavel Kruglov](https://github.com/Avogar)).
* 修复了在 WHERE 中使用 `not materialize(...)` 或 `not CAST(...)` 时，数据 skipping 逻辑中的缺陷；该问题会导致结果错误。关闭 [#88536](https://github.com/ClickHouse/ClickHouse/issues/88536)。[#93017](https://github.com/ClickHouse/ClickHouse/pull/93017) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* 修复因共享 parts 中的 TOCTOU 竞争而可能使用过期分区片段的问题。[#93022](https://github.com/ClickHouse/ClickHouse/pull/93022) ([Azat Khuzhin](https://github.com/azat)).
* 修复反序列化带有越界偏移量的格式错误 `groupConcat` 聚合状态时发生的崩溃。[#93028](https://github.com/ClickHouse/ClickHouse/pull/93028) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了预先取消分布式查询后连接处于异常状态的问题。[#93029](https://github.com/ClickHouse/ClickHouse/pull/93029) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了右侧连接键为稀疏列时连接结果出错的问题。此修复解决了 [#92920](https://github.com/ClickHouse/ClickHouse/issues/92920)。我只能在 `set compatibility='23.3'` 的情况下复现这个问题。不确定是否应该回移。[#93038](https://github.com/ClickHouse/ClickHouse/pull/93038) ([Amos Bird](https://github.com/amosbird)).
* 修复 `estimateCompressionRatio()` 中可能出现的 `Cannot finalize buffer after cancellation` 错误。修复内容见：[#87380](https://github.com/ClickHouse/ClickHouse/issues/87380)。[#93068](https://github.com/ClickHouse/ClickHouse/pull/93068) ([Azat Khuzhin](https://github.com/azat)).
* 修复了基于复杂表达式 (如 `concat(col1, col2)`) 构建的文本索引在合并时出现的问题。[#93073](https://github.com/ClickHouse/ClickHouse/pull/93073) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了过滤器包含子列时无法应用投影的问题。关闭了 [#92882](https://github.com/ClickHouse/ClickHouse/issues/92882)。[#93141](https://github.com/ClickHouse/ClickHouse/pull/93141) ([Pavel Kruglov](https://github.com/Avogar))。
* 修复了某些情况下在将 join 运行时过滤器添加到查询计划时触发的逻辑错误。该问题是由于错误地从 join 的一侧返回了重复的 const 列所致。[#93144](https://github.com/ClickHouse/ClickHouse/pull/93144) ([Alexander Gololobov](https://github.com/davenger)) 。
* 用于 join 运行时过滤器的特殊函数 `__applyFilter` 在某些本应有效的情况下会返回 ILLEGAL\_TYPE\_OF\_ARGUMENT。[#93187](https://github.com/ClickHouse/ClickHouse/pull/93187) ([Alexander Gololobov](https://github.com/davenger)) 。
* 当插值列实际上是同一列的别名时，防止不同的插值列在一个块中合并为同一列。[#93197](https://github.com/ClickHouse/ClickHouse/pull/93197) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)) 。
* 在与已补齐的右表进行连接时，不要添加运行时过滤器。[#93211](https://github.com/ClickHouse/ClickHouse/pull/93211) ([Alexander Gololobov](https://github.com/davenger)) 。
* 修复 Keeper 在会话失效后未清理持久 watches 的问题。该修复关闭了 [#92480](https://github.com/ClickHouse/ClickHouse/issues/92480)。[#93213](https://github.com/ClickHouse/ClickHouse/pull/93213) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复 Iceberg 中 ORDER BY Tuple 的问题。此更改关闭了 [#92977](https://github.com/ClickHouse/ClickHouse/issues/92977)。[#93225](https://github.com/ClickHouse/ClickHouse/pull/93225) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* 修复了 S3Queue 设置 `s3queue_migrate_old_metadata_to_buckets` 中的错误。关闭了 [#93392](https://github.com/ClickHouse/ClickHouse/issues/93392)、[#93196](https://github.com/ClickHouse/ClickHouse/issues/93196)、[#81739](https://github.com/ClickHouse/ClickHouse/issues/81739)。[#93232](https://github.com/ClickHouse/ClickHouse/pull/93232) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 在合并过程中重建投影时，会移除未使用的列。这可降低内存使用量，并减少临时 parts 的创建。[#93233](https://github.com/ClickHouse/ClickHouse/pull/93233) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* 修复了在存在标量关联子查询时，子查询中未使用列被移除的问题。修复前，如果某一列仅在关联子查询中使用，就可能被误删，从而导致查询报 `NOT_FOUND_COLUMN_IN_BLOCK` 错误而失败。[#93273](https://github.com/ClickHouse/ClickHouse/pull/93273) ([Dmitry Novik](https://github.com/novikd)).
* 修复在对源表执行 ALTER 时，MV 中可能缺失子列的问题。关闭 [#93231](https://github.com/ClickHouse/ClickHouse/issues/93231)。[#93276](https://github.com/ClickHouse/ClickHouse/pull/93276) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 analyzer 在为 `Merge` 表引擎规划查询时的问题：合并本地表与远程/Distributed 表时，可能会对 `hostName()` 抛出 ILLEGAL\_COLUMN。关闭 [#92059](https://github.com/ClickHouse/ClickHouse/issues/92059)。[#93286](https://github.com/ClickHouse/ClickHouse/pull/93286) ([Jinlin](https://github.com/withlin)) 。
* 修复了使用非常量数组参数时，`NOT IN` 返回错误值的问题 + 支持非常量 Array 函数。关闭 [#14980](https://github.com/ClickHouse/ClickHouse/issues/14980)。[#93314](https://github.com/ClickHouse/ClickHouse/pull/93314) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* 修复 `use_top_k_dynamic_filtering` 优化导致的 `Not found column` 问题。修复了 [#93186](https://github.com/ClickHouse/ClickHouse/issues/93186)。[#93316](https://github.com/ClickHouse/ClickHouse/pull/93316) ([Nikolai Kochetov](https://github.com/KochetovNicolai)) 。
* 修复了基于子列创建的文本索引在重建时出现的问题。[#93326](https://github.com/ClickHouse/ClickHouse/pull/93326) ([Anton Popov](https://github.com/CurtizJ)) 。
* 修复了 `hasAllTokens` 和 `hasAnyTokens` 函数将空数组作为第二个参数时的处理问题。[#93328](https://github.com/ClickHouse/ClickHouse/pull/93328) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在针对右侧表计算 totals 的查询中使用运行时过滤器时出现的逻辑错误。[#93330](https://github.com/ClickHouse/ClickHouse/pull/93330) ([Alexander Gololobov](https://github.com/davenger)).
* 如果使用非常量的分词器参数 (第 2、3、4 个参数) 调用函数 `tokens`，server 将不再崩溃，例如 `SELECT tokens(NULL, 1, materialize(1))`。 [#93383](https://github.com/ClickHouse/ClickHouse/pull/93383) ([Robert Schulze](https://github.com/rschu1ze)).
* 修复了 `groupConcat` 状态反序列化中的整数溢出漏洞；该漏洞可能因精心构造的聚合状态而引发内存安全问题。[#93426](https://github.com/ClickHouse/ClickHouse/pull/93426) ([Raufs Dunamalijevs](https://github.com/rienath)) 。
* 修复了在索引不包含任何标记 (所有数组都为空，或所有标记均被分词器跳过) 时，对数组列进行文本索引分析的问题。[#93457](https://github.com/ClickHouse/ClickHouse/pull/93457) ([Anton Popov](https://github.com/CurtizJ)).
* 当连接字符串中已包含用户名/密码时，避免在 ClickHouse Client 中使用 oauth 登录。[#93459](https://github.com/ClickHouse/ClickHouse/pull/93459) ([Krishna Mannem](https://github.com/kcmannem)) 。
* 修复 DataLakeCatalog 对 Azure ADLS Gen2 下发凭据的支持：从 Iceberg REST 目录中解析 `adls.sas-token.*` 参数，并修复 ABFSS URL 解析。[#93477](https://github.com/ClickHouse/ClickHouse/pull/93477) ([Karun Anantharaman](https://github.com/karunmotorq)).
* 修复了 analyzer 对 GLOBAL IN 的支持问题 (此前会在远程节点上再次创建 set) 。 [#93507](https://github.com/ClickHouse/ClickHouse/pull/93507) ([Azat Khuzhin](https://github.com/azat)).
* 修复了在反序列化时直接提取到稀疏列中的子列的问题。[#93512](https://github.com/ClickHouse/ClickHouse/pull/93512) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了在搜索查询重复时无法从文本索引直接读取的问题。 [#93516](https://github.com/ClickHouse/ClickHouse/pull/93516) ([Anton Popov](https://github.com/CurtizJ)).
* 修复了在启用运行时过滤器且 join 的表中同一列被重复返回多次时 (例如 `SELECT a, a, a FROM t`) 出现的 NOT\_FOUND\_COLUMN\_IN\_BLOCK 错误。[#93526](https://github.com/ClickHouse/ClickHouse/pull/93526) ([Alexander Gololobov](https://github.com/davenger)).
* 修复了一个问题：通过 ssh 连接时，clickhouse-client 会要求输入两次密码。 [#93547](https://github.com/ClickHouse/ClickHouse/pull/93547) ([Isak Ellmer](https://github.com/spinojara)).
* 确保 ZooKeeper 在关闭时能够正常完成清理 (修复了极少数情况下关闭时可能卡住的问题) 。[#93602](https://github.com/ClickHouse/ClickHouse/pull/93602) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复恢复 ReplicatedMergeTree 时因去重竞争条件导致的 LOGICAL\_ERROR。[#93612](https://github.com/ClickHouse/ClickHouse/pull/93612) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了在某些输入格式中直接反序列化到 Sparse 列时，使用 Sparse 列更新生存时间 (TTL) 的问题。此修复还解决了可能出现的逻辑错误 `Unexpected type of result TTL column`。[#93619](https://github.com/ClickHouse/ClickHouse/pull/93619) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复了 `h3 index` 函数在传入无效输入时有时会崩溃或卡死的问题。[#93657](https://github.com/ClickHouse/ClickHouse/pull/93657) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 在非 UTF-8 数据上使用 `ngram_bf` 索引会导致读取未初始化的内存，其中的值可能会出现在生成的索引结构中。修复了 [#92576](https://github.com/ClickHouse/ClickHouse/issues/92576)。[#93663](https://github.com/ClickHouse/ClickHouse/pull/93663) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 验证解压后缓冲区的大小是否符合预期。[#93690](https://github.com/ClickHouse/ClickHouse/pull/93690) ([Raúl Marín](https://github.com/Algunenano)) 。
* 防止用户通过 `merge` 表引擎在未检查 `SHOW COLUMNS` 权限的情况下获取表的列列表。[#93695](https://github.com/ClickHouse/ClickHouse/pull/93695) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* 修复了基于子列创建的跳过索引的物化问题。[#93708](https://github.com/ClickHouse/ClickHouse/pull/93708) ([Anton Popov](https://github.com/CurtizJ)).
* 我们将 storages 的共享指针保存在 `QueryPipeline::resources::storage_holders` 中，以确保在 `PipelineExecutor` 存活期间，`IStorage` 对象不会被销毁。[#93746](https://github.com/ClickHouse/ClickHouse/pull/93746) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复了重启后 interserver host 发生变化时无法 Attach Replicated 数据库的问题。[#93779](https://github.com/ClickHouse/ClickHouse/pull/93779) ([Tuan Pham Anh](https://github.com/tuanpach)) 。
* 修复了在启用缓存时，`ReadBufferFromS3` 中触发的断言 `!read_until_position`。[#93809](https://github.com/ClickHouse/ClickHouse/pull/93809) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在极少数情况下，将空元组用于 `Map` 列时出现的逻辑错误。关闭 [#93784](https://github.com/ClickHouse/ClickHouse/issues/93784)。[#93814](https://github.com/ClickHouse/ClickHouse/pull/93814) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了在合并过程中重建 projections 时 `_part_offset` 损坏的问题，并通过避免对 `_part_offset` 列进行不必要的读取，以及在 projection 计算中跳过不需要的列，优化了 projection 处理。这延续了 [#93233](https://github.com/ClickHouse/ClickHouse/issues/93233) 中引入的优化。[#93827](https://github.com/ClickHouse/ClickHouse/pull/93827) ([Amos Bird](https://github.com/amosbird)) 。
* 移除了对 'Bad version' 的处理逻辑。 [#93843](https://github.com/ClickHouse/ClickHouse/pull/93843) ([Anton Ivashkin](https://github.com/ianton-ru)).
* 修复了当键为有符号整数类型时，`optimize_inverse_dictionary_lookup` 在 Distributed 查询中不生效的问题。关闭 [#93259](https://github.com/ClickHouse/ClickHouse/issues/93259)。[#93848](https://github.com/ClickHouse/ClickHouse/pull/93848) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复了分布式 `remote()` 查询中 `lag`/`lead` 不生效的问题。解决 [#90014](https://github.com/ClickHouse/ClickHouse/issues/90014)。[#93858](https://github.com/ClickHouse/ClickHouse/pull/93858) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复 system instrument dispatch 中的缺陷。[#93937](https://github.com/ClickHouse/ClickHouse/pull/93937) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 在 [https://github.com/ClickHouse/ClickHouse/pull/89173](https://github.com/ClickHouse/ClickHouse/pull/89173) 中，我们给 `TraceSender` 通过内部管道发送的结构新增了一个字段。然而，buffer 的大小没有同步更新 ([这里](https://github.com/ClickHouse/ClickHouse/pull/89173/changes#diff-36ecfac5cde34c92c031652d8a77f0d12782cd5d43e68d6ef159e6d46a54224fL44)) ，因此写入 buffer 的数据量超过了 `buffer_size`，从而导致多次刷写。并且由于 `TraceSender::send` 会由不同线程调用，不同线程的刷写可能会交错在一起，破坏了接收端 (`TraceCollector`) 所依赖的不变量。[#93966](https://github.com/ClickHouse/ClickHouse/pull/93966) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)) 。
* 修复带有 `USING` 子句的 `Join` 存储在执行 join 操作时转换为超类型的类型转换问题。修复了 [#91672](https://github.com/ClickHouse/ClickHouse/issues/91672)。修复了 [#78572](https://github.com/ClickHouse/ClickHouse/issues/78572)。[#94000](https://github.com/ClickHouse/ClickHouse/pull/94000) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复了在 Merge 表上应用 join 运行时过滤器时，未正确添加 FilterStep 的问题。[#94021](https://github.com/ClickHouse/ClickHouse/pull/94021) ([Alexander Gololobov](https://github.com/davenger)) 。
* 如果某个 `SELECT` 查询包含针对多个列的谓词，使用了 bloom filter 跳过索引，并且同时存在 `OR` 和 `NOT` 条件，则可能返回不一致的结果。该问题现已修复。[#94026](https://github.com/ClickHouse/ClickHouse/pull/94026) ([Shankar Iyer](https://github.com/shankar-iyer)) 。
* 修复对带有依赖索引的列执行 CLEAR 时出现的问题。[#94057](https://github.com/ClickHouse/ClickHouse/pull/94057) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 `ReadWriteBufferFromHTTP` 中使用未初始化值的问题。[#94058](https://github.com/ClickHouse/ClickHouse/pull/94058) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了对 JSON 中类型化路径的不正确检查。该检查是在 [https://github.com/ClickHouse/ClickHouse/pull/92842](https://github.com/ClickHouse/ClickHouse/pull/92842) 中引入的，可能会在现有表启动时导致 error。[#94070](https://github.com/ClickHouse/ClickHouse/pull/94070) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在存在 OUTER JOIN 的情况下进行过滤器分析时发生的崩溃。修复了 [#90979](https://github.com/ClickHouse/ClickHouse/issues/90979)。[#94080](https://github.com/ClickHouse/ClickHouse/pull/94080) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复在并行使用 UInt8 聚合键时 `uniqTheta` 的精度问题 (`max_threads` > 1，默认值) 。[#94095](https://github.com/ClickHouse/ClickHouse/pull/94095) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在 `SCOPE_EXIT` 内调用 `socket.setBlocking(true)` 时抛出异常而导致的崩溃。[#94100](https://github.com/ClickHouse/ClickHouse/pull/94100) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了在 ReplicatedMergeTree 中，`DROP PARTITION` 删除由后续日志条目创建的 parts 时导致的数据丢失问题。[#94123](https://github.com/ClickHouse/ClickHouse/pull/94123) ([Tuan Pham Anh](https://github.com/tuanpach)).
* 已修复 Parquet reader v3 错误处理跨越页面边界的数组的问题。例如，这种情况会出现在由 Arrow 写入且未启用 page statistics 或 page index 的文件中。仅影响 Array 数据类型的列。可能的症状是，大约每 1 MB 数据就会有一个数组被截断。在此修复发布前，可使用以下设置作为临时解决方法：`input_format_parquet_use_native_reader_v3 = 0`。[#94125](https://github.com/ClickHouse/ClickHouse/pull/94125) ([Michael Kolupaev](https://github.com/al13n321)) 。
* 修复了 ReplicatedMergeTree 在等待日志条目时 watch 数量过多的问题。[#94133](https://github.com/ClickHouse/ClickHouse/pull/94133) ([Azat Khuzhin](https://github.com/azat)) 。
* 函数 `arrayShuffle`、`arrayPartialShuffle` 和 `arrayRandomSample` 现支持将常量列物化，从而使不同行得到不同的结果。[#94134](https://github.com/ClickHouse/ClickHouse/pull/94134) ([Joanna Hulboj](https://github.com/jh0x)) 。
* 修复了在 materialized view 中对表函数求值时的数据竞争问题。[#94171](https://github.com/ClickHouse/ClickHouse/pull/94171) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 `PostgreSQL` 数据库引擎中的 nullptr 解引用问题 (当查询有误时会触发) 。关闭 [#92887](https://github.com/ClickHouse/ClickHouse/issues/92887)。[#94180](https://github.com/ClickHouse/ClickHouse/pull/94180) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了可刷新materialized views在使用包含多个子查询的 `SELECT` 查询时出现的内存泄漏问题。[#94200](https://github.com/ClickHouse/ClickHouse/pull/94200) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了 `DataPartStorageOnDiskBase::remove` 与 `system.parts` 之间的数据竞争。关闭 [#49076](https://github.com/ClickHouse/ClickHouse/issues/49076)。[#94262](https://github.com/ClickHouse/ClickHouse/pull/94262) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 移除了 HashTable 复制赋值中错误的 `noexcept` 指定符，该问题在发生内存异常时可能导致程序崩溃 (`std::terminate`) 。[#94275](https://github.com/ClickHouse/ClickHouse/pull/94275) ([Nikita Taranov](https://github.com/nickitat)) 。
* 此前，如果创建的投影在 GROUP BY 中包含重复列 (例如 `GROUP BY c0, c0`) ，插入数据时在启用 `optimize_row_order` 的情况下会触发 `std::length_error`。修复了 [#94065](https://github.com/ClickHouse/ClickHouse/issues/94065)。[#94277](https://github.com/ClickHouse/ClickHouse/pull/94277) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 ZooKeeper 客户端在连接时的一个隐蔽问题，该问题会导致卡死和崩溃。[#94320](https://github.com/ClickHouse/ClickHouse/pull/94320) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复“函数到子列”优化未对子列生效的问题。[#94323](https://github.com/ClickHouse/ClickHouse/pull/94323) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 修复在启用 `enable_lazy_columns_replication` 时，嵌套 RIGHT JOIN 可能导致结果不正确的问题。该缺陷会导致启用复制的列中的所有行错误地返回相同的值，而不是各不相同的值。关闭 [#93891](https://github.com/ClickHouse/ClickHouse/issues/93891)。[#94339](https://github.com/ClickHouse/ClickHouse/pull/94339) ([Vladimir Cherkasov](https://github.com/vdimir)) 。
* 修复了在 SEMI JOIN 中使用等价集合进行过滤器下推的问题。如果参数类型发生变化，则不要下推过滤器。修复了 [#93264](https://github.com/ClickHouse/ClickHouse/issues/93264)。[#94340](https://github.com/ClickHouse/ClickHouse/pull/94340) ([Dmitry Novik](https://github.com/novikd)) 。
* 修复在 database DataLake 数据库引擎中使用 DeltaLake CDF 的问题 (delta lake catalogs integration) 。关闭 [#94122](https://github.com/ClickHouse/ClickHouse/issues/94122)。[#94342](https://github.com/ClickHouse/ClickHouse/pull/94342) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 修复了在使用 `SLRU` 缓存策略时，当前指标 `FilesystemCacheSizeLimit` 值不正确的问题。[#94363](https://github.com/ClickHouse/ClickHouse/pull/94363) ([Kseniia Sumarokova](https://github.com/kssenii)) 。
* 现在，在创建 Backup 数据库引擎时如果提供的参数少于两个，会返回更明确的错误消息 (`Wrong number of arguments`，而不是 `std::out_of_range: InlinedVector::at(size_type) const failed bounds check.`) 。[#94374](https://github.com/ClickHouse/ClickHouse/pull/94374) ([Robert Schulze](https://github.com/rschu1ze)).
* 忽略在数据库级别对带有 grant option 的全局授权执行这类不可能的撤销操作。[#94386](https://github.com/ClickHouse/ClickHouse/pull/94386) ([pufit](https://github.com/pufit)).
* 修复从 compact parts 中读取稀疏偏移量的问题。关闭 [#94385](https://github.com/ClickHouse/ClickHouse/issues/94385)。[#94399](https://github.com/ClickHouse/ClickHouse/pull/94399) ([Pavel Kruglov](https://github.com/Avogar)) 。
* 即使启用了 `alter_column_secondary_index_mode` 的 `throw` 模式，也不再阻止对使用隐式索引的列执行 ALTER。[#94425](https://github.com/ClickHouse/ClickHouse/pull/94425) ([Raúl Marín](https://github.com/Algunenano)) 。
* 修复了在多个 `receivePacketsExpectQuery` 调用读取 `Protocol::Client::IgnoredPartUUIDs` 时，`TCPHandler` 发生崩溃的问题。 [#94434](https://github.com/ClickHouse/ClickHouse/pull/94434) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了 `system.functions` 中敏感数据脱敏的问题。[#94436](https://github.com/ClickHouse/ClickHouse/pull/94436) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 修复在禁用 `send_profile_events` 时发生的 nullptr 解引用问题。该特性最近才在 ClickHouse Python 驱动中引入。已关闭 [#92488](https://github.com/ClickHouse/ClickHouse/issues/92488)。[#94466](https://github.com/ClickHouse/ClickHouse/pull/94466) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复合并过程中，文本索引 .mrk 的不兼容问题。[#94494](https://github.com/ClickHouse/ClickHouse/pull/94494) ([Peng Jian](https://github.com/fastio)) 。
* 启用 `read_in_order_use_virtual_row` 时，代码会按完整主键的大小访问索引列，但未检查索引是否已被截断，从而导致释放后使用或使用未初始化内存。关闭 [#85596](https://github.com/ClickHouse/ClickHouse/issues/85596)。[#94500](https://github.com/ClickHouse/ClickHouse/pull/94500) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了在为带有 GLOBAL IN 的子查询发送外部表时，若类型为 Nullable，因类型不匹配导致的错误。关闭 [#94097](https://github.com/ClickHouse/ClickHouse/issues/94097)。[#94511](https://github.com/ClickHouse/ClickHouse/pull/94511) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 在早期版本中，对同一表达式包含多个索引条件的查询可能会误报 `Not found column` 异常。关闭 [#60660](https://github.com/ClickHouse/ClickHouse/issues/60660)。[#94515](https://github.com/ClickHouse/ClickHouse/pull/94515) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复运行时过滤器中对 Nullable join 列处理不当的问题。[#94555](https://github.com/ClickHouse/ClickHouse/pull/94555) ([Alexander Gololobov](https://github.com/davenger)) 。
* 在当前正在使用的另一个工作负载中创建工作负载时，不再会导致崩溃。[#94599](https://github.com/ClickHouse/ClickHouse/pull/94599) ([Sergei Trifonov](https://github.com/serxa)) 。
* 修复了在缺失列上计算 `isNotNull` 时，ANY LEFT JOIN 优化期间发生的崩溃。[#94600](https://github.com/ClickHouse/ClickHouse/pull/94600) ([Molly](https://github.com/ggmolly)).
* 修复了在引用其他具有计算默认值的列时，默认表达式求值不正确的问题。[#94615](https://github.com/ClickHouse/ClickHouse/pull/94615) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复 BACKUP/RESTORE 操作中的权限问题。[#94617](https://github.com/ClickHouse/ClickHouse/pull/94617) ([Pablo Marcos](https://github.com/pamarcos)) 。
* 修复了在数据类型为 `Nullable(DateTime64)` 时，因类型转换错误导致的崩溃问题。 [#94627](https://github.com/ClickHouse/ClickHouse/pull/94627) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* 修复了一个错误：某些带有 `ORDER BY` 的分布式查询可能会返回 `ALIAS` 列值对调的结果 (即列 `a` 显示列 `b` 的数据，反之亦然) 。[#94644](https://github.com/ClickHouse/ClickHouse/pull/94644) ([filimonov](https://github.com/filimonov)).
* 修复将 keeper-bench 结果存储到文件时的问题。[#94654](https://github.com/ClickHouse/ClickHouse/pull/94654) ([Antonio Andelic](https://github.com/antonio2368)) 。
* 修复了在列包含负浮点值时，MinMax 类型统计信息估算错误的问题。[#94665](https://github.com/ClickHouse/ClickHouse/pull/94665) ([zoomxi](https://github.com/zoomxi)).
* 修复了当 Map 的键为 struct 时读取 Parquet 文件的问题。[#94670](https://github.com/ClickHouse/ClickHouse/pull/94670) ([Konstantin Vedernikov](https://github.com/scanhex12)) 。
* 修复在使用复杂 ON 条件时可能产生错误的 RIGHT JOIN 结果。关闭 [#92913](https://github.com/ClickHouse/ClickHouse/issues/92913)。[#94680](https://github.com/ClickHouse/ClickHouse/pull/94680) ([Vladimir Cherkasov](https://github.com/vdimir)).
* 在 Vertical merge 之后保留固定的索引粒度 (use\_const\_adaptive\_granularity) 。[#94725](https://github.com/ClickHouse/ClickHouse/pull/94725) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了变更在处理标量子查询和表依赖项时的缺陷。如果某个表在某一列上存在依赖项 (索引或投影) ，标量子查询可能会在没有数据的情况下被求值并缓存，进而导致错误的变更。[#94731](https://github.com/ClickHouse/ClickHouse/pull/94731) ([Raúl Marín](https://github.com/Algunenano)).
* 修复 AsynchronousMetrics 中 `cpu_pressure` 在出错时的回退问题。[#94827](https://github.com/ClickHouse/ClickHouse/pull/94827) ([Raúl Marín](https://github.com/Algunenano)).
* `getURLHostRFC` 函数在解引用指针前缺少越界检查。当向 `domainRFC` 传入空字符串时，它会读取未初始化的内存，从而触发 MSan 错误。[#94851](https://github.com/ClickHouse/ClickHouse/pull/94851) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复加密磁盘只读状态相关的问题。[#94852](https://github.com/ClickHouse/ClickHouse/pull/94852) ([Azat Khuzhin](https://github.com/azat)) 。
* 修复了在旧 analyzer 中对分布式表使用小数 `LIMIT/OFFSET` 时的逻辑错误。关闭 [#94712](https://github.com/ClickHouse/ClickHouse/issues/94712)。[#94999](https://github.com/ClickHouse/ClickHouse/pull/94999) ([Ahmed Gouda](https://github.com/0xgouda)).
* 修复了在默认启用 JOIN 运行时过滤器时，在某些条件下发生崩溃的问题。[#95000](https://github.com/ClickHouse/ClickHouse/pull/95000) ([Alexander Gololobov](https://github.com/davenger)) 。
* 改进表引擎 `URL()` 和表函数 `url()` 中所用 URL 里的密码掩码处理。[#95006](https://github.com/ClickHouse/ClickHouse/pull/95006) ([Vitaly Baranov](https://github.com/vitlibar)) 。
* 函数 `toStartOfInterval` 现在在启用 `enable_extended_results_for_datetime_functions` 时，其行为与 `toStartOfX` 相同，其中 `X` 可以是 `Day`、`Week`、`Month`、`Quarter` 或 `Year`。[#95011](https://github.com/ClickHouse/ClickHouse/pull/95011) ([Kirill Kopnev](https://github.com/Fgrtue)) 。
* 修复了常量字符串比较未正确遵循设置 `cast_string_to_date_time_mode`、`bool_true_representation`、`bool_false_representation` 和 `input_format_null_as_default` 的问题。关闭 [#91681](https://github.com/ClickHouse/ClickHouse/issues/91681)。[#95040](https://github.com/ClickHouse/ClickHouse/pull/95040) ([Nihal Z. Miaji](https://github.com/nihalzp)) 。
* 修复文件系统缓存中的数据竞争问题。[#95064](https://github.com/ClickHouse/ClickHouse/pull/95064) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 修复了 Parquet 读取器中的一个罕见竞态条件。 [#95068](https://github.com/ClickHouse/ClickHouse/pull/95068) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 修复了 `LIMIT` 为零时 top K 优化中的崩溃问题。关闭了 [#93893](https://github.com/ClickHouse/ClickHouse/issues/93893)。[#95072](https://github.com/ClickHouse/ClickHouse/pull/95072) ([Alexey Milovidov](https://github.com/alexey-milovidov)) 。
* 从 DateTime/整数转换为 Time64 时，会通过 `toTime` 提取时刻部分，而 `toTime` 并不是单调函数。`ToDateTimeMonotonicity` 模板此前误将这种转换标记为单调，导致在调试构建中出现 "Invalid binary search result in MergeTreeSetIndex" 异常。[#95125](https://github.com/ClickHouse/ClickHouse/pull/95125) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* 仅在必要时才重新创建 manifest 文件条目列表 (此前每次迭代都会执行) 。[#95162](https://github.com/ClickHouse/ClickHouse/pull/95162) ([Daniil Ivanik](https://github.com/divanik)).

<div id="267-build-testing-packaging-improvement">
  #### 构建/测试/打包改进
</div>

* 新增一组工具，借助 jemalloc 的堆分析能力，对 ClickHouse SQL 解析器中的内存分配进行 profiling。[#94072](https://github.com/ClickHouse/ClickHouse/pull/94072) ([Ilya Yatsishin](https://github.com/qoega)).
* 新增了一个工具，用于简化解析器中内存分配的调试。它会在将查询解析为 AST 表示之前和之后，使用 jemalloc 的 `stats.allocated` 指标来显示分配了哪些内容。此外，它还支持内存 profiling 模式，可在前后分别转储 profile，以生成分配发生位置的报告。[#93523](https://github.com/ClickHouse/ClickHouse/pull/93523) ([Ilya Yatsishin](https://github.com/qoega)).
* 移除通过传递依赖引入的 libc++ 头文件包含。[#92523](https://github.com/ClickHouse/ClickHouse/pull/92523) ([Raúl Marín](https://github.com/Algunenano)).
* 将一些原本顺序执行的测试改为并行执行：[https://github.com/ClickHouse/ClickHouse/pull/93030/changes#diff-c3a73510dae653c9bbfa24300b32f5d6ec663fd4e72cc4a3d5daa6e4342915df。\[#93030](https://github.com/ClickHouse/ClickHouse/pull/93030/changes#diff-c3a73510dae653c9bbfa24300b32f5d6ec663fd4e72cc4a3d5daa6e4342915df。\[#93030)]\([https://github.com/ClickHouse/ClickHouse/pull/93030](https://github.com/ClickHouse/ClickHouse/pull/93030)) ([Nikita Fomichev](https://github.com/fm4v)).
* 清理一些构建标志。[#93679](https://github.com/ClickHouse/ClickHouse/pull/93679) ([Raúl Marín](https://github.com/Algunenano)).
* 将 c-ares 从 v1.34.5 升级到 v1.34.6。此次更新处理了 c-ares 的 `CVE-2025-62408`，但该问题与 ClickHouse 无关。[#94129](https://github.com/ClickHouse/ClickHouse/pull/94129) ([Govind R Nair](https://github.com/Revertionist)).
* 使用 `curl` 8.18.0。[#94742](https://github.com/ClickHouse/ClickHouse/pull/94742) ([Konstantin Bogdanov](https://github.com/thevar1able)).
