2025 Changelog

- Now DDL worker cleanup outdated hosts from replicas set. It will reduce amount of stored metadata in ZooKeeper. [#88154](https://github.com/ClickHouse/ClickHouse/pull/88154) ([alesapin](https://github.com/alesapin)).
- Fix running ClickHouse w/o cgroups (accidentally cgroups became a requirement for asynchronous metrics). [#88164](https://github.com/ClickHouse/ClickHouse/pull/88164) ([Azat Khuzhin](https://github.com/azat)).
- Do proper undo of the move directory operation in case of error. We need to rewrite all `prefix.path` objects changed during the execution, not only the root one. [#88198](https://github.com/ClickHouse/ClickHouse/pull/88198) ([Mikhail Artemenko](https://github.com/Michicosun)).
- Fixed propagation of `is_shared` flag in `ColumnLowCardinality`. It may lead to a wrong group-by result if a new value is inserted in a column after hash values are already pre-calculated and cached in the `ReverseIndex`. [#88213](https://github.com/ClickHouse/ClickHouse/pull/88213) ([Nikita Taranov](https://github.com/nickitat)).
- Fixes a workload setting `max_cpu_share`. Now it can be used without `max_cpus` workload setting being set. [#88217](https://github.com/ClickHouse/ClickHouse/pull/88217) ([Neerav](https://github.com/neeravsalaria)).
- Fix bug that very heavy mutations with subqueries could stuck in prepare stage. Now it's possible to stop these mutations with `SYSTEM STOP MERGES`. [#88241](https://github.com/ClickHouse/ClickHouse/pull/88241) ([alesapin](https://github.com/alesapin)).
- Now correlated subqueries will work with object storages. [#88290](https://github.com/ClickHouse/ClickHouse/pull/88290) ([alesapin](https://github.com/alesapin)).
- Avoid trying to initialize DataLake databases while accessing `system.projections` and `system.data_skipping_indices`. [#88330](https://github.com/ClickHouse/ClickHouse/pull/88330) ([Azat Khuzhin](https://github.com/azat)).
- Now datalakes catalogs will be shown in system introspection tables only if `show_data_lake_catalogs_in_system_tables` explicitly enabled. [#88341](https://github.com/ClickHouse/ClickHouse/pull/88341) ([alesapin](https://github.com/alesapin)).
- Fixed DatabaseReplicated to respect `interserver_http_host` configuration. [#88378](https://github.com/ClickHouse/ClickHouse/pull/88378) ([xiaohuanlin](https://github.com/xiaohuanlin)).
- Positional arguments are now explicitly disabled in the context of defining Projections, as they are not sensible in this internal query stage. This fixes [#48604](https://github.com/ClickHouse/ClickHouse/issues/48604). [#88380](https://github.com/ClickHouse/ClickHouse/pull/88380) ([Amos Bird](https://github.com/amosbird)).
- Fix quadratic complexity in the `countMatches` function. Closes [#88400](https://github.com/ClickHouse/ClickHouse/issues/88400). [#88401](https://github.com/ClickHouse/ClickHouse/pull/88401) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Make `ALTER COLUMN ... COMMENT` commands for KeeperMap tables replicated so they are committed to Replicated database metadata and propagated across all replicas. Closes [#88077](https://github.com/ClickHouse/ClickHouse/issues/88077). [#88408](https://github.com/ClickHouse/ClickHouse/pull/88408) ([Eduard Karacharov](https://github.com/korowa)).
- Fix a case of false cyclic dependency with Materialized Views in Database Replicated, which prevented new replicas from being added to the database. [#88423](https://github.com/ClickHouse/ClickHouse/pull/88423) ([Nikolay Degterinsky](https://github.com/evillique)).
- Fix aggregation of sparse columns when `group_by_overflow_mode` is set to `any`. [#88440](https://github.com/ClickHouse/ClickHouse/pull/88440) ([Eduard Karacharov](https://github.com/korowa)).
- Fix "column not found" error when using `query_plan_use_logical_join_step=0` with multiple FULL JOIN USING clauses. Closes [#88103](https://github.com/ClickHouse/ClickHouse/issues/88103). [#88473](https://github.com/ClickHouse/ClickHouse/pull/88473) ([Vladimir Cherkasov](https://github.com/vdimir)).
- Big clusters with node numbers > 10 have a high probability of failing the restore with error `[941] 67c45db4-4df4-4879-87c5-25b8d1e0d414 <Trace>: RestoreCoordinationOnCluster The version of node /clickhouse/backups/restore-7c551a77-bd76-404c-bad0-3213618ac58e/stage/num_hosts changed (attempt #9), will try again`. The `num_hosts` node is overwritten by many hosts at the same time. The fix makes the setting to control attempts dynamic. Closes [#87721](https://github.com/ClickHouse/ClickHouse/issues/87721). [#88484](https://github.com/ClickHouse/ClickHouse/pull/88484) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
- This PR just for making compatibility to 23.8 and before, The compatibility issue was introduced by this PR: <https://github.com/ClickHouse/ClickHouse/pull/54240> This SQL will fail with `enable_analyzer=0` (before 23.8, it's ok). [#88491](https://github.com/ClickHouse/ClickHouse/pull/88491) ([JIaQi](https://github.com/JiaQiTang98)).
- Fix UBSAN integer overflow in `accurateCast` error message when converting large values to DateTime. [#88520](https://github.com/ClickHouse/ClickHouse/pull/88520) ([xiaohuanlin](https://github.com/xiaohuanlin)).
- Fix coalescing merge tree for tuple types. This closes [#88469](https://github.com/ClickHouse/ClickHouse/issues/88469). [#88526](https://github.com/ClickHouse/ClickHouse/pull/88526) ([scanhex12](https://github.com/scanhex12)).
- Forbid deletes for `iceberg_format_version=1`. This closes [#88444](https://github.com/ClickHouse/ClickHouse/issues/88444). [#88532](https://github.com/ClickHouse/ClickHouse/pull/88532) ([scanhex12](https://github.com/scanhex12)).
- This patch fixes the move operation of `plain-rewritable` disks for folders of arbitrary depth. [#88586](https://github.com/ClickHouse/ClickHouse/pull/88586) ([Mikhail Artemenko](https://github.com/Michicosun)).
- Fix SQL SECURITY DEFINER with \*cluster functions. [#88588](https://github.com/ClickHouse/ClickHouse/pull/88588) ([Julian Maicher](https://github.com/jmaicher)).
- Fix potential crash caused by concurrent mutation of underlying const PREWHERE columns. [#88605](https://github.com/ClickHouse/ClickHouse/pull/88605) ([Azat Khuzhin](https://github.com/azat)).
- Fixed reading from the text index and enabled query condition cache (with enabled settings `use_skip_indexes_on_data_read` and `use_query_condition_cache`). [#88660](https://github.com/ClickHouse/ClickHouse/pull/88660) ([Anton Popov](https://github.com/CurtizJ)).
- A `Poco::TimeoutException` exception thrown from `Poco::Net::HTTPChunkedStreamBuf::readFromDevice` leads to a crash with SIGABRT. [#88668](https://github.com/ClickHouse/ClickHouse/pull/88668) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
- Backported in [#88910](https://github.com/ClickHouse/ClickHouse/issues/88910): After recovering, a Replicated database replica might get stuck for a long time printing messages like `Failed to marked query-0004647339 as finished (finished=No node, synced=No node)`, it's fixed. [#88671](https://github.com/ClickHouse/ClickHouse/pull/88671) ([Alexander Tokmakov](https://github.com/tavplubix)).
- Fix appending to `system.zookeeper_connection_log` in case ClickHouse connects for the first time after config reload. [#88728](https://github.com/ClickHouse/ClickHouse/pull/88728) ([Antonio Andelic](https://github.com/antonio2368)).
- Fixed a bug where converting DateTime64 to Date with `date_time_overflow_behavior = 'saturate'` could lead to incorrect results for out-of-range values when working with time zones. [#88737](https://github.com/ClickHouse/ClickHouse/pull/88737) ([Manuel](https://github.com/raimannma)).
- Nth attempt to fix "having zero bytes error" with s3 table engine with enabled cache. [#88740](https://github.com/ClickHouse/ClickHouse/pull/88740) ([Kseniia Sumarokova](https://github.com/kssenii)).
- Fixes access validation on select for `loop` table function. [#88802](https://github.com/ClickHouse/ClickHouse/pull/88802) ([pufit](https://github.com/pufit)).