Changelog 2026

- Fix MemoryWorker's purging thread being stuck because of a race condition. [#96819](https://github.com/ClickHouse/ClickHouse/pull/96819) ([Antonio Andelic](https://github.com/antonio2368)).
- Don't log data with credentials in iceberg catalogs. [#96831](https://github.com/ClickHouse/ClickHouse/pull/96831) ([Konstantin Vedernikov](https://github.com/scanhex12)).
- Fix exit status of clickhouse-client after server error. [#96841](https://github.com/ClickHouse/ClickHouse/pull/96841) ([Vitaly Baranov](https://github.com/vitlibar)).
- Queries with CROSS JOINs and enabled parallel replicas could return incorrect result. Fixes [#74337](https://github.com/ClickHouse/ClickHouse/issues/74337). [#96848](https://github.com/ClickHouse/ClickHouse/pull/96848) ([Igor Nikonov](https://github.com/devcrafter)).
- Fixed `ALTER TABLE DROP COLUMN` queries failing after a lightweight update was previously performed on the same column. [#96861](https://github.com/ClickHouse/ClickHouse/pull/96861) ([Anton Popov](https://github.com/CurtizJ)).
- Fix stack overflow (crash) when creating archive-based backups (`.zip`, `.tzst`) to a `plain_rewritable` object storage disk. [#96872](https://github.com/ClickHouse/ClickHouse/pull/96872) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix server crash when backup fails due to full disk or other I/O errors on the destination filesystem. [#96873](https://github.com/ClickHouse/ClickHouse/pull/96873) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix `EXCEPT ALL` and `INTERSECT ALL` ignoring row multiplicities and behaving like their `DISTINCT` counterparts. [#96876](https://github.com/ClickHouse/ClickHouse/pull/96876) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix `std::terminate` exception in `indexOfAssumeSorted` when called with incompatible types (e.g., `IPv4` array with integer search value). [#96877](https://github.com/ClickHouse/ClickHouse/pull/96877) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix exception `Bad cast from type DB::ColumnNullable to DB::ColumnString` when using window functions with `group_by_use_nulls = 1` and CUBE/ROLLUP/GROUPING SETS. [#96878](https://github.com/ClickHouse/ClickHouse/pull/96878) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix incorrect results when JIT-compiled expressions convert `DateTime` to `DateTime64` (e.g., in `CASE`/`if`/`multiIf` with mixed DateTime types). The value was reinterpreted instead of properly scaled, producing wrong timestamps after expression compilation kicked in. [#96879](https://github.com/ClickHouse/ClickHouse/pull/96879) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix logical error exception in `CoalescingMergeTree` when a skip index expression produces a constant column (e.g., `bloom_filter` on `ifNotFinite(1, c0)` for an integer column). [#96880](https://github.com/ClickHouse/ClickHouse/pull/96880) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix wrong port number in error message when accidentally connecting with HTTP to the TLS-enabled native protocol port. [#96881](https://github.com/ClickHouse/ClickHouse/pull/96881) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix per-subquery `SETTINGS` not being applied to table functions like `file` in CTEs and subqueries. [#96882](https://github.com/ClickHouse/ClickHouse/pull/96882) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix memory leak of BIO objects when reading X509 certificates. [#96885](https://github.com/ClickHouse/ClickHouse/pull/96885) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix `LOGICAL_ERROR` exception in query analyzer when a lambda expression is passed where a concrete value is expected (e.g., as the accumulator argument of `arrayFold`). [#96892](https://github.com/ClickHouse/ClickHouse/pull/96892) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix `ColumnNullable is not compatible with original` exception when casting complex nested types (Array of Nullable Tuple containing Map with Nullable Enum values). [#96924](https://github.com/ClickHouse/ClickHouse/pull/96924) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix a race condition in sharded `HASHED` dictionary parallel loading that could occasionally cause some rows to not be loaded. [#96953](https://github.com/ClickHouse/ClickHouse/pull/96953) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix a race condition between `REPLACE PARTITION` and background mutations that could result in both old and new data being visible after the replace. [#96955](https://github.com/ClickHouse/ClickHouse/pull/96955) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix `arrayJoin` function producing duplicate rows when used with INNER JOIN and WHERE clause, caused by the partial predicate push-down optimization incorrectly pushing filters containing `arrayJoin` below a JOIN. [#96989](https://github.com/ClickHouse/ClickHouse/pull/96989) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix crash (SEGFAULT) in `clearCaches` caused by `BlockIO::operator=` not moving `query_metadata_cache`, leading to premature destruction of cached storage snapshots and use-after-free of `MergeTreeData` storage. [#96995](https://github.com/ClickHouse/ClickHouse/pull/96995) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix assertion failure in `IfTransformStringsToEnumPass` when the `if` or `transform` function returns `Nullable(String)` (e.g. with `GROUP BY ... WITH CUBE` and `group_by_use_nulls = true`). [#97002](https://github.com/ClickHouse/ClickHouse/pull/97002) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix incorrect data written during `INSERT ... SELECT` with `UNION ALL` and `JOIN`, where constant string columns could receive wrong values after block squashing. [#97019](https://github.com/ClickHouse/ClickHouse/pull/97019) ([Hasyimi Bahrudin](https://github.com/hasyimibhar)).
- Fix `assert_cast` exception (or silent data corruption in release builds) when building column statistics after `ALTER TABLE MODIFY COLUMN` changes the column type. [#97027](https://github.com/ClickHouse/ClickHouse/pull/97027) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix reads of uninitialized memory in Azure Blob Storage, SSH protocol, and Arrow Flight interfaces. [#97053](https://github.com/ClickHouse/ClickHouse/pull/97053) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix cases where indexes were affecting the result for queries with row policy/PREWHERE and FINAL. [#97076](https://github.com/ClickHouse/ClickHouse/pull/97076) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
- Fix remaining race condition between `REPLACE PARTITION` and background mutations in `MergeTree` tables that could cause old data to reappear. [#97105](https://github.com/ClickHouse/ClickHouse/pull/97105) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix implicit indices with alias columns and do full validation before creating them. [#97115](https://github.com/ClickHouse/ClickHouse/pull/97115) ([Raúl Marín](https://github.com/Algunenano)).
- Fix logical error in `FunctionVariantAdaptor` with functions requiring const arguments like `arrayROCAUC`. [#97116](https://github.com/ClickHouse/ClickHouse/pull/97116) ([Bharat Nallan](https://github.com/bharatnc)).
- Fix stuck mutations when `PartCheckThread` re-enqueues a `GET_PART` for an already-mutated part, leaving phantom entries in `parts_to_do`. [#97162](https://github.com/ClickHouse/ClickHouse/pull/97162) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
- Fix query plan row count estimation for subqueries with `ORDER BY ... LIMIT`, which could cause the optimizer to choose a suboptimal join order. [#97193](https://github.com/ClickHouse/ClickHouse/pull/97193) ([Alexander Gololobov](https://github.com/davenger)).