2025 Changelog

- This closes [#88081](https://github.com/ClickHouse/ClickHouse/issues/88081). [#88988](https://github.com/ClickHouse/ClickHouse/pull/88988) ([scanhex12](https://github.com/scanhex12)).
- Fixed performance degradation in analysis of skipping indexes. [#89004](https://github.com/ClickHouse/ClickHouse/pull/89004) ([Anton Popov](https://github.com/CurtizJ)).
- Fix ACCESS\_ENTITY\_NOT\_FOUND error when trying to execute clusterAllReplicas from a user with a non-existing role. Resolves [#87670](https://github.com/ClickHouse/ClickHouse/issues/87670). [#89068](https://github.com/ClickHouse/ClickHouse/pull/89068) ([pufit](https://github.com/pufit)).
- Fix sparse columns processing by CHECK constraint. Closes [#88637](https://github.com/ClickHouse/ClickHouse/issues/88637). [#89076](https://github.com/ClickHouse/ClickHouse/pull/89076) ([Eduard Karacharov](https://github.com/korowa)).
- Fixed incorrect row count when filling virtual columns in MergeTreeReaderTextIndex causing a crash with LOGICAL\_ERROR. [#89095](https://github.com/ClickHouse/ClickHouse/pull/89095) ([Peng Jian](https://github.com/fastio)).
- Prevent TTL merge counter leaks when exceptions occur during merge preparation. Resolves [#89019](https://github.com/ClickHouse/ClickHouse/issues/89019). [#89127](https://github.com/ClickHouse/ClickHouse/pull/89127) ([save-my-heart](https://github.com/save-my-heart)).
- Fix calculation of buffer size needed for base32/base58 encoding and decoding operations. [#89133](https://github.com/ClickHouse/ClickHouse/pull/89133) ([Antonio Andelic](https://github.com/antonio2368)).
- Fix use-after-free in Distributed due to race between shutdown and background INSERTs. Resolves [#88640](https://github.com/ClickHouse/ClickHouse/issues/88640). [#89136](https://github.com/ClickHouse/ClickHouse/pull/89136) ([Azat Khuzhin](https://github.com/azat)).
- Avoid possible data-races due to mutable exceptions while parsing Parquet. Fixes [#88385](https://github.com/ClickHouse/ClickHouse/issues/88385). [#89174](https://github.com/ClickHouse/ClickHouse/pull/89174) ([Azat Khuzhin](https://github.com/azat)).
- Refreshable materialized view: fixed rare server crash if source table was fully dropped during a refresh. [#89203](https://github.com/ClickHouse/ClickHouse/pull/89203) ([Michael Kolupaev](https://github.com/al13n321)).
- Flush buffers when sending an error in the middle of compressed stream in HTTP interface. [#89256](https://github.com/ClickHouse/ClickHouse/pull/89256) ([Alexander Tokmakov](https://github.com/tavplubix)).
- Prevent query masking rules from being incorrectly applied to DDL statements. [#89272](https://github.com/ClickHouse/ClickHouse/pull/89272) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
- Fixed incorrect row count when filling virtual columns in MergeTreeReaderTextIndex causing a crash with LOGICAL\_ERROR. Reopens [#89095](https://github.com/ClickHouse/ClickHouse/issues/89095). [#89303](https://github.com/ClickHouse/ClickHouse/pull/89303) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
- Fix Statistics countmin does not support estimate data type of LowCardinality(Nullable(String)) LOGICAL\_ERROR. [#89343](https://github.com/ClickHouse/ClickHouse/pull/89343) ([Han Fei](https://github.com/hanfei1991)).
- Possible crash/undefined behavior in IN function where primary key column types are different from IN function right side column types. Example: SELECT string\_column, int\_column FROM test\_table WHERE (string\_column, int\_column) IN (SELECT '5', 'not a number'). Appears if many rows are selected and there are rows contain not compatible types. [#89367](https://github.com/ClickHouse/ClickHouse/pull/89367) ([Ilya Golshtein](https://github.com/ilejn)).
- Fix truncating arguments of `countIf(*)`. Closes [#89372](https://github.com/ClickHouse/ClickHouse/issues/89372). [#89373](https://github.com/ClickHouse/ClickHouse/pull/89373) ([Manuel](https://github.com/raimannma)).
- Avoid losing uncompressed checksums for statistics on mutations. [#89381](https://github.com/ClickHouse/ClickHouse/pull/89381) ([Azat Khuzhin](https://github.com/azat)).
- Fix LOGICAL\_ERROR in L2DistanceTransposed(vec1, vec2, p) where the optimization for partial QBit reading incorrectly removed Nullable from the return type when p was LowCardinality(Nullable(T)). Resolves [#88362](https://github.com/ClickHouse/ClickHouse/issues/88362). [#89397](https://github.com/ClickHouse/ClickHouse/pull/89397) ([Raufs Dunamalijevs](https://github.com/rienath)).
- Fix loading tables with incorrect sparse serialization for tuple itself (that is written by older ClickHouse versions). [#89405](https://github.com/ClickHouse/ClickHouse/pull/89405) ([Azat Khuzhin](https://github.com/azat)).
- Fixed incorrect merge handling of TTL-emptied parts with non-empty projections when using `deduplicate_merge_projection_mode='ignore'`. Resolves [#89430](https://github.com/ClickHouse/ClickHouse/issues/89430). [#89458](https://github.com/ClickHouse/ClickHouse/pull/89458) ([Amos Bird](https://github.com/amosbird)).
- Fix logical error in full\_sorting\_merge join with duplicate columns. Resolves [#86957](https://github.com/ClickHouse/ClickHouse/issues/86957). [#89495](https://github.com/ClickHouse/ClickHouse/pull/89495) ([Vladimir Cherkasov](https://github.com/vdimir)).
- Fix reading of changelogs during Keeper startup in cases a changelog was not renamed properly during rotation. [#89496](https://github.com/ClickHouse/ClickHouse/pull/89496) ([Antonio Andelic](https://github.com/antonio2368)).
- Fix incorrect JOIN results when using OR conditions with unique right table keys. Resolves [#89391](https://github.com/ClickHouse/ClickHouse/issues/89391). [#89512](https://github.com/ClickHouse/ClickHouse/pull/89512) ([Vladimir Cherkasov](https://github.com/vdimir)).
- Fix possible "Context has expired" with analyzer and PK IN (subquery) (v2). Fixes [#89433](https://github.com/ClickHouse/ClickHouse/issues/89433). [#89527](https://github.com/ClickHouse/ClickHouse/pull/89527) ([Azat Khuzhin](https://github.com/azat)).
- Fix MaterializedPostgreSQL replication for tables with configured uppercase column names. Resolves [#72363](https://github.com/ClickHouse/ClickHouse/issues/72363). [#89530](https://github.com/ClickHouse/ClickHouse/pull/89530) ([Danylo Osipchuk](https://github.com/Lenivaya)).
- Fix a crash in case if a state of an aggregate function contains a serialized value of a column of LowCardinality(String). [#89550](https://github.com/ClickHouse/ClickHouse/pull/89550) ([Pavel Kruglov](https://github.com/Avogar)).
- Fix crash when using `ARRAY JOIN` on the right side of a JOIN with `enable_lazy_columns_replication` setting enabled. [#89551](https://github.com/ClickHouse/ClickHouse/pull/89551) ([Pavel Kruglov](https://github.com/Avogar)).
- Fix logical error with query\_plan\_convert\_join\_to\_in. Resolves [#89066](https://github.com/ClickHouse/ClickHouse/issues/89066). [#89554](https://github.com/ClickHouse/ClickHouse/pull/89554) ([Vladimir Cherkasov](https://github.com/vdimir)).
- Fixed exception in statistics estimator when trying to estimate conditions with mismatched column and constant types that cannot be converted. [#89596](https://github.com/ClickHouse/ClickHouse/pull/89596) ([Han Fei](https://github.com/hanfei1991)).
- Add runtime filters only for supported join algorithms i.e. hash joins. A filter can only be built when join algorithm first fully reads the right side and then reads the left side, but FullSortingMergeJoin for example reads both sides simultaneously. Fixes [#89220](https://github.com/ClickHouse/ClickHouse/issues/89220). [#89652](https://github.com/ClickHouse/ClickHouse/pull/89652) ([Alexander Gololobov](https://github.com/davenger)).
- Fix `hasAnyTokens`, `hasAllTokens` and `tokens` functions concurrent executions with the `sparseGrams` tokenizer. Resolves [#89605](https://github.com/ClickHouse/ClickHouse/issues/89605). [#89665](https://github.com/ClickHouse/ClickHouse/pull/89665) ([Elmi Ahmadov](https://github.com/ahmadov)).