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

> Changelog for 2026

# Changelog 2026

<h3 id="265">
  ClickHouse release 26.5, 2026-05-21. [Presentation](https://presentations.clickhouse.com/2026-release-26.5/), [Video](https://www.youtube.com/watch?v=P1IDAvsi7p8)
</h3>

#### Backward Incompatible Change

* Changed defaults of `date_time_input_format` and `cast_string_to_date_time_mode` from `basic` to `best_effort`. Queries that previously failed to parse non-basic datetime strings (e.g. `2024 April 4`, `Apr 15, 2020 10:30:00`) may now succeed by default. To keep the old strict parsing behavior, set these settings to `basic` (or use `compatibility`). [#89334](https://github.com/ClickHouse/ClickHouse/pull/89334) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Tuple element name `null` is now forbidden because it conflicts with the subcolumn name used for Nullable null maps, causing ambiguous subcolumn resolution. [#98377](https://github.com/ClickHouse/ClickHouse/pull/98377) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add a setting `dynamic_disk_allow_from_env`, `dynamic_disk_allow_from_zk`, `dynamic_disk_allow_include` to disallow usage of `from_env`, `from_zk`, `include` in dynamic disks. Backward Incompatible Change because prohibits by default the behaviour which used to be allowed by default. [#99138](https://github.com/ClickHouse/ClickHouse/pull/99138) ([Kseniia Sumarokova](https://github.com/kssenii)).
* You can no longer use the obsolete Arrow-based Parquet reader and writer. The native implementation will be used instead. [#100949](https://github.com/ClickHouse/ClickHouse/pull/100949) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `SHOW CREATE TABLE t` now prefers the temporary table when both a permanent and a temporary table named `t` exist and no database is specified, matching the existing behavior of `DESCRIBE TABLE`. Additionally, `DESCRIBE TEMPORARY TABLE` syntax is now supported. [#100966](https://github.com/ClickHouse/ClickHouse/pull/100966) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Reduced default `http_max_fields` from 1,000,000 to 1,000 and `http_max_field_name_size` from 128 KB to 4 KB to limit pre-authentication memory usage by HTTP connections. Added `http_max_request_header_size` and `http_headers_read_timeout` settings. Users who rely on the previous higher limits can restore them via settings. [#103285](https://github.com/ClickHouse/ClickHouse/pull/103285) ([Sema Checherinda](https://github.com/CheSema)).
* Added a `histograms` nested column to `system.metric_log` that snapshots every registered histogram metric per row, with a new `system_metric_log_show_zero_values_in_histograms` setting to control zero-value emission. Deprecates the `system.histogram_metric_log` table. [#103770](https://github.com/ClickHouse/ClickHouse/pull/103770) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* `CAST` to `DateTime` or `DateTime64` without an explicit time zone now preserves the time zone of its source argument (when the source is a `DateTime`/`DateTime64` with an explicit time zone), matching the behavior of the `toDateTime`/`toDateTime64` functions. Closes [#55072](https://github.com/ClickHouse/ClickHouse/issues/55072). [#104433](https://github.com/ClickHouse/ClickHouse/pull/104433) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Removed the `kql` table function. Use `SET dialect = 'kusto'` to run queries in the KQL dialect. [#105101](https://github.com/ClickHouse/ClickHouse/pull/105101) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The window functions `RANK` and `DENSE_RANK` now reject arguments and throw `NUMBER_OF_ARGUMENTS_DOESNT_MATCH`, in line with the SQL standard. Previously, queries such as `RANK(x) OVER (ORDER BY id)` were silently accepted with the argument ignored. To restore the previous lenient behavior, set `allow_rank_dense_rank_arguments = 1`. Closes [#49526](https://github.com/ClickHouse/ClickHouse/issues/49526). [#104324](https://github.com/ClickHouse/ClickHouse/pull/104324) ([Groene AI](https://github.com/groeneai)).

#### New Feature

* Added a new setting `max_bytes_ratio_before_external_join`, mirroring `max_bytes_ratio_before_external_group_by` and `max_bytes_ratio_before_external_sort`. It expresses the spill-to-disk threshold for hash joins as a fraction of available memory; combined with the absolute `max_bytes_before_external_join`, the smaller resulting threshold applies. [#103862](https://github.com/ClickHouse/ClickHouse/pull/103862) ([Alexey Milovidov](https://github.com/alexey-milovidov)). The `new max_bytes_ratio_before_external_join` setting is now enabled by default at 0.5, mirroring `max_bytes_ratio_before_external_group_by` and `max_bytes_ratio_before_external_sort`. Hash joins automatically spill to grace hash join once the right-side data exceeds half of the available system memory (when memory limits are configured). [#104285](https://github.com/ClickHouse/ClickHouse/pull/104285) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add table function `filesystem`. It allows to represent directory structure as a table, to query files' metadata and contents with SQL. Originally [#42039](https://github.com/ClickHouse/ClickHouse/pull/42039) by @perst20. See [#42039](https://github.com/ClickHouse/ClickHouse/issues/42039). See [#50208](https://github.com/ClickHouse/ClickHouse/issues/50208). [#53610](https://github.com/ClickHouse/ClickHouse/pull/53610) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Allow passing bare function names to higher-order functions like `arrayMap`, `arrayFilter`, etc. For example, `arrayMap(negate, [1, 2, 3])` is now equivalent to `arrayMap(x -> negate(x), [1, 2, 3])`. [#101033](https://github.com/ClickHouse/ClickHouse/pull/101033) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add setting `send_table_structure_on_insert_with_inline_data` and `--inline-insert-data` client option to allow the server to parse inline INSERT data itself over the native protocol, avoiding the round-trip to receive table structure and improving performance for many small inserts. [#101034](https://github.com/ClickHouse/ClickHouse/pull/101034) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `tokenizeQuery` and `highlightQuery` functions for SQL query tokenization and syntax highlighting. `tokenizeQuery` returns lexer tokens with byte offsets and token types; `highlightQuery` returns parser-based syntax highlighting ranges with highlight categories (keyword, identifier, function, number, string, etc.). [#101054](https://github.com/ClickHouse/ClickHouse/pull/101054) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `url_base` setting to resolve relative URLs in the `url` table function and `URL` table engine, following RFC 3986 semantics. [#101113](https://github.com/ClickHouse/ClickHouse/pull/101113) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support negative values in the `LIMIT BY` clause to select rows from the *end* of each group instead of the beginning. For example, `LIMIT -2 BY id` returns the last two rows per `id`. Negative offsets (`LIMIT -1 OFFSET -1 BY id`) and mixed signs (`LIMIT -2 OFFSET 1 BY id`) are supported as well. [#103222](https://github.com/ClickHouse/ClickHouse/pull/103222) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Support `json_value` function to output with `tuple` and `array` to improve performance of multiple json query. [#78362](https://github.com/ClickHouse/ClickHouse/pull/78362) ([kevinyhzou](https://github.com/KevinyhZou)). Support multi-path `Tuple`/`Array` JSONPath argument in `JSON_VALUE`, `JSON_EXISTS`, and `JSON_QUERY`, by @KevinyhZou. [#101102](https://github.com/ClickHouse/ClickHouse/pull/101102) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* A new `kafka_autodetect_client_rack` parameter is introduced. If set, discover the Availability Zone via cloud facilities and propagate it as the `client.rack` parameter of `librdkafka` to avoid cross-zone communications. [#81323](https://github.com/ClickHouse/ClickHouse/pull/81323) ([Ilya Golshtein](https://github.com/ilejn)).
* Add `Read` event type to `system.blob_storage_log` for tracking object storage read operations, controlled by new setting `enable_blob_storage_log_for_read_operations`. [#96867](https://github.com/ClickHouse/ClickHouse/pull/96867) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Users can now see ZooKeeper watches issued by `clickhouse-server` using the new `system.zookeeper_watches` table. [#99277](https://github.com/ClickHouse/ClickHouse/pull/99277) ([Den Kalantaevskii](https://github.com/Diskein)).
* Added `Shards` profile event that counts the number of shards involved in distributed queries, summed across all tables. [#99470](https://github.com/ClickHouse/ClickHouse/pull/99470) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `WASM` UDFs can be declared `DETERMINISTIC` and become a subject of constant folding. [#100005](https://github.com/ClickHouse/ClickHouse/pull/100005) ([Vasily Chekalkin](https://github.com/bacek)).
* Add `parallel_replicas_prefer_local_replica` setting: when disabled, parallel replicas are selected purely by the load balancing algorithm, allowing even `max_parallel_replicas = 1` queries to be directed to another host. [#100139](https://github.com/ClickHouse/ClickHouse/pull/100139) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `{disk,storage,http}_connections_rcvbuf` and `{disk,storage,http}_connections_sndbuf` server settings to control TCP socket buffer sizes on outgoing HTTP connections, allowing operators to override kernel autotuning and cap per-connection memory usage. [#100478](https://github.com/ClickHouse/ClickHouse/pull/100478) ([Sema Checherinda](https://github.com/CheSema)).
* Support `CREATE OR REPLACE MATERIALIZED VIEW` with the same atomic swap semantics as `CREATE OR REPLACE TABLE`. Works with inner tables, `TO` tables, `POPULATE`, `REFRESH`, and `ON CLUSTER`. [#100539](https://github.com/ClickHouse/ClickHouse/pull/100539) ([DQ](https://github.com/il9ue)).
* Add `s3_read_request_duration_microseconds` and `s3_read_request_bytes` histogram metrics to observe S3 GET request connection lifetime and bytes consumed, visible in `system.histogram_metrics` and the Prometheus endpoint. [#102058](https://github.com/ClickHouse/ClickHouse/pull/102058) ([Sema Checherinda](https://github.com/CheSema)).
* Add `Paimon`, `PaimonS3`, `PaimonAzure`, `PaimonHDFS`, and `PaimonLocal` table engines with incremental read support backed by Keeper snapshot progress tracking. Incremental mode returns only new rows since the last committed snapshot. Targeted snapshot delta reads are available via `paimon_target_snapshot_id`, and per-query snapshot caps via `max_consume_snapshots`. Background metadata refresh is configurable with `paimon_metadata_refresh_interval_sec`. Gated by `allow_experimental_paimon_storage_engine`. [#102343](https://github.com/ClickHouse/ClickHouse/pull/102343) ([XiaoBinMu](https://github.com/Binnn-MX)).
* Added a new Kafka table setting `kafka_map_virtual_columns_on_write`. When enabled, columns named `_key`, `_timestamp`, `_headers.name` and `_headers.value` in the Kafka table schema are produced as the corresponding Kafka message key, timestamp and headers on `INSERT`, and are excluded from the message payload. [#103243](https://github.com/ClickHouse/ClickHouse/pull/103243) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `SYSTEM PAUSE VIEW [db.]name` and `SYSTEM PAUSE VIEWS` queries for refreshable materialized views. Unlike `SYSTEM STOP VIEW`, `SYSTEM PAUSE VIEW` does not interrupt the currently running refresh — the in-flight refresh is allowed to complete and only subsequent refreshes are prevented. Undone by `SYSTEM START VIEW` or `SYSTEM START VIEWS`, which now uniformly clear both the stopped and paused states. [#103252](https://github.com/ClickHouse/ClickHouse/pull/103252) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Added function `regexpPosition` (with PostgreSQL-compatible aliases `regexpInstr` and `regexp_instr`) that returns the byte position of the N-th regex match in a string. Supports start offset, return-after-match mode, regex flags, and capture-group selection. [#104172](https://github.com/ClickHouse/ClickHouse/pull/104172) ([Abhinav Agarwal](https://github.com/aagarwal-gtr)).
* New functions `isPrime` and `isProbablePrime` for primality checks. `isPrime` returns an exact result for unsigned integers up to `UInt64`. `isProbablePrime` also supports `UInt128` and `UInt256`; for those wider types, `0` means definitely composite and `1` means probably prime. The optional second argument of `isProbablePrime`, `rounds`, controls the confidence (capped at `256`); the default of `25` rounds bounds the false-positive rate for a random composite below `10^-15`, and `isProbablePrime` is cancellable. [#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` and `/clear` now clear the terminal in the clickhouse command-line tools instead of running as a mistaken query. [#104318](https://github.com/ClickHouse/ClickHouse/pull/104318) ([Tyler Hannan](https://github.com/tylerhannan)).
* Allow the `file` table function to accept an `Array(String)` of paths in `SELECT` queries. [#104442](https://github.com/ClickHouse/ClickHouse/pull/104442) ([Yue](https://github.com/niyue)).
* Add `deterministic` and `higher_order` columns to `system.functions` table. [#104479](https://github.com/ClickHouse/ClickHouse/pull/104479) ([Pedro Ferreira](https://github.com/PedroTadim)).
* Add an optional encoding variant parameter to `bech32Encode` (`bech32` / `bech32m`) and a raw decode mode to `bech32Decode` for non-SegWit address encoding (e.g. Cosmos SDK, Injective, Osmosis). [#98986](https://github.com/ClickHouse/ClickHouse/pull/98986) ([Yash ](https://github.com/Onyx2406)).
* You can now write data in `AvroConfluent` format, which was previously input-only. This enables producing Confluent Schema Registry-framed Avro messages directly from ClickHouse, for example when writing to Kafka. The schema is automatically registered with the registry. Use the new `output_format_avro_confluent_subject` setting to specify the subject name. [#101935](https://github.com/ClickHouse/ClickHouse/pull/101935) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Added the `prettyPrintJSON` function to format a JSON string into a human-readable form. Useful for dashboards or reports where prettifying previously required an extra step on the client side. Closes [#62523](https://github.com/ClickHouse/ClickHouse/issues/62523). [#102594](https://github.com/ClickHouse/ClickHouse/pull/102594) ([Dmitry Prokofyev](https://github.com/prokofyevDmitry)).
* Added `STRING_AGG` as a case-insensitive alias of `groupConcat` for PostgreSQL / SQL-standard compatibility. [#105125](https://github.com/ClickHouse/ClickHouse/pull/105125) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Individual subquery results can now be cached independently using `SETTINGS use_query_cache = true` on specific subqueries, without caching the entire outer query. A new setting `query_cache_for_subqueries = true` enables bulk propagation of `use_query_cache` into all subqueries. Note: `use_query_cache` on the outer query no longer auto-propagates to subqueries. [#99804](https://github.com/ClickHouse/ClickHouse/pull/99804) ([Vincent Voyer](https://github.com/vvo)).
* Added lexer-based syntax highlighting to the query editor in the Web UI (`play.html`), modelled after `clickhouse-client` colors. [#105105](https://github.com/ClickHouse/ClickHouse/pull/105105) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### Experimental Feature

* Added an experimental web terminal interface at `/webterminal` that provides an interactive `clickhouse-client` session in the browser over WebSocket. Disabled by default; enable with the `allow_experimental_webterminal` server setting. See it [here](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)).
* The `Kafka2` engine (experimental, with Keeper-based offset storage) now supports direct `SELECT` queries and the `kafka_commit_on_select` setting. [#100276](https://github.com/ClickHouse/ClickHouse/pull/100276) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `WASM` UDFs can now coerce more numeric types: smaller integers to wider integers (e.g. `Int8` to `UInt64`), and any integer to floating point (e.g. `Int32` to `Float32`). [#100435](https://github.com/ClickHouse/ClickHouse/pull/100435) ([Vasily Chekalkin](https://github.com/bacek)).
* Support `LIKE` function in `DELETE FROM system.webassembly_modules` query. [#104397](https://github.com/ClickHouse/ClickHouse/pull/104397) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Support geo types for `Iceberg`. [#103113](https://github.com/ClickHouse/ClickHouse/pull/103113) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Add prepared statements functionality to ArrowFlight SQL server. [#103047](https://github.com/ClickHouse/ClickHouse/pull/103047) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Improved KQL parser (for the Kusto language support) robustness by preserving parser depth and backtracks counters across KQL parser stages, so parser limits are tracked consistently for complex KQL queries. [#103528](https://github.com/ClickHouse/ClickHouse/pull/103528) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).

#### Performance Improvement

* Reuse the Parquet footer metadata cache when reading local Parquet files via the `file` table function or `File` table engine. Previously the cache was only consulted for object-storage backends. [#104260](https://github.com/ClickHouse/ClickHouse/pull/104260) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Push `ORDER BY ... LIMIT n` through `LEFT`/`RIGHT` joins when the sort key only references columns from the side preserved by the join, restricting how many rows the preserved-side input must produce before joining. Controlled by the new setting `query_plan_top_k_through_join` (default enabled). [#104268](https://github.com/ClickHouse/ClickHouse/pull/104268) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Enable `use_top_k_dynamic_filtering` and `use_skip_indexes_for_top_k` settings by default to improve performance of `ORDER BY ... LIMIT N` queries. [#99537](https://github.com/ClickHouse/ClickHouse/pull/99537) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Restrict `use_top_k_dynamic_filtering` to fixed-length sort columns by default, avoiding regressions on `ORDER BY <var-length-column> LIMIT N` queries where the per-row threshold comparison cost exceeds the I/O savings. The previous behavior is available via the new `use_top_k_dynamic_filtering_for_variable_length_types` setting. [#104216](https://github.com/ClickHouse/ClickHouse/pull/104216) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Use the oversize-arena feature of `jemalloc` to reduce page faults. [#103958](https://github.com/ClickHouse/ClickHouse/pull/103958) ([Nikita Taranov](https://github.com/nickitat)).
* Limit simultaneously active streams in `UNION ALL` to reduce peak memory usage. [#100176](https://github.com/ClickHouse/ClickHouse/pull/100176) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Slightly optimize the userspace page cache. [#100300](https://github.com/ClickHouse/ClickHouse/pull/100300) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Now the userspace page cache is always better than the OS page cache.
* Cold reads of object storage through the userspace page cache (`use_page_cache_for_object_storage = 1`) are now significantly faster, because consecutive cache misses are coalesced into a single HTTP request instead of one request per `page_cache_block_size` block. [#104230](https://github.com/ClickHouse/ClickHouse/pull/104230) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Speed up the index analysis involving type casting and function application. Closes [#55653](https://github.com/ClickHouse/ClickHouse/issues/55653). [#100366](https://github.com/ClickHouse/ClickHouse/pull/100366) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Speed up huge queries on `Merge` tables over a huge number of underlying tables. Closes [#32465](https://github.com/ClickHouse/ClickHouse/issues/32465). [#100369](https://github.com/ClickHouse/ClickHouse/pull/100369) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove vtable from setting field types, reducing `Settings` copy size by \~28x and improving cache locality via typed-array layout for all settings types. [#102269](https://github.com/ClickHouse/ClickHouse/pull/102269) ([Raúl Marín](https://github.com/Algunenano)).
* Add `max_threads_min_free_memory_per_thread` and `max_insert_threads_min_free_memory_per_thread` settings to automatically reduce query parallelism when the server is low on free memory. [#100383](https://github.com/ClickHouse/ClickHouse/pull/100383) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Reduce memory usage on low-memory systems (\< 4 GiB). [#100389](https://github.com/ClickHouse/ClickHouse/pull/100389) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `OptimizeTrivialGroupByLimitPass`. For trivial `SELECT ... FROM t GROUP BY k LIMIT n` queries (no `HAVING`, `ORDER BY`, or window functions), the analyzer now sets `max_rows_to_group_by = n + offset` with `group_by_overflow_mode = 'any'`, so aggregation stops once `n` distinct keys have been produced instead of grouping the entire input. Controlled by the new setting `optimize_trivial_group_by_limit_query` (enabled by default). [#104473](https://github.com/ClickHouse/ClickHouse/pull/104473) ([Amos Bird](https://github.com/amosbird)) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Granule-level implicit min-max index for the `_part_offset` and `_block_number` virtual columns, including for projections. Enables fast pruning of granules based on virtual column predicates. [#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)).
* For the `prealloc_serialized` family of aggregation methods, precompute per-row hashes during the batch-serialization pass and use them to (a) skip rehashing in `emplaceKey`/`findKey` and (b) software-prefetch the next row's bucket. Speeds up multi-key string/serialized aggregation by hiding hash-table cache-miss latency. [#104475](https://github.com/ClickHouse/ClickHouse/pull/104475) ([Amos Bird](https://github.com/amosbird)) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Query condition cache for `Iceberg` tables. [#102115](https://github.com/ClickHouse/ClickHouse/pull/102115) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Optimize `cramersV`, `cramersVBiasCorrected`, `theilsU`, and `contingency` when used with window functions. Closes [#83521](https://github.com/ClickHouse/ClickHouse/issues/83521). [#93384](https://github.com/ClickHouse/ClickHouse/pull/93384) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Added a query optimization that rewrites `tupleElement(dictGet('dict', ('a', 'b', 'c'), key), N)` into `dictGet('dict', 'a', key)`, avoiding fetching unnecessary dictionary attributes. Controlled by the `optimize_dictget_tuple_element` setting (enabled by default). [#100186](https://github.com/ClickHouse/ClickHouse/pull/100186) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Enable buffering for sorting steps on the initiator for distributed queries with sorting. [#100661](https://github.com/ClickHouse/ClickHouse/pull/100661) ([Nikita Taranov](https://github.com/nickitat)).
* Performance improvement for `partial_merge` JOIN. [#100945](https://github.com/ClickHouse/ClickHouse/pull/100945) ([Artem Zuikov](https://github.com/4ertus2)).
* Slightly reduced memory over-allocation in `partial_merge` JOIN. [#100963](https://github.com/ClickHouse/ClickHouse/pull/100963) ([Artem Zuikov](https://github.com/4ertus2)).
* Optimize allocations/deallocations by caching sampling settings instead of traversing the entire memory-tracker hierarchy. [#101267](https://github.com/ClickHouse/ClickHouse/pull/101267) ([Azat Khuzhin](https://github.com/azat)).
* Reduce memory allocation overhead during S3 multipart uploads by preallocating internal tracking containers. [#101799](https://github.com/ClickHouse/ClickHouse/pull/101799) ([Gagan Dhakrey](https://github.com/gagandhakrey)).
* Add software prefetch in hash join probe phase to reduce memory access latency for large hash tables, controlled by setting `enable_software_prefetch_in_join`. [#102444](https://github.com/ClickHouse/ClickHouse/pull/102444) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* Optimize `MemoryTracker` layout, improving its performance by \~25%. [#103464](https://github.com/ClickHouse/ClickHouse/pull/103464) ([Azat Khuzhin](https://github.com/azat)).
* Rewrite `coalesce(a, b, ...) <op> const` and `ifNull(a, b) <op> const` predicates before index analysis so per-column primary key and skip indexes on each argument can prune granules. Controlled by the new setting `allow_key_condition_coalesce_rewrite` (on by default). [#103468](https://github.com/ClickHouse/ClickHouse/pull/103468) ([Manuel](https://github.com/raimannma)).
* Significantly improved query performance when reading Iceberg catalogs with large JSON metadata files by optimizing escaped slash processing. [#103998](https://github.com/ClickHouse/ClickHouse/pull/103998) ([Mohaidoss](https://github.com/mohaidoss)).
* Avoid index uncompressed cache overhead when the cache is disabled (server setting `index_uncompressed_cache_size = 0`, which is the default). [#104063](https://github.com/ClickHouse/ClickHouse/pull/104063) ([Michael Kolupaev](https://github.com/al13n321)).
* Fix `ORDER BY ... LIMIT` queries with small limit reading excessive granules when combined with a non-selective `WHERE` filter. Previously, any filter above an in-order read disabled the per-mark-range task split, so the pipeline could not cancel between granules and read the whole part for each stream. [#104112](https://github.com/ClickHouse/ClickHouse/pull/104112) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fixed missing hash table sizes cache reuse after reordering JOIN sides. [#104131](https://github.com/ClickHouse/ClickHouse/pull/104131) ([Nikita Taranov](https://github.com/nickitat)).
* When `fsync_after_insert` is enabled, fsync of part files is now performed in parallel using the IO thread pool, speeding up insert finalization on wide tables. The full ClickBench `hits` load is about 22% faster. [#104137](https://github.com/ClickHouse/ClickHouse/pull/104137) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Vectorise `find_first_symbols`, `find_first_not_symbols`, `find_last_symbols_or_null`, `find_last_not_symbols_or_null`, and `splitInto` on AArch64 using NEON. Previously these helpers had a SIMD path only on x86 (SSE2 / SSE4.2) and fell through to a scalar loop on ARM. Speeds up TSV parsing by \~2x, URL functions and `splitByChar` by \~1.3x on the ClickBench `hits` dataset; very dense JSON parsing (sub-16-byte field cadence) regresses slightly in line with the existing SSE2 trade-off. [#104228](https://github.com/ClickHouse/ClickHouse/pull/104228) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Reading data through a trivial `ALIAS` column (e.g. `some_alias['key']` where `some_alias ALIAS m`) now goes through the same per-subcolumn read path as referencing the underlying column directly, restoring large I/O savings for `Map`, `Array`, `Tuple` and `Nullable` aliased columns. [#104245](https://github.com/ClickHouse/ClickHouse/pull/104245) ([Raúl Marín](https://github.com/Algunenano)).
* Reduced lock contention on the asynchronous remote-FS read path by making the per-query `AsyncReadCounters` lockless. [#104374](https://github.com/ClickHouse/ClickHouse/pull/104374) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Slightly better query plan for projections in-order scan. [#103723](https://github.com/ClickHouse/ClickHouse/pull/103723) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Extend `optimizeUseNormalProjections` to also handle a specific case where nothing was filtered but the projection's sorting key can remove the sorting step from the query plan. [#104680](https://github.com/ClickHouse/ClickHouse/pull/104680) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Allow `json.path[]` syntax sugar and explicit type hints to work correctly on typed `JSON` paths. [#99179](https://github.com/ClickHouse/ClickHouse/pull/99179) ([Pavel Kruglov](https://github.com/Avogar)).
* Optimize `json.path[N].nested.path` (which expands to `tupleElement(tupleElement(json.path[N], 'nested'), 'path')`) into `json.path[].nested.path[N]`, which reads much less data. [#99802](https://github.com/ClickHouse/ClickHouse/pull/99802) ([Pavel Kruglov](https://github.com/Avogar)).
* Optimize `SHOW TABLES` access checks in `system.parts` by hoisting database-level grant checks out of the per-table loop. [#100860](https://github.com/ClickHouse/ClickHouse/pull/100860) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Remove a redundant per-table `SHOW TABLES` access check in the `SELECT name` / `SELECT database, name` fast path of `system.tables`. [#100881](https://github.com/ClickHouse/ClickHouse/pull/100881) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Enable JIT compilation on macOS. [#100947](https://github.com/ClickHouse/ClickHouse/pull/100947) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Skip deferring the row policy after `FINAL` when it depends only on sorting-key columns and is deterministic, and skip the corresponding `PREWHERE` deferral that the row policy was forcing in that case. [#102884](https://github.com/ClickHouse/ClickHouse/pull/102884) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Added support for `hasAny` and `hasAll` as filter predicates in text indexes. [#103266](https://github.com/ClickHouse/ClickHouse/pull/103266) ([Anton Popov](https://github.com/CurtizJ)).
* Route long-lived MergeTree heap state (per-part and per-table metadata) to a dedicated jemalloc arena, exposed via `jemalloc.mergetree_arena.*` async metrics. Reduces default-arena fragmentation in steady-state and keeps per-part survivors from pinning otherwise-decayable pages. [#104136](https://github.com/ClickHouse/ClickHouse/pull/104136) ([Raúl Marín](https://github.com/Algunenano)).
* Improve ZooKeeper client timeout handling under heavy load when many requests are pipelined on a single session. The ZooKeeper client now uses a progress-based timeout: as long as any data is received from the server within `session_timeout_ms`, the wait is extended. A hard cap of `3 * session_timeout_ms` per request still bounds caller latency. Closes [#100466](https://github.com/ClickHouse/ClickHouse/issues/100466). [#104351](https://github.com/ClickHouse/ClickHouse/pull/104351) ([Antonio Andelic](https://github.com/antonio2368)).
* Move per-event trace flags into a separate array and allocate them lazily, reducing the overhead of `ProfileEvents` tracing. [#105030](https://github.com/ClickHouse/ClickHouse/pull/105030) ([Azat Khuzhin](https://github.com/azat)).
* Add `compareTrackAt` for `ColumnDecimal`, improving comparison performance for `Decimal` columns. [#105110](https://github.com/ClickHouse/ClickHouse/pull/105110) ([Artem Zuikov](https://github.com/4ertus2)).
* Added a SIMD implementation of `MD5` (`AVX2` / `AVX512`) that hashes multiple inputs in parallel, improving throughput. [#105161](https://github.com/ClickHouse/ClickHouse/pull/105161) ([Joanna Hulboj](https://github.com/jh0x)).

#### Improvement

* Improve the help output for all ClickHouse applications: `--help` now consistently returns exit code `0`, prints to `stdout`, and a top-level `clickhouse --help` lists all subcommands. Adds a `--no-sudo` option for `clickhouse start` / `restart` (useful in Docker), and a `clickhouse help` subcommand. Continuation of [#58244](https://github.com/ClickHouse/ClickHouse/issues/58244) from @qoega. [#98148](https://github.com/ClickHouse/ClickHouse/pull/98148) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The default of `input_format_column_name_matching_mode` is changed from `match_case` to `auto`. Input formats that match input column names against the table schema (`JSONEachRow`, `CSVWithNames`, `JSONColumns`, `BSONEachRow`, `RowBinaryWithNames`, etc.) now first try a case-sensitive match and fall back to case-insensitive matching when the case-sensitive match misses. The previous strict behavior is preserved under `compatibility`. [#104320](https://github.com/ClickHouse/ClickHouse/pull/104320) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `STDDEV` as a case-insensitive alias of `stddevSamp` for PostgreSQL/SQL-standard compatibility. [#105120](https://github.com/ClickHouse/ClickHouse/pull/105120) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `array_to_string` as a case-insensitive alias of `arrayStringConcat` for PostgreSQL compatibility. [#105121](https://github.com/ClickHouse/ClickHouse/pull/105121) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `unnest` as a case-insensitive alias of `arrayJoin` for PostgreSQL compatibility (function-call form). [#105124](https://github.com/ClickHouse/ClickHouse/pull/105124) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The progress bar in `clickhouse-client` now shows temporary data on disk usage (e.g. for external sort, aggregation, or JOIN) next to RAM, including a per-host breakdown for distributed queries. [#105190](https://github.com/ClickHouse/ClickHouse/pull/105190) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `system.predicate_statistics_log`, a new sampled log of predicate filter selectivity and MergeTree index-granule pruning per query. Disabled by default; enable via the `predicate_statistics_sample_rate` server setting. Needed for automatic index and projection recommendations. [#98727](https://github.com/ClickHouse/ClickHouse/pull/98727) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Allow skipping local shard with missing table when `skip_unavailable_shards` is enabled. [#100141](https://github.com/ClickHouse/ClickHouse/pull/100141) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add startup warnings (visible in `system.warnings`) when a Linux mdraid array is being resynchronized or is in a degraded state, as both can affect disk I/O performance or indicate disk failures. [#100941](https://github.com/ClickHouse/ClickHouse/pull/100941) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* WASM UDFs now appear in `system.functions` with correct `origin` (`WasmUserDefined`), `syntax`, `arguments`, and `returned_value` columns populated from their ClickHouse type metadata. Previously they were either missing or listed with the wrong origin as duplicates. [#101053](https://github.com/ClickHouse/ClickHouse/pull/101053) ([Vasily Chekalkin](https://github.com/bacek)).
* The `generate_series` table function now supports negative step values for generating descending sequences, e.g. `SELECT * FROM generate_series(99, 0, -1)`. [#101056](https://github.com/ClickHouse/ClickHouse/pull/101056) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `Context has expired` exceptions raised by some functions (`dotProduct`, `formatRow`, `structureToCapnProtoSchema`/`structureToProtobufSchema`, user-defined functions) when used in deferred execution paths such as `DEFAULT`/`MATERIALIZED` expressions and table engine settings, by ensuring those functions hold a strong context where required. [#101109](https://github.com/ClickHouse/ClickHouse/pull/101109) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix spurious `Cache limits violated` logical errors on priorities created with zero limits (such as the per-query filesystem cache priority used when `enable_filesystem_query_cache_limit` is on). [#101428](https://github.com/ClickHouse/ClickHouse/pull/101428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Auto-detect the region for `s3express` endpoints. [#101520](https://github.com/ClickHouse/ClickHouse/pull/101520) ([Pradeep Chhetri](https://github.com/chhetripradeep)).
* Support field ids for data files in `Iceberg` writes. Closes [#102322](https://github.com/ClickHouse/ClickHouse/issues/102322). [#102362](https://github.com/ClickHouse/ClickHouse/pull/102362) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* The left panel in the web UI (`play.html`) now scrolls independently, stays visible when the page is scrolled, and clicking a table scrolls to the query area. [#102498](https://github.com/ClickHouse/ClickHouse/pull/102498) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Allow opening the Play UI in a new tab via Ctrl/Cmd/Shift+click or middle-click on the ClickHouse logo in the left panel. [#102501](https://github.com/ClickHouse/ClickHouse/pull/102501) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* New metrics to track memory used by projection primary keys and projection index granularity across all tables. [#102587](https://github.com/ClickHouse/ClickHouse/pull/102587) ([Narasimha Pakeer](https://github.com/npakeer)).
* Apply `max_network_bandwidth_for_user` and `max_network_bandwidth_for_all_users` to remote filesystem reads/writes. [#103080](https://github.com/ClickHouse/ClickHouse/pull/103080) ([Azat Khuzhin](https://github.com/azat)).
* Improve the resilience of backups when Refreshable Materialized Views are constantly refreshed by making decisions based on the snapshotted tables' state rather than a global one. [#103384](https://github.com/ClickHouse/ClickHouse/pull/103384) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* `SELECT * FROM system.databases` now always lists data lake catalog databases regardless of the `show_data_lake_catalogs_in_system_tables` setting. Previously they were hidden by default, which was inconsistent with `SHOW DATABASES` that always showed them. [#103444](https://github.com/ClickHouse/ClickHouse/pull/103444) ([Alsu Giliazova](https://github.com/alsugiliazova)).
* Align the default of the server setting `concurrent_threads_soft_limit_ratio_to_cores` in code with the shipped `config.xml` value (`2`), so the default `max_min_fair` concurrent threads scheduler caps query processing threads at 2x cores out of the box even when the shipped `config.xml` is not used. [#103446](https://github.com/ClickHouse/ClickHouse/pull/103446) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improved sanitizer robustness in parser and string-function edge cases by handling empty input in `getURLScheme`, avoiding null-pointer arithmetic in `Lexer::nextToken` `max_query_size` checks, and short-circuiting UTF-8 subsequence evaluation on empty haystacks before decoding. [#103489](https://github.com/ClickHouse/ClickHouse/pull/103489) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Improved correctness of monotonicity inference for `divide(0, x)` and `intDiv(0, x)`: previously the functions were unconditionally reported as monotonic, but `0 / x` is non-monotonic on any range that includes 0 because `0 / 0` is undefined (`NaN`/`Inf` for `divide`, division-by-zero exception for `intDiv`). The false claim caused `KeyCondition::applyMonotonicFunctionsChainToRange` to produce ranges with `left > right`, which tripped a `LOGICAL_ERROR` `Invalid binary search result in MergeTreeSetIndex` in debug builds when an `IN` / `NOT IN` expression on the primary key wrapped the key in `divide(0, key)` or `intDiv(0, key)`. Release builds were unaffected — the assertion is gated by `#ifndef NDEBUG`. [#103621](https://github.com/ClickHouse/ClickHouse/pull/103621) ([Groene AI](https://github.com/groeneai)).
* Replace the `HTTPConnectionPool*TCP{Rcv,Snd}BufBytes_{p50,p75,p90,p95}` async metrics with a bucket-based histogram `http_pool_tcp_buf_bytes` (labels `group`, `direction`) in `system.histogram_metrics`. Per-group total async metrics are preserved. [#103704](https://github.com/ClickHouse/ClickHouse/pull/103704) ([Sema Checherinda](https://github.com/CheSema)).
* The server settings `{disk,storage,http}_connections_{rcvbuf,sndbuf}` are now reported as changeable without restart in `system.server_settings`. Their values can be updated via `SYSTEM RELOAD CONFIG`; the runtime application path was already in place since [#100478](https://github.com/ClickHouse/ClickHouse/issues/100478). [#103772](https://github.com/ClickHouse/ClickHouse/pull/103772) ([Sema Checherinda](https://github.com/CheSema)).
* Add support for resolved symbols (`Array(String)`) in `flameGraph`. [#103816](https://github.com/ClickHouse/ClickHouse/pull/103816) ([Azat Khuzhin](https://github.com/azat)).
* CLI client can now specify `<rainbow_parentheses>false</rainbow_parentheses>` in its config in environments where terminal colors clash with the parentheses (similarly, `clickhouse format` now has `--no_rainbow_parentheses`). [#103851](https://github.com/ClickHouse/ClickHouse/pull/103851) ([Larry Snizek](https://github.com/larry-cdn77)).
* Fix `MultiVolnitsky` UTF-8 case-insensitive search by rolling back partial `putNGram` inserts on failure and switching failed needles to fallback searchers, avoiding inconsistent state. [#103864](https://github.com/ClickHouse/ClickHouse/pull/103864) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Implement `sched_getcpu` via `rseq` TLS in glibc-compatibility musl. [#104016](https://github.com/ClickHouse/ClickHouse/pull/104016) ([Azat Khuzhin](https://github.com/azat)).
* Replicated refreshable materialized view in APPEND mode will no longer refresh twice if connection to zookeeper was briefly lost during refresh. [#104051](https://github.com/ClickHouse/ClickHouse/pull/104051) ([Michael Kolupaev](https://github.com/al13n321)).
* Allow Distributed tables without an explicit column list to validate sharding keys against the inferred remote table structure. [#104111](https://github.com/ClickHouse/ClickHouse/pull/104111) ([Yue](https://github.com/niyue)).
* Fix REST catalog with `Azure` `abfss` path. [#104120](https://github.com/ClickHouse/ClickHouse/pull/104120) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Honor `role_arn` and `role_session_name` auth settings in the Keeper S3 snapshot client, allowing snapshot uploads to use STS `AssumeRole`-based authentication. [#104140](https://github.com/ClickHouse/ClickHouse/pull/104140) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a memory leak when running queries with `MATERIALIZED` CTEs. [#104153](https://github.com/ClickHouse/ClickHouse/pull/104153) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `lowerUTF8` / `upperUTF8` exception when processing large non-ASCII data sets (e.g. during text-index builds) where the accumulated output buffer would exceed 2 GiB; reject excessively long single rows with a clear error. [#104229](https://github.com/ClickHouse/ClickHouse/pull/104229) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Harden MergeTree column-statistics loading against transient I/O failures to prevent permanently disabling statistics-based optimizations for affected parts. [#104372](https://github.com/ClickHouse/ClickHouse/pull/104372) ([zoomxi](https://github.com/zoomxi)).
* `INSERT INTO ... SELECT FROM input(...)` no longer requires the `CREATE TEMPORARY TABLE` grant. [#104470](https://github.com/ClickHouse/ClickHouse/pull/104470) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added a new MergeTree setting `concurrent_part_removal_threshold_for_remote_disk` (default `16`) that is used instead of `concurrent_part_removal_threshold` when at least one part being removed is stored on a remote disk. The previous threshold of `100` could make `DROP TABLE` and other part-removal operations on object storage backends stall for tens of seconds because removals were performed serially even though each one is a separate network round-trip. The new setting causes the parallel removal path to be entered much sooner on remote storage, while leaving local-disk behavior unchanged. [#104676](https://github.com/ClickHouse/ClickHouse/pull/104676) ([Groene AI](https://github.com/groeneai)).
* New setting `defer_partition_pruning_after_final` (default `1`) makes the 26.3-introduced behavior of skipping partition pruning under `FINAL` opt-out. Set it to `0` to restore pre-26.3 partition pruning — substantially faster on event-log workloads where same-PK rows cannot span partitions. `compatibility = '26.2'` flips it to `0` automatically. [#104705](https://github.com/ClickHouse/ClickHouse/pull/104705) ([Nikita Fomichev](https://github.com/fm4v)).
* Fix `intExp2` returning wrong results for out-of-range inputs (shifts `>= 64` under JIT, and integers with magnitude exceeding `INT_MAX` on both code paths). [#105054](https://github.com/ClickHouse/ClickHouse/pull/105054) ([Raúl Marín](https://github.com/Algunenano)).
* Quote shell arguments built from CLI options and parsed input in `clickhouse install` and `clickhouse git-import` so paths, user/group names, and commit hashes containing whitespace or shell metacharacters are handled correctly. [#105232](https://github.com/ClickHouse/ClickHouse/pull/105232) ([Raúl Marín](https://github.com/Algunenano)).
* The `Alias` table engine is now non-experimental and available without the `allow_experimental_alias_table_engine` setting. [#103488](https://github.com/ClickHouse/ClickHouse/pull/103488) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added `--queries-format` option to `clickhouse-benchmark` to choose between the default tab-escaped one-query-per-line input (`tsv`) and parsing standard input as a script of multiple queries separated by `;` (`script`). [#99972](https://github.com/ClickHouse/ClickHouse/pull/99972) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* The element-wise tuple operators `tuplePlus`, `tupleMinus`, `tupleMultiply`, `tupleDivide`, `tupleModulo`, `tupleIntDiv`, and `tupleIntDivOrZero` are now variadic and accept two or more tuples of the same size, applied element-wise as a left-fold. They previously accepted exactly two arguments only. [#104659](https://github.com/ClickHouse/ClickHouse/pull/104659) ([Aruj Bansal](https://github.com/arujbansal)).
* Added a new built-in web UI at `/processors-profile` that visualizes the pipeline of any past `SELECT` query as a heatmap, sourced from `system.query_log` and `system.processors_profile_log`. Each processor is colored by its `elapsed_us` and shows per-processor stats (rows, bytes, wait times) on hover. [#104614](https://github.com/ClickHouse/ClickHouse/pull/104614) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Setting `query_plan_use_logical_join_step` (and its alias `query_plan_use_new_logical_join_step`) is now obsolete and has no effect; the logical join step is always used. [#104017](https://github.com/ClickHouse/ClickHouse/pull/104017) ([Vladimir Cherkasov](https://github.com/vdimir)).
* The `user` input on `play.html` and the other built-in web pages (`dashboard.html`, `jemalloc.html`, `merges.html`, `binary.html`, `webterminal.html`) is no longer pre-filled with the literal text `default`. It now shows a `user` placeholder hint and is empty by default. When left empty, the page does not send a `user=` URL parameter (and the WebTerminal auth JSON omits the `user` field), so the server applies its usual fallback to the `default` user — and HTTP credentials supplied via other channels (`X-ClickHouse-User`, HTTP Basic, per-handler `<handler><user>` configuration) are no longer overridden. [#105254](https://github.com/ClickHouse/ClickHouse/pull/105254) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `ORC` reader: decouple offset-based read (`readBigAt`) from `use_prefetch`, so EC-encoded data on `HDFS` can be read correctly even when `use_prefetch = false` (e.g. by Gluten). [#103348](https://github.com/ClickHouse/ClickHouse/pull/103348) ([zhanglistar](https://github.com/zhanglistar)).
* Files downloaded from `play.html` with the `CSVWithNames` format now use the `.csv` file extension. [#103737](https://github.com/ClickHouse/ClickHouse/pull/103737) ([JackFielding](https://github.com/JackFielding)).
* More input validation for the BigLake catalog. [#105117](https://github.com/ClickHouse/ClickHouse/pull/105117) ([Konstantin Vedernikov](https://github.com/scanhex12)).

#### Bug Fix (user-visible misbehavior in an official stable release)

* Fix inconsistent formatting by remembering if an expression was parenthesized. [#92340](https://github.com/ClickHouse/ClickHouse/pull/92340) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix accurate comparison between Decimal and Float types. [#94293](https://github.com/ClickHouse/ClickHouse/pull/94293) ([zoomxi](https://github.com/zoomxi)).
* Allow positional arguments in distributed queries. [#94359](https://github.com/ClickHouse/ClickHouse/pull/94359) ([simonmichal](https://github.com/simonmichal)).
* Fix assertion failure in `DatabaseCatalog::updateDependencies` when dropping and recreating a materialized view with the same name; also fix view dependencies being silently lost during `RENAME TABLE` or `EXCHANGE TABLES` when referential dependencies were empty. [#98779](https://github.com/ClickHouse/ClickHouse/pull/98779) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed a server abort (assertion failure in `DatabaseCatalog::getTableImpl`) that occurred when creating a table via `ON CLUSTER` with a UUID identical to an existing database's UUID. [#98861](https://github.com/ClickHouse/ClickHouse/pull/98861) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* Fixed usage of skip indexes on data read (with enabled setting `use_skip_indexes_on_data_read`) and existing patch parts created by lightweight updates. [#99543](https://github.com/ClickHouse/ClickHouse/pull/99543) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Not-ready Set" exception when a filter with `IN (subquery)` is moved to PREWHERE by the query optimizer. [#100375](https://github.com/ClickHouse/ClickHouse/pull/100375) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Cannot find column" error when combining `ADD COLUMN` with `RENAME COLUMN` in a single `ALTER TABLE` statement. [#100387](https://github.com/ClickHouse/ClickHouse/pull/100387) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix views with mixed `UNION` and `INTERSECT`/`EXCEPT` operators returning wrong results after `DETACH`/`ATTACH` or server restart. [#100390](https://github.com/ClickHouse/ClickHouse/pull/100390) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Trying to execute PLACEHOLDER action" exception that could occur during stress testing with the AST fuzzer when a correlated subquery appeared in an IN clause. [#100398](https://github.com/ClickHouse/ClickHouse/pull/100398) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error exception when inserting into an Iceberg table with a `Date` column partitioned by `year`, `month`, or `day` transforms. [#100404](https://github.com/ClickHouse/ClickHouse/pull/100404) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix skip index being used with incompatible data after `ALTER TABLE MODIFY COLUMN` changes the column type, which could cause server crashes in sanitizer builds or incorrect query results. [#100526](https://github.com/ClickHouse/ClickHouse/pull/100526) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix credential leak in `query_log` for `paimonCluster`, `paimonS3Cluster`, `paimonAzureCluster`, and `deltaLakeS3` table functions. [#100529](https://github.com/ClickHouse/ClickHouse/pull/100529) ([JIaQi Tang](https://github.com/JiaQiTang98)).
* Fix `DROP TABLE` on Kafka engine tables potentially hanging indefinitely due to a deadlock in `rd_kafka_consumer_close`. [#100604](https://github.com/ClickHouse/ClickHouse/pull/100604) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Replace the hardcoded `source_table_engines` list with runtime lookup via `StorageFactory` and `DatabaseFactory`. Add `source_access_type` to `DatabaseFactory::EngineFeatures` so that `CREATE DATABASE` with source engines (PostgreSQL, MySQL, S3, etc.) requires the same source grants as `CREATE TABLE`. Fixes `GRANT TABLE ENGINE ON *` failing with `table_engines_require_grant=false`. Closes [#71544](https://github.com/ClickHouse/ClickHouse/issues/71544). [#100746](https://github.com/ClickHouse/ClickHouse/pull/100746) ([pufit](https://github.com/pufit)).
* Fix server crash when reading from a table whose `ALIAS` column contained a correlated subquery nested inside a function call (e.g. `ALIAS toString(intDivOrZero(x, (SELECT ...)))`). `CREATE TABLE` and `ALTER TABLE` now reject any subquery at any depth in `DEFAULT` / `ALIAS` / `MATERIALIZED` column expressions with `THERE_IS_NO_DEFAULT_VALUE`. Previously, the shallow validation accepted nested subqueries, so the correlated case crashed at read time and the nested non-correlated case appeared to work but could lead to unexpected behavior; both are now rejected at DDL time. [#100753](https://github.com/ClickHouse/ClickHouse/pull/100753) ([Groene AI](https://github.com/groeneai)).
* Fixed a server crash (`Logical error: Bad cast from type DB::FunctionNode to DB::ColumnNode`) that could occur when using queries with correlated subqueries on tables that have `CONSTRAINT ... ASSUME` definitions, when `optimize_substitute_columns` and `convert_query_to_cnf` settings are enabled. [#100756](https://github.com/ClickHouse/ClickHouse/pull/100756) ([Groene AI](https://github.com/groeneai)).
* Fix an exception that could occur when inserting a row into a JSON column where the row introduced a new dynamic field alongside a typed field with an incompatible value, and the column was subsequently used as a GROUP BY key. [#100758](https://github.com/ClickHouse/ClickHouse/pull/100758) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fix workload IO scheduling being silently bypassed for S3/object-storage writes that go through the `DiskObjectStorageTransaction` path (used by `s3_with_keeper` disks and explicitly when `use_fake_transaction=false`). Previously, INSERT writes into MergeTree tables on such disks ignored `CREATE RESOURCE` / `CREATE WORKLOAD` throttling because the resource link was never injected into `WriteSettings` for the transactional write path. [#100777](https://github.com/ClickHouse/ClickHouse/pull/100777) ([JIaQi Tang](https://github.com/JiaQiTang98)).
* Fix shared schema-cache collision between `Protobuf` and `ProtobufList`: reading a message first as `FORMAT Protobuf` and then as `FORMAT ProtobufList` could fail because `ProtobufList` forced the cached schema into its envelope form. `ProtobufList` now falls back to the cached message type when no envelope schema is available. [#100849](https://github.com/ClickHouse/ClickHouse/pull/100849) ([Callum Cooper](https://github.com/callumc34)).
* Fix heap-buffer-overflow in Rust CXX bridge due to `std::exception` ABI mismatch. [#100931](https://github.com/ClickHouse/ClickHouse/pull/100931) ([Azat Khuzhin](https://github.com/azat)).
* `FunctionVariantAdaptor` now throws `ILLEGAL_TYPE_OF_ARGUMENT` when all `Variant` alternatives are incompatible with a function, instead of silently returning `Nullable(Nothing)`. Previously, a `WHERE function(variant_col)` predicate where no alternative type was compatible would return 0 rows with no error, while the equivalent `SELECT` context already threw correctly. [#100939](https://github.com/ClickHouse/ClickHouse/pull/100939) ([Vasily Chekalkin](https://github.com/bacek)).
* `TRUNCATE ALL TABLES` no longer fails when the database contains views. [#100943](https://github.com/ClickHouse/ClickHouse/pull/100943) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix the `optimize_rewrite_array_exists_to_has` optimization to correctly handle type-incompatible cases (e.g. Date vs String) and re-enable it by default. [#100944](https://github.com/ClickHouse/ClickHouse/pull/100944) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix S3 settings priority so that `storage_configuration` disk settings override global `<s3>` section, and user/profile/query-level settings override both. [#100975](https://github.com/ClickHouse/ClickHouse/pull/100975) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix sparse serialization losing the sign of negative zero (-0.0) for BFloat16, Float32, and Float64 columns. [#100983](https://github.com/ClickHouse/ClickHouse/pull/100983) ([Takumi Hara](https://github.com/takumihara)).
* Fixed two bugs in the WKT geometry parser used when reading WKT-encoded GeoParquet and Arrow files: `MULTILINESTRING` geometries were incorrectly parsed as `Polygon` (causing an exception for typed columns and silent data corruption for mixed `Geometry` columns), and a malformed WKT string with no type keyword triggered undefined behaviour instead of a clean error. [#100997](https://github.com/ClickHouse/ClickHouse/pull/100997) ([Vasily Chekalkin](https://github.com/bacek)).
* Fix `grouping`/`GROUPING SETS` queries on Distributed tables with a single shard that failed with "Method executeImpl is not supported for 'grouping' function". [#101030](https://github.com/ClickHouse/ClickHouse/pull/101030) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` "Column identifier is already registered" in the planner that could occur when the same table expression was processed multiple times. [#101048](https://github.com/ClickHouse/ClickHouse/pull/101048) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR exception "Column identifier is already registered" when `additional_result_filter` setting is used with UNION or EXCEPT queries. [#101051](https://github.com/ClickHouse/ClickHouse/pull/101051) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed server crash (Logical error: Bad cast from ColumnVector to ColumnNullable) when using `* APPLY` with aggregate functions and `group_by_use_nulls=1` with GROUPING SETS, ROLLUP, or CUBE. [#101062](https://github.com/ClickHouse/ClickHouse/pull/101062) ([Groene AI](https://github.com/groeneai)).
* Fix infinite loop when `input_format_csv_skip_first_lines` or `input_format_tsv_skip_first_lines` exceeds the number of lines in the file. [#101111](https://github.com/ClickHouse/ClickHouse/pull/101111) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix out-of-bounds access in lazy materialization optimization that could cause an exception in debug builds. [#101144](https://github.com/ClickHouse/ClickHouse/pull/101144) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix type inference in recursive CTEs: column types are now iteratively widened via `getLeastSupertype` across the non-recursive and recursive sides of the `UNION ALL` until convergence, preventing integer overflow in expressions like `x + 1`. [#101155](https://github.com/ClickHouse/ClickHouse/pull/101155) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Clamp MergeTree compress block size settings (max\_compress\_block\_size, min\_compress\_block\_size, marks\_compress\_block\_size, primary\_key\_compress\_block\_size) to 256 MiB to prevent server crash when extreme values are set via CREATE TABLE SETTINGS. [#101159](https://github.com/ClickHouse/ClickHouse/pull/101159) ([Groene AI](https://github.com/groeneai)).
* Fix a LOGICAL\_ERROR crash in `QueryAnalyzer::resolve()` when a ROW POLICY uses a scalar subquery in its `USING` clause (e.g. `USING (SELECT 1)`). Closes [#100695](https://github.com/ClickHouse/ClickHouse/issues/100695). [#101263](https://github.com/ClickHouse/ClickHouse/pull/101263) ([Groene AI](https://github.com/groeneai)).
* Fix undefined behavior in `MergeTreeDataPartWriterCompact::cancel` when a stream allocation fails. [#101292](https://github.com/ClickHouse/ClickHouse/pull/101292) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixes a case where timezone was not included during the assignment in the ALTER statement. Closes [#101328](https://github.com/ClickHouse/ClickHouse/issues/101328). Related [https://github.com/ClickHouse/ClickHouse/pull/100647](https://github.com/ClickHouse/ClickHouse/pull/100647). [#101403](https://github.com/ClickHouse/ClickHouse/pull/101403) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix server crash (LOGICAL\_ERROR) for INSERT SELECT queries with ORDER BY ALL when the SELECT pipeline produces multiple streams. [#101443](https://github.com/ClickHouse/ClickHouse/pull/101443) ([Groene AI](https://github.com/groeneai)).
* Fix incorrect query results caused by join reordering pushing an INNER JOIN filter (referencing only the preserved side of an outer join) into the outer join’s ON clause. [#101504](https://github.com/ClickHouse/ClickHouse/pull/101504) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Skip applying lazy materialization for plans with arrayJoin, which could lead to limit not being respected. Close [#101608](https://github.com/ClickHouse/ClickHouse/issues/101608). [#101644](https://github.com/ClickHouse/ClickHouse/pull/101644) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix incorrect JOIN query results when `mergeFilterIntoJoinCondition` optimization silently dropped a WHERE equality condition with mismatched types. [#101652](https://github.com/ClickHouse/ClickHouse/pull/101652) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* Fix the `error` test hint not working for syntax/parsing errors — previously `-- { error SYNTAX_ERROR }` on a malformed query would fail with "Expected server error" instead of matching the client-side parse error. [#101675](https://github.com/ClickHouse/ClickHouse/pull/101675) ([Groene AI](https://github.com/groeneai)).
* Fix `INTO OUTFILE ... TRUNCATE` not actually using atomic rename — the write went directly to the original file instead of a temp file, so on query failure the original content was destroyed. Now the data is written to a temp file and renamed only on success. [#101884](https://github.com/ClickHouse/ClickHouse/pull/101884) ([Pablo Marcos](https://github.com/pamarcos)).
* Fixed an exception `Unsupported DeltaLake type: varchar(n)` when reading Delta Lake tables whose schema contains varchar(n) or char(n) column types. These types are now mapped to String, consistent with how the Delta Lake protocol stores them as plain byte arrays in Parquet. [#101973](https://github.com/ClickHouse/ClickHouse/pull/101973) ([Flavio Malavazi](https://github.com/flaviomalavazi)).
* Fix silent data loss when reading tar archives from S3 with `schema_inference_mode=union` and heterogeneous Parquet schemas — the Parquet metadata cache incorrectly reused the first file's metadata for all subsequent files in the archive. [#101990](https://github.com/ClickHouse/ClickHouse/pull/101990) ([Ahaan Limaye](https://github.com/ahaanlimaye)).
* Fix server crash (LOGICAL\_ERROR) when executing ALTER TABLE UPDATE/DELETE on Iceberg tables when no prior SELECT or INSERT was done on the table in the same server lifetime. [#102113](https://github.com/ClickHouse/ClickHouse/pull/102113) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix possible crash when an ALTER query executed on tables from in-memory database (e.g. temporary tables). [#102360](https://github.com/ClickHouse/ClickHouse/pull/102360) ([Den Kalantaevskii](https://github.com/Diskein)).
* Fixed `formatQuery` producing duplicate grants like `GRANT FILE ON *.*, FILE ON *.* TO x` instead of `GRANT FILE ON *.* TO x` when formatting backward-compatible READ/WRITE grants on the same source. [#102411](https://github.com/ClickHouse/ClickHouse/pull/102411) ([Groene AI](https://github.com/groeneai)).
* Fix lost parallelism for aggregation after read-in-order queries when `max_streams_to_max_threads_ratio` is greater than 1. [#102467](https://github.com/ClickHouse/ClickHouse/pull/102467) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed a crash (`LOGICAL_ERROR: Unknown virtual column`) when selecting subcolumns (like `.null` for Nullable, `.size0` for Array, tuple elements, or map keys/values) from a Buffer table engine. [#102470](https://github.com/ClickHouse/ClickHouse/pull/102470) ([Groene AI](https://github.com/groeneai)).
* Fix exception "Cannot fold actions for projection" in join reorder optimization when a LEFT/RIGHT JOIN with `join_use_nulls` is combined with other joins involving more than two tables. [#102516](https://github.com/ClickHouse/ClickHouse/pull/102516) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed silent overflow in scalar pointwise operations on numericIndexedVector (e.g. `numericIndexedVectorPointwiseAdd`) when the scalar is out of range. Such inputs now raise `INCORRECT_DATA` instead of returning corrupted values. [#102546](https://github.com/ClickHouse/ClickHouse/pull/102546) ([FriendLey](https://github.com/FriendLey)).
* Fix inconsistent AST formatting for INSERT with SAMPLE and query-level OFFSET. Closes [#102523](https://github.com/ClickHouse/ClickHouse/issues/102523). [#102547](https://github.com/ClickHouse/ClickHouse/pull/102547) ([zoomxi](https://github.com/zoomxi)).
* Fix `LOGICAL_ERROR` exception in `groupConcat` when deserializing a malformed aggregate function state. [#102558](https://github.com/ClickHouse/ClickHouse/pull/102558) ([Christoph Wurm](https://github.com/cwurm)).
* Now we do not accept garbage at the end of Time64 CSV values with `input_format_csv_use_default_on_bad_values=0`. Closes [#102490](https://github.com/ClickHouse/ClickHouse/issues/102490). [#102596](https://github.com/ClickHouse/ClickHouse/pull/102596) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix UNKNOWN\_ELEMENT\_OF\_ENUM exception when inserting default value to JSON column with Enum typed paths. Closes [#102359](https://github.com/ClickHouse/ClickHouse/issues/102359). [#102687](https://github.com/ClickHouse/ClickHouse/pull/102687) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix columns\_substreams.txt corruption during column rename in some cases. Closes [#102259](https://github.com/ClickHouse/ClickHouse/issues/102259). [#102689](https://github.com/ClickHouse/ClickHouse/pull/102689) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix inserting into Time data type during JSON parsing. Closes [#102016](https://github.com/ClickHouse/ClickHouse/issues/102016). [#102690](https://github.com/ClickHouse/ClickHouse/pull/102690) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix hex encoding of content sample in cached schema filenames. Closes [#101904](https://github.com/ClickHouse/ClickHouse/issues/101904). [#102703](https://github.com/ClickHouse/ClickHouse/pull/102703) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed sort order violation (crash in debug, silent data corruption in release) during `SummingMergeTree` merge when the `ORDER BY` key is a hash expression over a `Float32` column containing signaling NaN values. [#102791](https://github.com/ClickHouse/ClickHouse/pull/102791) ([Groene AI](https://github.com/groeneai)).
* Make `DETACH DATABASE ... SYNC` and other operations that call `waitDetachedTableNotInUse` cancellable via `KILL QUERY` and responsive to server shutdown, preventing indefinite hangs when a concurrent query holds a table reference. [#102804](https://github.com/ClickHouse/ClickHouse/pull/102804) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixed possible incorrect result of `ANY RIGHT JOIN`. [#102893](https://github.com/ClickHouse/ClickHouse/pull/102893) ([Nikita Taranov](https://github.com/nickitat)).
* Fix S3 requests failing with `ios_base::clear: unspecified iostream_category error` instead of being retried, caused by Poco `BufferedStreamBuf::flushBuffer` not handling short writes from the socket layer. [#102894](https://github.com/ClickHouse/ClickHouse/pull/102894) ([Sema Checherinda](https://github.com/CheSema)).
* Fix `input('auto')` table function failing via HTTP interface in INSERT SELECT queries. [#102902](https://github.com/ClickHouse/ClickHouse/pull/102902) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Disable trivial LIMIT optimization with row policies/additional\_table\_filters (to allow parallel index analysis). [#102921](https://github.com/ClickHouse/ClickHouse/pull/102921) ([Azat Khuzhin](https://github.com/azat)).
* Hide secret key in `HMAC` SQL function. Fix [#102927](https://github.com/ClickHouse/ClickHouse/issues/102927). [#102997](https://github.com/ClickHouse/ClickHouse/pull/102997) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* Fix `MULTIPLE_EXPRESSIONS_FOR_ALIAS` exception raised on distributed queries that reference the same `quantile` call multiple times (e.g. in `SELECT`, `HAVING`, and `ORDER BY`) with `optimize_syntax_fuse_functions` enabled. [#103014](https://github.com/ClickHouse/ClickHouse/pull/103014) ([tanner-bruce](https://github.com/tanner-bruce)).
* Fixes a case found by CI where a not-ready set was passed when the filter depends on the left-side column. Closes [#102966](https://github.com/ClickHouse/ClickHouse/issues/102966). [#103029](https://github.com/ClickHouse/ClickHouse/pull/103029) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix castOrNull to JSON in some cases. Closes [#101818](https://github.com/ClickHouse/ClickHouse/issues/101818). [#103036](https://github.com/ClickHouse/ClickHouse/pull/103036) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `SELECT DISTINCT` silently returning incomplete results when an aggregate projection matched the query and some parts of the table had no projection data (e.g. the projection was added on a table that already held data, and `MATERIALIZE PROJECTION` was not run). Closes [#102951](https://github.com/ClickHouse/ClickHouse/issues/102951). [#103052](https://github.com/ClickHouse/ClickHouse/pull/103052) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix `TOO_FEW_ARGUMENTS_FOR_FUNCTION` exception when a `WHERE` predicate such as `AND(OR(A, A), A)` collapses to a single top-level argument during common expression extraction in the analyzer. [#103072](https://github.com/ClickHouse/ClickHouse/pull/103072) ([Peng](https://github.com/fastio)).
* Fix a logical error `Function writeSlice expects same column types for GenericArraySlice and GenericArraySink` raised when evaluating `if`/`ifNull` over tuples, maps, or arrays containing a `QBit` element. `ColumnQBit::structureEquals` incorrectly compared the inner tuple of one `QBit` column against the outer wrapper of the other, so structurally identical `QBit` columns were reported as different. [#103084](https://github.com/ClickHouse/ClickHouse/pull/103084) ([Groene AI](https://github.com/groeneai)).
* Make `DETACH DATABASE` with `database_atomic_wait_for_drop_and_detach_synchronously` respect `KILL QUERY` instead of hanging indefinitely when a table reference is held. [#103095](https://github.com/ClickHouse/ClickHouse/pull/103095) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix segfault when deleting WASM module using non-identifier predicate (e.g. `WHERE 1=1`). [#103101](https://github.com/ClickHouse/ClickHouse/pull/103101) ([Joe Redfern](https://github.com/JosephRedfern)).
* Fix backward compatibility break where old clients fail with `UNEXPECTED_PACKET_FROM_SERVER` when inserting into a newer server via `remote()` or distributed tables, caused by unconditional `sendProgress` at the end of `processInsertQuery`. [#103148](https://github.com/ClickHouse/ClickHouse/pull/103148) ([Sema Checherinda](https://github.com/CheSema)).
* IN with non-constant tuple second argument must not CAST tuple elements down to the LHS type, this can overflow. Closes [#103055](https://github.com/ClickHouse/ClickHouse/issues/103055). [#103169](https://github.com/ClickHouse/ClickHouse/pull/103169) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix use-of-uninitialized-value in protocol function. [#103187](https://github.com/ClickHouse/ClickHouse/pull/103187) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `LOGICAL_ERROR` (`Bad cast … to ColumnLowCardinality`) during MergeTree index analysis when a `WHERE` clause compares a `LowCardinality` key column with a constant cast to a type that contains nested `LowCardinality` (for example `Variant(LowCardinality(Date), String)`). [#103211](https://github.com/ClickHouse/ClickHouse/pull/103211) ([Groene AI](https://github.com/groeneai)).
* Fix `Logical error: 'index < bucket_count'` in the `timeSeries*ToGrid` aggregate function family (e.g. `timeSeriesResampleToGridWithStaleness`, `timeSeriesChangesToGrid`, `timeSeriesResetsToGrid`, `timeSeriesRateToGrid`) when called with extreme timestamp parameters that would overflow signed 64-bit arithmetic in the bucket count computation. Also cap the total number of grid buckets at 16 million to prevent accidental large-memory allocation from adversarial inputs. [#103223](https://github.com/ClickHouse/ClickHouse/pull/103223) ([Groene AI](https://github.com/groeneai)).
* Fix `Logical error: 'Port is already connected'` exception during pipeline expansion in the lazy `FINAL` path for `ReplacingMergeTree`. The bug affected queries with `query_plan_optimize_lazy_final = 1` when `ReadFromMergeTree::initializePipeline` inserted internal transforms (e.g. a `Resize`) that wired the sub-pipeline's processors together, causing `LazyUnorderedReadFromMergeTreeSource::expandPipeline` to try to connect output ports that were already connected. [#103230](https://github.com/ClickHouse/ClickHouse/pull/103230) ([Groene AI](https://github.com/groeneai)).
* Fix wrong results from `LIMIT BY` and `DISTINCT` when the input is a `UNION ALL` of sorted subqueries. The query plan optimizer incorrectly treated such a union as globally sorted, causing extra rows to be returned. [#103231](https://github.com/ClickHouse/ClickHouse/pull/103231) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix possible crash during statistics calculation in Map type with lazy replication. Closes [#102390](https://github.com/ClickHouse/ClickHouse/issues/102390). [#103273](https://github.com/ClickHouse/ClickHouse/pull/103273) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix a data race for ClickHouse, MySQL, PostgreSQL and XDBC dictionary sources where `clone() const` reads from and `isModified() const` writes to the same `invalidate_query_response` string. [#103277](https://github.com/ClickHouse/ClickHouse/pull/103277) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix incorrect monotonicity detection for `Date32`. Closes [#101265](https://github.com/ClickHouse/ClickHouse/issues/101265). [#103283](https://github.com/ClickHouse/ClickHouse/pull/103283) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Cap pre-auth TCP Hello packet strings to 64 KB and add `handshake_timeout_milliseconds` server setting to limit total handshake time, preventing unauthenticated clients from consuming excessive memory or holding threads indefinitely. [#103284](https://github.com/ClickHouse/ClickHouse/pull/103284) ([Sema Checherinda](https://github.com/CheSema)).
* Fix Parquet ColumnIndex stats min\_value > max\_value for String columns. [#103334](https://github.com/ClickHouse/ClickHouse/pull/103334) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)).
* Fix incorrect handling of NULL rows for `Nullable(Tuple(...))` inputs in `flattenTuple` and `tupleToNameValuePairs`. `flattenTuple` now preserves the outer null map so NULL rows stay NULL. `tupleToNameValuePairs` now changes the result's value type to `Nullable(T)` when possible when the input is `Nullable(Tuple(...))`, so NULL rows produce `[('a', NULL), ('b', NULL)]` instead of `[('a', 0), ('b', 0)]`. When the element type cannot be wrapped in `Nullable` (e.g. `Array`), default values are used instead of NULL. Closes [#103312](https://github.com/ClickHouse/ClickHouse/issues/103312). [#103383](https://github.com/ClickHouse/ClickHouse/pull/103383) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Check for malformed flattened Dynamic data in Native format. [#103392](https://github.com/ClickHouse/ClickHouse/pull/103392) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix stale RPC causing replication stall after snapshot sync. [#103406](https://github.com/ClickHouse/ClickHouse/pull/103406) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix a `LOGICAL_ERROR` "Cannot pop N rows from X" that aborted the server (in debug / sanitizer builds) when reading a malformed BSON document containing a value whose BSON type is incompatible with the target column type inside a `Nullable(T)` or `Array(Nullable(T))` column. The malformed row now produces a clean `ILLEGAL_COLUMN` exception as intended. [#103418](https://github.com/ClickHouse/ClickHouse/pull/103418) ([Groene AI](https://github.com/groeneai)).
* Fix a server abort in `arrayFill` and `arrayReverseFill` when applied to an `Array(String)` column whose first row is empty together with a constant-false lambda. The aggregate / sub-array loop underflowed a `size_t` index to `SIZE_MAX`, which then caused an out-of-bounds read inside `ColumnString::doInsertManyFrom`. Same bug family as [#12263](https://github.com/ClickHouse/ClickHouse/issues/12263). [#103424](https://github.com/ClickHouse/ClickHouse/pull/103424) ([Groene AI](https://github.com/groeneai)).
* Fixes ACCESS\_DENIED / UNKNOWN\_TABLE in downstream APPEND RMVs with SQL SECURITY DEFINER when an upstream REPLACE RMV's EXCHANGE flips the target storage identity mid-resolution. [#103427](https://github.com/ClickHouse/ClickHouse/pull/103427) ([Alexander Gololobov](https://github.com/davenger)).
* Populate `_time` column from `url` table function. [#103437](https://github.com/ClickHouse/ClickHouse/pull/103437) ([Nikita Taranov](https://github.com/nickitat)).
* Fix potential out-of-bounds read in the `ALP` codec decompression path when processing malformed input with an invalid bit-width. [#103457](https://github.com/ClickHouse/ClickHouse/pull/103457) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix a bug where `SYSTEM SYNC FILESYSTEM CACHE '<name>' ON CLUSTER ...` could lose the cache name while formatting the query, causing remote nodes to sync all filesystem caches instead of only the requested cache. [#103469](https://github.com/ClickHouse/ClickHouse/pull/103469) ([Asish Kumar](https://github.com/officialasishkumar)).
* Fix processing of URL-encoded path in `deltaLakeAzure`. Closes [#103509](https://github.com/ClickHouse/ClickHouse/issues/103509). [#103525](https://github.com/ClickHouse/ClickHouse/pull/103525) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* Fix heap-use-after-free in multiplying an `AggregateFunction` state by an integer (e.g. `quantilesExactState(...) * N`). The exponentiation-by-squaring loop merged the state with itself, which is undefined when the aggregate function's `merge` reallocates its internal storage. Closes STID 0988-40af. [#103536](https://github.com/ClickHouse/ClickHouse/pull/103536) ([Groene AI](https://github.com/groeneai)).
* Fixed a rare `LOGICAL_ERROR` "Part X intersects previous part Y" raised during `ReplicatedMergeTree` table startup when two empty unexpected parts on disk had overlapping but non-containing block ranges. The exception aborted the table-attach thread and prevented the table from coming up. [#103537](https://github.com/ClickHouse/ClickHouse/pull/103537) ([Groene AI](https://github.com/groeneai)).
* Fix `Logical error: Incorrect mark rows for part ...` (debug-only assertion) that was triggered by mutations on `MergeTree` tables with non-adaptive index granularity (`index_granularity_bytes = 0`) whose last data mark was incomplete (most reliably reproduced via `DETACH`/`ATTACH` followed by a lightweight `DELETE`). [#103538](https://github.com/ClickHouse/ClickHouse/pull/103538) ([Groene AI](https://github.com/groeneai)).
* Fix `clickhouse-local` returning 0 rows silently when reading from `/proc` and `/sys` pseudo-files via the `file()` table function (e.g. `SELECT * FROM file('/proc/cpuinfo', 'RawBLOB')`). [#103548](https://github.com/ClickHouse/ClickHouse/pull/103548) ([Ashrith Bandla](https://github.com/ashrithb)).
* Fixed handling of the `max_string_length` argument for the `GenerateRandom` table engine. [#103550](https://github.com/ClickHouse/ClickHouse/pull/103550) ([Alex Kuleshov](https://github.com/0xAX)).
* Fix masking nested credentials in logs. [#103552](https://github.com/ClickHouse/ClickHouse/pull/103552) ([Vitaly Baranov](https://github.com/vitlibar)).
* Fix SVE detection using SVE instructions when unavailable. [#103568](https://github.com/ClickHouse/ClickHouse/pull/103568) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `GenerateRandom` storage args parsing. [#103574](https://github.com/ClickHouse/ClickHouse/pull/103574) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix infinite loop on `WITH FILL` for data starting with ±inf. [#103580](https://github.com/ClickHouse/ClickHouse/pull/103580) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix `JSONExtract` into a `Variant` type silently truncating fractional JSON numbers. Previously, `JSONExtract('{"x": 3.14}', 'x', 'Variant(Int64, Float64)')` returned `Int64=3` and `JSONExtract('{"x": 3.14}', 'x', 'Variant(String, Int64)')` returned `Int64=3`, dropping the fractional part. The fractional value is now preserved losslessly: a `Float64`/`Decimal` member claims it when present, otherwise a `String` member captures the original JSON. `Variant` types containing only integer members (e.g. `Variant(Int64, Int32)`) and direct integer extraction (`JSONExtract(json, 'Int64')`, `JSONExtractInt`, etc.) are unchanged. [#103620](https://github.com/ClickHouse/ClickHouse/pull/103620) ([Groene AI](https://github.com/groeneai)).
* Fix `SYSTEM INSTRUMENT REMOVE` without arguments producing `std::bad_optional_access` (error code 1001) instead of `SYNTAX_ERROR` (error code 62). [#103622](https://github.com/ClickHouse/ClickHouse/pull/103622) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix logical error / undefined behavior in `windowID` and `tumble` window view when called with a timezone string as the 3rd argument. [#103641](https://github.com/ClickHouse/ClickHouse/pull/103641) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* S3 client logging now treats HTTP 400 responses that include a non-empty x-amz-bucket-region header (wrong SigV4 signing region) as an informational wrong-region case with a clearer log line instead of the generic error-style path. The STS web identity credentials provider is added to the S3 credentials chain only when web identity is configured, which reduces spurious warnings for deployments that do not use it. Closes [#99140](https://github.com/ClickHouse/ClickHouse/issues/99140). [#103673](https://github.com/ClickHouse/ClickHouse/pull/103673) ([MeltonSmith](https://github.com/MeltonSmith)).
* Fix `SYSTEM SYNC REPLICA <db>.<tbl> IF EXISTS` to silently succeed when the database does not exist, matching the existing behaviour for a missing table and the precedent set by `DROP TABLE IF EXISTS`. Previously the query threw `UNKNOWN_DATABASE` despite `IF EXISTS`. Closes [#103629](https://github.com/ClickHouse/ClickHouse/issues/103629). [#103689](https://github.com/ClickHouse/ClickHouse/pull/103689) ([Groene AI](https://github.com/groeneai)).
* Fix logical error `Arguments of 'plus' have incorrect data types` thrown by `FunctionBinaryArithmetic::executeImpl2` when a `MergeTree` table had `Array(LowCardinality(...))` in its sort key and a `WHERE` clause used `plus` / `minus` between that column and an `Array` constant of a different element type. `KeyCondition::getMonotonicityForRange` now strips `LowCardinality` recursively before invoking the inner numeric dispatch. [#103701](https://github.com/ClickHouse/ClickHouse/pull/103701) ([Groene AI](https://github.com/groeneai)).
* Fix dynamic cache resize race in 26.1+. [#103702](https://github.com/ClickHouse/ClickHouse/pull/103702) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fixed an issue where text and bloom\_filter skip indices on `ALIAS` columns whose expression contained a lambda with captured constants (e.g. `arrayMap((k, v) -> concat(k, '=', v), mapKeys(m), mapValues(m)))` were silently ignored. [#103708](https://github.com/ClickHouse/ClickHouse/pull/103708) ([Anton Popov](https://github.com/CurtizJ)).
* Fix `position` and `positionCaseInsensitive` with a `start_pos` close to `UINT64_MAX` getting stuck or causing a segmentation fault due to overflowing pointer arithmetic. [#103766](https://github.com/ClickHouse/ClickHouse/pull/103766) ([Raúl Marín](https://github.com/Algunenano)).
* Fixes undefined behavior while parsing dateTime with a double fractional part. [#103773](https://github.com/ClickHouse/ClickHouse/pull/103773) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fixed a data-correctness regression in 26.x where JIT-compiled `if` and `multiIf` with a `Decimal` result type and a non-`Decimal` (integer or float) literal in one branch silently returned a value `10^scale` too small. The slow (non-JIT) path was unaffected. Workaround on affected versions: `SET compile_expressions = 0`. [#103809](https://github.com/ClickHouse/ClickHouse/pull/103809) ([Groene AI](https://github.com/groeneai)).
* Fixes forwarding the tokenizer from the text index to supported functions. [#103826](https://github.com/ClickHouse/ClickHouse/pull/103826) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Fix wrong results from `numbers`, `generate_series`, and similar range-honoring sources when the `WHERE` clause uses `IN` or `NOT IN` over a tuple whose elements deduplicate to a single key column (for example, `WHERE tuple(number, number) NOT IN (tuple(1, 2))`). Closes [#103660](https://github.com/ClickHouse/ClickHouse/issues/103660). [#103835](https://github.com/ClickHouse/ClickHouse/pull/103835) ([Groene AI](https://github.com/groeneai)).
* Keep the auto-spilling hash join's actual memory peak under `max_bytes_before_external_join`. Previously, statistics-driven preallocation, in-place hash table doubling, and unbounded `GraceHashJoin` in-memory buckets could each push the query past the configured cap and trip `MEMORY_LIMIT_EXCEEDED`. [#103838](https://github.com/ClickHouse/ClickHouse/pull/103838) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a hang in `clickhouse-local` shutdown when system logs (such as `text_log` or `filesystem_cache_log`) are configured. `SystemLogs::flushImpl` was calling `BaseDaemon::instance().flushTextLogs()`, which throws `std::bad_cast` outside `clickhouse-server` and left the saving threads running until `pthread_cond_destroy` blocked the destruction of the system log queues. [#103874](https://github.com/ClickHouse/ClickHouse/pull/103874) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Reject `MATERIALIZED` CTE queries whose body resolves to different inferred column types in different references with a clear `TYPE_MISMATCH` error instead of crashing the server with a `Bad cast` `LOGICAL_ERROR`. This previously happened when the CTE body referenced identifiers from outer scope (for example an alias from the calling subquery's projection) that were inlined as different constants per reference. [#103879](https://github.com/ClickHouse/ClickHouse/pull/103879) ([Groene AI](https://github.com/groeneai)).
* Fix a use-of-uninitialized-value in the JOIN-conversion query plan optimizers (`tryConvertAnyOuterJoinToInnerJoin`, `tryConvertAnyJoinToSemiOrAntiJoin`) when the filter on top of an `ANY` `OUTER` `JOIN` contains a non-deterministic function such as `rand`, `now`, or `rowNumberInAllBlocks`. The optimizer no longer attempts to constant-fold such filters and leaves the JOIN unchanged, which also prevents incorrect conversions to `INNER`/`SEMI`/`ANTI JOIN` that could silently drop rows. [#103880](https://github.com/ClickHouse/ClickHouse/pull/103880) ([Groene AI](https://github.com/groeneai)).
* Fix a use-after-free in `StorageKafka2` that could crash the server when a Keeper session is replaced while the consumer is holding ephemeral topic-partition locks. [#103890](https://github.com/ClickHouse/ClickHouse/pull/103890) ([Groene AI](https://github.com/groeneai)).
* Fixed a `LOGICAL_ERROR` "Primary key type mismatch" thrown when joining an `EmbeddedRocksDB` table via `JOIN ... USING (key)` against a subquery whose key column has a different type (e.g. `Nullable(UInt64)`, `Int64`, `Decimal`) than the storage's primary key. The planner now declines `DirectKeyValueJoin` on type mismatch and falls back to `HashJoin`, which handles the type conversion. [#103928](https://github.com/ClickHouse/ClickHouse/pull/103928) ([Groene AI](https://github.com/groeneai)).
* `SET max_threads = DEFAULT` (and the same for `max_final_threads` and `max_parsing_threads`) no longer loses the auto state. Previously, after resetting one of these settings, `system.settings` would report the resolved core count (e.g. `32`) instead of `'auto(32)'`, and the server would behave as if the value had been explicitly pinned. [#103991](https://github.com/ClickHouse/ClickHouse/pull/103991) ([Groene AI](https://github.com/groeneai)).
* Fix `SIZES_OF_ARRAYS_DONT_MATCH` when reading `AggregateFunction(topK(N), String)` columns whose persisted `alpha_size` was grown by a pre-25.12 deserialize+serialize cycle. [#104002](https://github.com/ClickHouse/ClickHouse/pull/104002) ([Raúl Marín](https://github.com/Algunenano)).
* Fixed SQL injection vulnerability in PostgreSQL, Cassandra and XDBC dictionary sources: string keys containing single quotes were escaped with `\'` (backslash), which these backends treat as a literal backslash rather than an escape sequence, allowing arbitrary SQL to be injected into dictionary lookup queries. `ExternalQueryBuilder` now emits SQL-standard `''` escaping for those backends; ClickHouse and MySQL dictionary sources continue to use backslash escaping. [#104009](https://github.com/ClickHouse/ClickHouse/pull/104009) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fixed possible type mismatch in aggregation when a column type was altered to/from LowCardinality, and min-max projection wasn't rebuilt. [#104013](https://github.com/ClickHouse/ClickHouse/pull/104013) ([Nikita Taranov](https://github.com/nickitat)).
* Fix infinite loop of query optimizations caused by not propagating prevention of unused column removal when merging expressions. [#104083](https://github.com/ClickHouse/ClickHouse/pull/104083) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix `LOGICAL_ERROR` in `StreamingStorageRegistry::renameTable` when batch-renaming streaming tables (S3Queue, Kafka, RabbitMQ) by using UUID-based identity tracking instead of name-based. [#104101](https://github.com/ClickHouse/ClickHouse/pull/104101) ([Nikita Taranov](https://github.com/nickitat)).
* Fixed wrong results when a CTE constructed with `UNION ALL` contained a `SELECT DISTINCT` branch and the outer query projected only a subset of the CTE's columns. The new analyzer's `RemoveUnusedProjectionColumnsPass` was incorrectly removing the un-referenced column from the inner `DISTINCT` projection, causing rows that should have remained distinct (same value in the projected column but different value in the dropped column) to collapse into one. [#104114](https://github.com/ClickHouse/ClickHouse/pull/104114) ([Groene AI](https://github.com/groeneai)).
* Fix several edge case correctness issues in setting `optimize_inverse_dictionary_lookup` where the optimization could silently drop rows or suppress exceptions. Closes [#103270](https://github.com/ClickHouse/ClickHouse/issues/103270). Close [#103085](https://github.com/ClickHouse/ClickHouse/issues/103085). [#104133](https://github.com/ClickHouse/ClickHouse/pull/104133) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix write out of bounds while deserializing `quantileTiming` state. [#104141](https://github.com/ClickHouse/ClickHouse/pull/104141) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix undefined behavior when an out-of-range `Float64` value is converted to a wide integer type (`UInt64`, `Int64`, `Int128`, `UInt128`, `Int256`, `UInt256`). Previously, values equal to `Float64(numeric_limits<T>::max())` (which rounds up to a value above the actual maximum) bypassed the bounds check and produced UB in the subsequent cast. This affected aggregate-function parameter parsing (`topK`, `histogram`, `uniqUpTo`, `groupArrayInsertAt`, etc.) and integer-typed settings via `SET <setting> = <Float64>`. Closes [#103817](https://github.com/ClickHouse/ClickHouse/issues/103817). [#104154](https://github.com/ClickHouse/ClickHouse/pull/104154) ([Groene AI](https://github.com/groeneai)).
* Fix `LOGICAL_ERROR` exception "Unexpected return type from comparison. Expected `UInt8`. Got `Const(Nullable(UInt8))`" when comparing a nested `Tuple(Tuple(Nullable(...)))` (or deeper nesting) with a `String` literal. The comparison's return type is now correctly inferred as `Nullable(UInt8)`, matching the runtime behaviour. [#104171](https://github.com/ClickHouse/ClickHouse/pull/104171) ([Groene AI](https://github.com/groeneai)).
* Fixed a server abort (`UndefinedBehaviorSanitizer: reference binding to null pointer`, segfault in release builds) on `SELECT ... FROM <ReplacingMergeTree(version, is_deleted)> FINAL PREWHERE is_deleted = <expr> AND <other column expr>` when `query_plan_optimize_lazy_final = 1`. The lazy-FINAL non-intersecting reading step lost the `is_deleted` column from its output header because prewhere consumed it as an input without re-exposing it as an output. The downstream `addIsDeletedFilter` step then dereferenced a null `ActionsDAG::Node` pointer. [#104177](https://github.com/ClickHouse/ClickHouse/pull/104177) ([Groene AI](https://github.com/groeneai)).
* When calling system.failpoints table, it would use a failpoint, thus possibly disabling it. [#104237](https://github.com/ClickHouse/ClickHouse/pull/104237) ([Pedro Ferreira](https://github.com/PedroTadim)).
* Fix `MemorySanitizer: use-of-uninitialized-value` in `detectLanguage*` functions when the input contains a UTF-8 character ending exactly at the buffer boundary. [#104257](https://github.com/ClickHouse/ClickHouse/pull/104257) ([Raúl Marín](https://github.com/Algunenano)).
* Fix a logical error (`Bad cast from type DB::CachedObjectStorage to DB::S3ObjectStorage`) that aborted argument parsing of data-lake table functions and engines (`icebergS3`, `deltaLakeS3`, etc.) when called with `SETTINGS disk = '...'` against a disk whose underlying object storage is wrapped by a decorator such as a filesystem cache. Closes [#89300](https://github.com/ClickHouse/ClickHouse/issues/89300). [#104258](https://github.com/ClickHouse/ClickHouse/pull/104258) ([Groene AI](https://github.com/groeneai)).
* Fix parsing of parenthesized subscript expressions on columns named `values`, for example `(values['a'])`, so they are no longer interpreted as SQL-standard `VALUES` table expressions. [#104312](https://github.com/ClickHouse/ClickHouse/pull/104312) ([Desel72](https://github.com/Desel72)).
* Fix a server abort/`LOGICAL_ERROR` in the filesystem cache background eviction thread (`SLRUFileCachePriority::collectEvictionInfo`) that could fire when `keep_free_space_size_ratio` or `keep_free_space_elements_ratio` was high enough to trigger eviction while all cache entries had already been promoted to the SLRU protected queue (probationary empty). [#104313](https://github.com/ClickHouse/ClickHouse/pull/104313) ([Groene AI](https://github.com/groeneai)).
* Fix exceptions (`NOT_FOUND_COLUMN_IN_BLOCK`, `LOGICAL_ERROR`, `AMBIGUOUS_COLUMN_NAME`) when using projections with UNION ALL views, window functions, or alias-column name collisions. Regression from [#88798](https://github.com/ClickHouse/ClickHouse/issues/88798). [#104317](https://github.com/ClickHouse/ClickHouse/pull/104317) ([Amos Bird](https://github.com/amosbird)).
* Fixes a possible underflow in parsing postgres arrays. [#104322](https://github.com/ClickHouse/ClickHouse/pull/104322) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* Functions that return a non-`Nullable` type (such as `Array`, `Tuple`, or `Map`) now accept `Nullable` arguments. Affected functions include `extractAll`, `extractAllGroups`, `extractAllGroupsHorizontal`, `extractAllGroupsVertical`, `extractGroups`, `splitByChar`, `splitByString`, `splitByRegexp`, `splitByWhitespace`, `splitByNonAlpha`, and `alphaTokens`. `NULL` input rows produce the default value of the result type (e.g. an empty array) instead of raising "Nested type is not allowed inside Nullable type". [#104326](https://github.com/ClickHouse/ClickHouse/pull/104326) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix iceberg stats with partitioned table. This closes [#104321](https://github.com/ClickHouse/ClickHouse/issues/104321). [#104329](https://github.com/ClickHouse/ClickHouse/pull/104329) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix a fatal logical error at server startup on macOS (and similar jemalloc builds) where `Jemalloc::verifySetup` incorrectly reported a `jemalloc_enable_background_threads` mismatch because optional `background_thread` / `max_background_threads` mallctls are absent; verification is skipped when those mallctls are unavailable, and `getValue` no longer leaves the output uninitialized on failure. Closes [#102183](https://github.com/ClickHouse/ClickHouse/issues/102183). [#104330](https://github.com/ClickHouse/ClickHouse/pull/104330) ([SAYON DEEP](https://github.com/sayondeep)).
* Fix a correctness regression where `SELECT` queries with `max_rows_to_read_leaf` and `read_overflow_mode_leaf = 'throw'` could incorrectly throw `TOO_MANY_ROWS` even when a skip index would have reduced the read below the leaf cap. The symmetric non-leaf settings (`max_rows_to_read` / `read_overflow_mode`) were already handled. [#104331](https://github.com/ClickHouse/ClickHouse/pull/104331) ([Groene AI](https://github.com/groeneai)).
* `toUUID`, `toUUIDOrNull`, `toUUIDOrZero`, `toUUIDOrDefault`, `CAST` to `UUID` and `Nullable(UUID)`, `accurateCastOrNull` to `UUID`, and the input formats that parse a UUID from text (`Avro`, `MsgPack`, `JSONExtract`, ...) now reject strings that have the right length but contain non-hexadecimal characters. Previously such inputs were silently turned into a fabricated UUID by walking off the end of the hex digit lookup table; now `toUUID` throws `CANNOT_PARSE_UUID`, and the `Or*` variants return `NULL` / the zero UUID / the supplied default. [#104370](https://github.com/ClickHouse/ClickHouse/pull/104370) ([Groene AI](https://github.com/groeneai)).
* Fix `Bad cast` `LOGICAL_ERROR` in `caseWithExpression` (and SQL `CASE expr WHEN ... THEN ... ELSE ...`) when the THEN-only supertype and the (THENs + ELSE) supertype land in different `ColumnDecimal` storages -- for example THEN values `(UInt16, Int8)` with an ELSE of `Decimal(9, 2)`. Closes [#104335](https://github.com/ClickHouse/ClickHouse/issues/104335). [#104378](https://github.com/ClickHouse/ClickHouse/pull/104378) ([Groene AI](https://github.com/groeneai)).
* Internal failures reported via `logExceptionBeforeStart` (asynchronous insert flushes, materialized-view refreshes, parse errors raised during internal queries) now correctly increment the `FailedInternalQuery`, `FailedInternalSelectQuery`, and `FailedInternalInsertQuery` ProfileEvents alongside the user-visible `FailedQuery`, `FailedSelectQuery`, and `FailedInsertQuery` counters. Previously these internal counters stayed at zero for failures occurring before query execution started, undercounting a major class of internal failures. [#104399](https://github.com/ClickHouse/ClickHouse/pull/104399) ([Groene AI](https://github.com/groeneai)).
* Fix `Code: 36. BAD_ARGUMENTS Expected literal, got {name:Type}` thrown when a query parameter is used inside the `base_backup` setting of a `BACKUP` or `RESTORE` statement (e.g. `BACKUP ... SETTINGS base_backup = S3({backup_name:String}, ...)`). The regression was introduced in `26.1.5` by PR [#99205](https://github.com/ClickHouse/ClickHouse/issues/99205). Closes [#103324](https://github.com/ClickHouse/ClickHouse/issues/103324). [#104413](https://github.com/ClickHouse/ClickHouse/pull/104413) ([Groene AI](https://github.com/groeneai)).
* Fix a server abort in `IcebergLocal`/`IcebergS3` writes when `ALTER TABLE ... DROP COLUMN` is followed by an `INSERT` with `iceberg_metadata_staleness_ms` greater than zero. `ALTER` now invalidates the local Iceberg metadata files cache so subsequent reads and writes see the new schema. [#104419](https://github.com/ClickHouse/ClickHouse/pull/104419) ([Groene AI](https://github.com/groeneai)).
* Fix `DROP ROLE`, `DROP USER`, `DROP SETTINGS PROFILE`, `DROP ROW POLICY`, `DROP QUOTA` and `DROP MASKING POLICY` to remove references to the dropped entity from any other access entity that referenced it (e.g. a user's `DEFAULT ROLE` list, a settings profile's `TO` list, a row policy's grantees) and persist the cleanup to disk. Previously the in-memory state appeared correct because `SHOW CREATE` filters unknown UUIDs, but the on-disk `.sql` files retained dangling `ID('<dropped-uuid>')` entries and the references were resurrected on the next server restart, surfacing as `ACCESS_ENTITY_NOT_FOUND` errors during distributed query execution. [#104427](https://github.com/ClickHouse/ClickHouse/pull/104427) ([Groene AI](https://github.com/groeneai)).
* Fixed a server abort triggered by `azureBlobStorage`, `AzureBlobStorage`-engine, and DeltaLake-on-Azure with a connection string whose `BlobEndpoint` URL has an empty, non-numeric, or out-of-range port (e.g. `BlobEndpoint=http://host:abc/`). The server now returns a clean `BAD_ARGUMENTS` error instead of aborting in debug/sanitizer builds. [#104460](https://github.com/ClickHouse/ClickHouse/pull/104460) ([Groene AI](https://github.com/groeneai)).
* Allow an unquoted identifier as the user name in the `remote` and `remoteSecure` table functions, mirroring how the database and table arguments accept unquoted identifiers. Previously such a query failed with a misleading authentication error referring to the `default` user. [#104465](https://github.com/ClickHouse/ClickHouse/pull/104465) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed `Logical error: Incorrect ASTSelectWithUnionQuery (modes: M, selects: N)` triggered when a SQL user-defined function body contains a parenthesized inner `UNION ALL` (e.g. `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)).
* Fix `uniqThetaIntersect` returning the cardinality of the first argument instead of `0` when the second argument is an empty `uniqTheta` state -- for example the result of `uniqThetaMergeStateIf(s, predicate)` when the predicate excludes every row. [#104529](https://github.com/ClickHouse/ClickHouse/pull/104529) ([Groene AI](https://github.com/groeneai)).
* Fix `SHOW TABLES` and `system.tables` silently truncating the listing for `DataLakeCatalog` databases backed by Iceberg REST catalogs (`iceberg-rest`, `onelake`, `biglake`). When the catalog server paginates the list-tables or list-namespaces response (e.g. Microsoft Fabric / OneLake beyond \~50 tables per namespace), tables on later pages were silently invisible to `SHOW TABLES` and `system.tables`, even though they were queryable via direct `SELECT`. `RestCatalog` now follows the `next-page-token` continuation token defined by the Iceberg REST OpenAPI spec, matching the existing behavior of `PaimonRestCatalog` and `UnityCatalog`. [#104531](https://github.com/ClickHouse/ClickHouse/pull/104531) ([Groene AI](https://github.com/groeneai)).
* The `input` table function now infers its structure from the surrounding `INSERT` query's `FORMAT` clause when that format has a fixed schema (`LineAsString`, `RawBLOB`, `JSONAsString`, etc.), so users no longer have to repeat the structure as `input('line String')` for these formats. [#104532](https://github.com/ClickHouse/ClickHouse/issues/104532). [#104533](https://github.com/ClickHouse/ClickHouse/pull/104533) ([Groene AI](https://github.com/groeneai)).
* Updated datatype of fields in Iceberg history from `Int32` to `Int64`. Closes [#94176](https://github.com/ClickHouse/ClickHouse/issues/94176). [#104579](https://github.com/ClickHouse/ClickHouse/pull/104579) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* Fixed `Inconsistent AST formatting` `LOGICAL_ERROR` when parsing a function call where a lambda follows a comma, e.g. ``SELECT substring(x, `x` -> `x`)``. The parser used to silently merge the preceding arguments into the lambda's left-hand side, producing a single-argument call that could not be re-parsed back to the same AST. It now preserves the function's original arity. [#104626](https://github.com/ClickHouse/ClickHouse/pull/104626) ([Groene AI](https://github.com/groeneai)).
* `CHECK TABLE t` now prefers a `TEMPORARY` table over a permanent one with the same name when no database qualifier is given, matching the precedence already used by `SHOW CREATE TABLE`, `DESCRIBE TABLE`, `OPTIMIZE TABLE`, and `ALTER TABLE`. Previously `CHECK TABLE t` skipped temporary tables entirely, so it failed with `UNKNOWN_TABLE` on a temporary `Log` or `File` table even though those engines support `CHECK`. Follow-up to [#100966](https://github.com/ClickHouse/ClickHouse/pull/100966). [#104637](https://github.com/ClickHouse/ClickHouse/pull/104637) ([Groene AI](https://github.com/groeneai)).
* Fix Keeper termination and restart loop when `get /keeper/availability_zone` is sent with `quorum_reads=true` to a Keeper without `<placement>` configured. [#104663](https://github.com/ClickHouse/ClickHouse/pull/104663) ([myeongjun](https://github.com/myeongjjun)).
* Fix a TOCTOU data race in `FutureSetFromTuple::buildOrderedSetInplace` that results in a logical error. [#104673](https://github.com/ClickHouse/ClickHouse/pull/104673) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix several functions returning different results for the same input depending on whether arguments arrived as columns or constants: `bitRotateLeft` / `bitRotateRight` (boundary shift counts), `length(FixedString)` / `concatWithSeparator` with `LowCardinality(Nullable)` inputs, `roundDown` on NaN, and `rightUTF8` on invalid UTF-8. [#104710](https://github.com/ClickHouse/ClickHouse/pull/104710) ([Raúl Marín](https://github.com/Algunenano)).
* Fixed `anyHeavy` returning a non-heavy value when the most frequent value was the column default and the data lived across multiple `MergeTree` parts (sparse-column read path). [#104712](https://github.com/ClickHouse/ClickHouse/pull/104712) ([Raúl Marín](https://github.com/Algunenano)).
* Fix several defects in setting-constraint handling: `MergeTreeSettings` constraints declared on a setting's canonical name could be bypassed by writing to an alias of that setting; the `disallowed_values` constraint check threw an exception on clamp paths (secondary queries, `ON CLUSTER` workers, `SQL SECURITY DEFINER` views) instead of silently dropping the change. [#104737](https://github.com/ClickHouse/ClickHouse/pull/104737) ([Raúl Marín](https://github.com/Algunenano)).
* Fix a `LOGICAL_ERROR` exception (`Metadata is not initialized`) raised by `OPTIMIZE TABLE`, `ALTER TABLE ... DELETE`, `ALTER TABLE ... ADD COLUMN` and other ALTER variants on a lazily-attached `Iceberg` / `IcebergLocal` / `DeltaLake` / `Hudi` table whose metadata had not been loaded yet (typical after a server restart, or after a previous metadata write failed and left a corrupted metadata file on disk). The operation now either proceeds normally if the metadata loads successfully, or surfaces the underlying load failure as a regular user-facing exception instead of aborting the server in debug / sanitizer builds. [#104738](https://github.com/ClickHouse/ClickHouse/pull/104738) ([Groene AI](https://github.com/groeneai)).
* Fix segfault due to a use-after-free bug in `AvroConfluentRowInputFormat`. [#104751](https://github.com/ClickHouse/ClickHouse/pull/104751) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Scalar variants of `numericIndexedVectorPointwiseMultiply`, `numericIndexedVectorPointwiseDivide`, `numericIndexedVectorPointwiseEqual`, and `numericIndexedVectorPointwiseNotEqual` now raise `INCORRECT_DATA` when called with a `UInt64` scalar above `Int64::max`. [#104784](https://github.com/ClickHouse/ClickHouse/pull/104784) ([FriendLey](https://github.com/FriendLey)).
* Fix a bug where manually overriding a setting via its alias name (e.g. `SET enable_analyzer = 1` instead of `SET allow_experimental_analyzer = 1`) after applying a `compatibility` setting could cause that override to be reverted by a subsequent change of the `compatibility` setting. [#104829](https://github.com/ClickHouse/ClickHouse/pull/104829) ([Raúl Marín](https://github.com/Algunenano)).
* Fix AWS logger being disabled after [https://github.com/ClickHouse/ClickHouse/commit/0e8ad4355c9d](https://github.com/ClickHouse/ClickHouse/commit/0e8ad4355c9d). [#104837](https://github.com/ClickHouse/ClickHouse/pull/104837) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix three more functions returning different results for the same input depending on whether arguments arrived as columns or constants: `transform` (and `caseWithExpression` through it) with a constant `Date`/`Date32`/`Enum`/`FixedString` default, comparison operators between a `String` and a constant `FixedString`, and `if`/`ifNull`/`nullIf` with a `FixedString` branch under a constant condition. [#104858](https://github.com/ClickHouse/ClickHouse/pull/104858) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `Bad cast from type DB::ColumnConst to DB::ColumnNullable` server abort during partition pruning for `MergeTree` tables when the partition expression contains a function chain that collapses to a single constant value (such as `floor(NULL, toRelativeYearNum(...))`). [#104861](https://github.com/ClickHouse/ClickHouse/pull/104861) ([Groene AI](https://github.com/groeneai)).
* Fix a `ThreadSanitizer` data race in the `ContextData` copy constructor: `table_function_results` was copied from the source object without acquiring `table_function_results_mutex`, so a concurrent `Context::executeTableFunction` writer could race against the unsynchronized read in the copy constructor. [#104879](https://github.com/ClickHouse/ClickHouse/pull/104879) ([Groene AI](https://github.com/groeneai)).
* Fix data part consistency checks for types with dynamic structure and detect corrupted columns\_substreams.txt. Resubmit of [https://github.com/ClickHouse/ClickHouse/pull/103858](https://github.com/ClickHouse/ClickHouse/pull/103858) with additional changes. [#104888](https://github.com/ClickHouse/ClickHouse/pull/104888) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix race between DROP and UNDROP in DatabaseCatalog. [#104915](https://github.com/ClickHouse/ClickHouse/pull/104915) ([Azat Khuzhin](https://github.com/azat)).
* Fix filesystem cache dynamic resize with partially downloaded segments, including restore accounting after failed eviction. [#104921](https://github.com/ClickHouse/ClickHouse/pull/104921) ([Antonio Andelic](https://github.com/antonio2368)).
* `DETACH TABLE` on a temporary table (without the `TEMPORARY` keyword) now correctly raises `SYNTAX_ERROR`, matching the behavior of `DETACH TEMPORARY TABLE`. Previously it silently set an internal `is_detached` flag and returned without error. To remove a temporary table, use `DROP TEMPORARY TABLE` or `DROP TABLE` (the latter resolves the temporary table via `Context::ResolveExternal`). Closes [#103475](https://github.com/ClickHouse/ClickHouse/issues/103475). [#104943](https://github.com/ClickHouse/ClickHouse/pull/104943) ([Groene AI](https://github.com/groeneai)).
* Make the `filesystem` table function honor `max_memory_usage` / `max_server_memory_usage` when loading file content. Previously, large or numerous parallel content reads could push past the limit without raising `MEMORY_LIMIT_EXCEEDED` and end up OOM-killed instead. [#104956](https://github.com/ClickHouse/ClickHouse/pull/104956) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed a `LOGICAL_ERROR` thrown when filtering `system.detached_tables` by `uuid` (e.g. `SELECT count() FROM system.detached_tables WHERE uuid = '...'`). The query now returns the expected result instead of aborting the server. [#104979](https://github.com/ClickHouse/ClickHouse/pull/104979) ([Groene AI](https://github.com/groeneai)).
* `flattenTuple` no longer raises a `LOGICAL_ERROR` when called on a tuple whose nested structure contains only empty `Tuple()` leaves (e.g. `Tuple(c0 Array(Tuple()))` or `Tuple(c0 Tuple())`). Such inputs now produce a user-facing `ILLEGAL_TYPE_OF_ARGUMENT` exception explaining that the flatten result would be an empty tuple. [#104989](https://github.com/ClickHouse/ClickHouse/pull/104989) ([Groene AI](https://github.com/groeneai)).
* Fix a server abort and a silent-wrong-result bug when querying `loop(remote(...))` (or any `loop()` wrapping a storage that can defer aggregation) with `GROUP BY`. The outer planner used to add `MergingAggregatedStep` based on the inner storage's reported processing stage, but `LoopSource` always materialises its inner select with `QueryProcessingStage::Complete` and emits plain column chunks, so `MergingAggregatedTransform` tripped a `LOGICAL_ERROR` (`Chunk info was not set for chunk in MergingAggregatedTransform`) under `enable_parallel_replicas = 1` and silently dropped the outer aggregation otherwise. [#105001](https://github.com/ClickHouse/ClickHouse/pull/105001) ([Groene AI](https://github.com/groeneai)).
* `clickhouse-benchmark --reconnect` (bare, no value) was inadvertently broken in 25.4 by a change that turned `--reconnect` into an integer option, requiring a value. The bare form now works again and is equivalent to `--reconnect=1` (reconnect on every query). [#105006](https://github.com/ClickHouse/ClickHouse/pull/105006) ([Groene AI](https://github.com/groeneai)).
* Fixed malformed JSON output for column names ending with incomplete UTF-8 sequences. [#105012](https://github.com/ClickHouse/ClickHouse/pull/105012) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix silent data loss after `EXCHANGE TABLES` or `CREATE OR REPLACE TABLE` of a materialized view's source table. The `MV`'s source-view dependency edge is now kept on the original name so it continues to fire on inserts. Regression introduced by [#98779](https://github.com/ClickHouse/ClickHouse/issues/98779); restores the pre-regression behavior. [#105029](https://github.com/ClickHouse/ClickHouse/pull/105029) ([Sema Checherinda](https://github.com/CheSema)).
* Fix `CANNOT_COMPILE_CODE Could not find symbol __fixunsdfti` when JIT-compiling expressions that convert a `Float` to `UInt128`, such as `toUInt128(<Float64 expression>)`. The unsigned 128-bit float-to-int compiler-rt builtins were missing from the JIT symbol resolver. Closes [#105031](https://github.com/ClickHouse/ClickHouse/issues/105031). [#105048](https://github.com/ClickHouse/ClickHouse/pull/105048) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `clickhouse-local` not printing log messages from a failed query when `send_logs_level` is set. [#105067](https://github.com/ClickHouse/ClickHouse/pull/105067) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect results when the same parameterized view is referenced more than once in the same query with different argument values. Previously, the analyzer collapsed the calls into one, silently dropping all but the first filter. [#105170](https://github.com/ClickHouse/ClickHouse/pull/105170) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `TOTALS` row being rendered twice at the bottom of the result table in the `play.html` web UI. [#103803](https://github.com/ClickHouse/ClickHouse/pull/103803) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Reject non-finite vectors (`NaN`, `±Inf`) during vector search (either as searched vectors or as reference vectors); they previously caused undefined behavior in `usearch`. [#104079](https://github.com/ClickHouse/ClickHouse/pull/104079) ([Groene AI](https://github.com/groeneai)).
* PromQL: fix the aggregation operator for empty vectors. [#104425](https://github.com/ClickHouse/ClickHouse/pull/104425) ([Vitaly Baranov](https://github.com/vitlibar)).
* PromQL: fix error handling in the Prometheus query API. [#104741](https://github.com/ClickHouse/ClickHouse/pull/104741) ([Vitaly Baranov](https://github.com/vitlibar)).
* Fix a race in `MergeTreeTransaction::afterCommit` where, after a connection loss between writing the commit `CSN` to ZooKeeper and finalizing the transaction, the `COMMIT` response could reach the client before the new `creation_csn` / `removal_csn` became visible in `system.parts`. [#104708](https://github.com/ClickHouse/ClickHouse/pull/104708) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fix exponential memory growth in the KQL parser when converting nested array indexing (`arr[arr[arr[...]]]`). [#105142](https://github.com/ClickHouse/ClickHouse/pull/105142) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect results for `RIGHT ANY JOIN` when the right table has multiple rows per key and the output block is split due to size limits. Closes [#99431](https://github.com/ClickHouse/ClickHouse/issues/99431). [#102064](https://github.com/ClickHouse/ClickHouse/pull/102064) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Check for stack overflow in `Avro` reader during nested-type deserialization. [#102417](https://github.com/ClickHouse/ClickHouse/pull/102417) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix duplicate rows in `system.completions` for `MergeTree` settings — each setting name appeared twice because both `getMergeTreeSettings` and `getReplicatedMergeTreeSettings` were dumped despite having identical setting names. Closes [#102013](https://github.com/ClickHouse/ClickHouse/issues/102013). [#102015](https://github.com/ClickHouse/ClickHouse/pull/102015) ([Groene AI](https://github.com/groeneai)).
* Fix `StorageObjectStorageQueue` (`S3Queue`, `AzureQueue`) blocking shutdown until partially-processed files were fully read from object storage. The source now aborts the read immediately on shutdown; deduplication ensures rows already streamed into the destination table before shutdown are not duplicated when the file is retried on next start. [#103126](https://github.com/ClickHouse/ClickHouse/pull/103126) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fix multi-block inserts to the `Alias` table engine with `insert_deduplication_token` so that all blocks are kept. [#103246](https://github.com/ClickHouse/ClickHouse/pull/103246) ([Enric Calabuig](https://github.com/eclbg)).
* Fix `JSONHas` and `JSONExtractBool` on native `JSON` columns returning the extracted value (cast to `UInt8`) instead of `0`/`1`. [#103313](https://github.com/ClickHouse/ClickHouse/pull/103313) ([zxuhan7](https://github.com/zxuhan)).
* Protect the `CustomSeparated` input format against malformed or adversarial data that omits `format_custom_row_after_delimiter`. Header detection, schema inference, and variable-column rows previously accumulated fields unboundedly and could allocate many gigabytes of memory before failing. Reads now fail with `INCORRECT_DATA` once a single row contains more than 1,000,000 fields. [#103404](https://github.com/ClickHouse/ClickHouse/pull/103404) ([Groene AI](https://github.com/groeneai)).
* Fix `RESTORE` of replicated `MergeTree` tables so that restored part attachment uses `backup_restore_keeper_max_retries` instead of the regular insert Keeper retry budget. [#104610](https://github.com/ClickHouse/ClickHouse/pull/104610) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix wrong results from `WHERE p AND <LowCardinality(Nullable(int)) constant>` on `MergeTree` tables. Previously such queries returned zero rows because part pruning derived a `NULL` default from the `LowCardinality(Nullable(...))` type and synthesized a `notEquals(x, NULL)` guard, pruning every part. [#104767](https://github.com/ClickHouse/ClickHouse/pull/104767) ([Groene AI](https://github.com/groeneai)).
* Fix incorrect aggregation result when grouping by a non-injective function of a column that is also the partition key (e.g. `PARTITION BY a` with `GROUP BY intDiv(a, 2)` or `a % 2`). Values from different partitions that mapped to the same group were not merged, producing duplicate group rows under `allow_aggregate_partitions_independently = 1`. [#104869](https://github.com/ClickHouse/ClickHouse/pull/104869) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix a race in `Keeper` snapshot transfer where a snapshot could be removed or moved while it was being sent to a recovering follower. [#104941](https://github.com/ClickHouse/ClickHouse/pull/104941) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix a silent wrong-result bug in `hilbertEncode` and `mortonEncode` where a non-constant `Tuple` first argument (range mask) used row 0's values to drive the bit-shift for every row. The functions now compute the per-row mask values, so the result no longer depends on the input being constant or on the block size. [#104992](https://github.com/ClickHouse/ClickHouse/pull/104992) ([Groene AI](https://github.com/groeneai)).
* Fix `clickhouse-local` silently ignoring user-level configuration (`profiles`, `users`, `quotas`, access-control settings) when the configuration file is auto-discovered from `./clickhouse-local.xml`, `~/.clickhouse-local/config.xml`, or `/etc/clickhouse-local/config.xml`. Previously these settings were applied only when `--config-file` was passed or `./config.xml` existed in the current directory; now all discovery paths behave consistently. [#105008](https://github.com/ClickHouse/ClickHouse/pull/105008) ([Groene AI](https://github.com/groeneai)).
* Fix `BFloat16` columns silently returning zero matches when compared against a string literal (e.g. `WHERE bf16_col = '49.9'`). [#105042](https://github.com/ClickHouse/ClickHouse/pull/105042) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `CLEAR COLUMN` and TTL handling during merges for `SummingMergeTree`, `AggregatingMergeTree`, and `CoalescingMergeTree` when merge-required columns are absent or expired. Closes [#101953](https://github.com/ClickHouse/ClickHouse/issues/101953). [#105203](https://github.com/ClickHouse/ClickHouse/pull/105203) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix a race between `DNSCacheUpdater::run` and `Context::reloadClusterConfig` by adding an explicit null-guard for `shared->clusters_config` before dereferencing it. [#105220](https://github.com/ClickHouse/ClickHouse/pull/105220) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* Fix `best_effort` date-time parsing for `toDateTime64` with `ms` and `ns` precision. [#105233](https://github.com/ClickHouse/ClickHouse/pull/105233) ([Kaviraj Kanagaraj](https://github.com/kavirajk)).
* Fix `OSIOWaitMicroseconds` reporting thread-lifetime I/O wait instead of per-query I/O wait. [#105246](https://github.com/ClickHouse/ClickHouse/pull/105246) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* `Hudi` table engine now raises `INCORRECT_DATA` (a regular query-level exception) instead of `LOGICAL_ERROR` when a parquet file in the table directory does not match the Hudi `[FileId]_[FileWriteToken]_[Timestamp].[extension]` naming convention. Previously such file names caused an exception in debug builds. [#105266](https://github.com/ClickHouse/ClickHouse/pull/105266) ([Groene AI](https://github.com/groeneai)).
* Fix deadlock in `ParallelFormattingOutputFormat` on schedule failure: when `scheduleFormatterThreadForUnitWithNumber` throws (e.g. `CANNOT_SCHEDULE_TASK`), the unit was left in `READY_TO_FORMAT` with no formatter thread to process it, leading to a hang. The schedule call is now wrapped in `try`/`catch` and any failure is routed through `onBackgroundException` so the collector exits cleanly. [#105275](https://github.com/ClickHouse/ClickHouse/pull/105275) ([Azat Khuzhin](https://github.com/azat)).
* Fix silent data loss in `Distributed` async inserts when recovering from an abnormal shutdown: if the last `.bin` file in a saved batch was intact but a middle one was corrupted, `DistributedAsyncInsertBatch::recoverBatch` would only validate the last file's header and then `sendBatch` would mark the entire batch — including the intact files — as broken, losing their rows. Each file's header is now validated individually so only the actually broken file is moved to `broken/` and the surviving rows reach the remote shard. [#105281](https://github.com/ClickHouse/ClickHouse/pull/105281) ([Groene AI](https://github.com/groeneai)).
* Fix a regression in `clickhouse extract-from-config --try`: when the config used `from_env` attributes and had no `include_from` element (or had one pointing to a missing file), all `from_env` substitutions were silently dropped and returned empty strings. This broke the Docker entrypoint port discovery in 26.2.5. Closes [#101704](https://github.com/ClickHouse/ClickHouse/issues/101704). [#105283](https://github.com/ClickHouse/ClickHouse/pull/105283) ([Groene AI](https://github.com/groeneai)).
* Fix `INSERT INTO` a `SQLite` table failing with a SQLite syntax error when the inserted value is an `Enum`, `JSON`, or `AggregateFunction` whose text representation contains a single quote. The `output_format_values_escape_quote_with_quote` setting is now honored by the corresponding serializations (previously only `String` and `FixedString` honored it). [#105285](https://github.com/ClickHouse/ClickHouse/pull/105285) ([Groene AI](https://github.com/groeneai)).
* Fix `Code: 44. ILLEGAL_COLUMN: Cannot add column ...: column with this name already exists` thrown by distributed queries with `allow_push_predicate_ast_for_distributed_subqueries = 1` (the default) when a `GLOBAL IN` tuple is matched against a subquery whose projection contains duplicate column names, e.g. `(x, y) GLOBAL IN (SELECT number, number FROM numbers(5))`. [#105290](https://github.com/ClickHouse/ClickHouse/pull/105290) ([Groene AI](https://github.com/groeneai)).
* Fix `reinterpret` to `Array(LowCardinality(...))` returning a confusing `NOT_IMPLEMENTED` error at runtime; it now returns `ILLEGAL_TYPE_OF_ARGUMENT` during type checking. [#105301](https://github.com/ClickHouse/ClickHouse/pull/105301) ([Raúl Marín](https://github.com/Algunenano)).
* `minMap`/`maxMap` (array form) and `minMappedArrays`/`maxMappedArrays` now treat `NaN` consistently with `ORDER BY`: `NaN` is treated as last (returned only when all values are `NaN`). Previously, results depended on the position of `NaN` in the data due to IEEE 754 unordered comparison semantics, and disagreed with the `Map`-argument form of `minMap`/`maxMap` that was fixed in [#100448](https://github.com/ClickHouse/ClickHouse/pull/100448). [#105331](https://github.com/ClickHouse/ClickHouse/pull/105331) ([Raúl Marín](https://github.com/Algunenano)).
* Fix a memory leak in the per-table `ColumnsDescription` cache for `MergeTree`-family tables with `Nested` columns. Entries were never evicted across `ALTER ADD COLUMN`/`DROP COLUMN` cycles when `share_nested_offsets = 1` (the default). [#105376](https://github.com/ClickHouse/ClickHouse/pull/105376) ([Groene AI](https://github.com/groeneai)).
* Fix `BAD_ARGUMENTS` exception "It's a bug! Only integer types are supported by `__bitWrapperFunc`" thrown when a `SELECT` with a `TYPE set(N)` skip index has a `WHERE` atom whose result type is `Float`, `BFloat16`, or any other non-integer type (for example `WHERE c0 + 0.1` or `WHERE log(c0)`). The skip index now falls back to the regular filter path in that case. [#105384](https://github.com/ClickHouse/ClickHouse/pull/105384) ([Groene AI](https://github.com/groeneai)).

#### Build/Testing/Packaging Improvement

* Stop using the system `compiler-rt` libraries and headers. Closes [#91475](https://github.com/ClickHouse/ClickHouse/issues/91475). [#102857](https://github.com/ClickHouse/ClickHouse/pull/102857) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Refresh the distroless Docker base image to fix OpenSSL CVEs in `libssl3t64`. [#103583](https://github.com/ClickHouse/ClickHouse/pull/103583) ([Rahul Nair](https://github.com/motsc)).
* Reliably receive the GPG key during releases by chaining multiple Ubuntu keyservers, instead of timing out on `keyserver.ubuntu.com`. [#103834](https://github.com/ClickHouse/ClickHouse/pull/103834) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* Remove and forbid build-time `CMake` checks (`check_*`, `try_compile`, `try_run`). The compiler and toolchain are fixed, so feature detection at configure time is unnecessary and is now blocked project-wide; any version-specific behaviour must be gated on `CMAKE_CXX_COMPILER_VERSION` explicitly. [#103980](https://github.com/ClickHouse/ClickHouse/pull/103980) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Bump `libarchive` from 3.8.6 to 3.8.7. [#104047](https://github.com/ClickHouse/ClickHouse/pull/104047) ([Robert Schulze](https://github.com/rschu1ze)).
* Update `mongo-c-driver` to 2.3.0. [#104300](https://github.com/ClickHouse/ClickHouse/pull/104300) ([Raúl Marín](https://github.com/Algunenano)).
* Update LLVM dependencies for 22.x. [#104381](https://github.com/ClickHouse/ClickHouse/pull/104381) ([Joshua Carp](https://github.com/jmcarp)).
* Make the embedded-client and PTY descriptor classes build on macOS and FreeBSD by using portable POSIX `posix_openpt` / `grantpt` / `unlockpt` and removing Linux-only `#if` guards. [#104436](https://github.com/ClickHouse/ClickHouse/pull/104436) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Upgrade `librdkafka` to version 2.14.1. [#105222](https://github.com/ClickHouse/ClickHouse/pull/105222) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).

<h3 id="264">
  ClickHouse release 26.4, 2026-04-30. [Presentation](https://presentations.clickhouse.com/2026-release-26.4/), [Video](https://www.youtube.com/watch?v=9lSVy7k2EoI)
</h3>

#### Backward Incompatible Change

* The `IN` operator now uses exact value semantics for `Bool` type: only `0` and `1` values in the set match `Bool` values. Previously, numeric values greater than `255` in the `IN` set were incorrectly clamped to true when compared against `Bool`, so `SELECT CAST(1, 'Bool') IN (256)` returned 1. Now it correctly returns `0`. Closes [#92980](https://github.com/ClickHouse/ClickHouse/issues/92980). [#93115](https://github.com/ClickHouse/ClickHouse/pull/93115) ([Ashrith Bandla](https://github.com/ashrithb)).
* The H3 library has been updated to v4, which improves the precision of length, area, and other metric calculations. This change is backward incompatible because the new results differ from previous ones. [#100348](https://github.com/ClickHouse/ClickHouse/pull/100348) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Disallows using `SELECT` as a bareword identifier in a `WITH` expression list element. [#101059](https://github.com/ClickHouse/ClickHouse/pull/101059) ([Aruj Bansal](https://github.com/arujbansal)).
* This patch changes how the merge table will handle virtuals. If the underlying table contains `_table` or `_database`, these columns will be read from storage; otherwise, they will be filled after the read step using the expression step. [#101742](https://github.com/ClickHouse/ClickHouse/pull/101742) ([Mikhail Artemenko](https://github.com/Michicosun)).
* The `IN` operator now rejects lossy `Decimal` conversions inside composite types (`Tuple`, `Array`, `Map`) as well, making its behavior consistent with top-level scalar comparisons. Previously, precision checks were enforced only for top-level scalar values: for example, `CAST('33.3', 'Decimal64(1)') IN (33.33)` correctly returned `0`, but `CAST(['33.3'], 'Array(Decimal64(1))') IN ([33.33])` incorrectly returned `1` because the lossy conversion happened inside an `Array`. Now both cases correctly return `0`. [#101812](https://github.com/ClickHouse/ClickHouse/pull/101812) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Reduced default `http_max_fields` from 1,000,000 to 1,000 and `http_max_field_name_size` from 128 KB to 4 KB to limit pre-authentication memory usage by HTTP connections. Added `http_max_request_header_size` and `http_headers_read_timeout` settings. Users who rely on the previous higher limits can restore them via settings. [#103285](https://github.com/ClickHouse/ClickHouse/pull/103285) ([Sema Checherinda](https://github.com/CheSema)).

#### New Feature

* Add automatic spilling to hash and parallel hash joins by converting them to grace hash join when memory limit is reached. This behavior is controlled by `max_bytes_before_external_join`. [#97813](https://github.com/ClickHouse/ClickHouse/pull/97813) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Add Arrow Flight SQL support. [#91170](https://github.com/ClickHouse/ClickHouse/pull/91170) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Add incremental read support for `Paimon` table engines with Keeper-backed snapshot progress tracking, including targeted snapshot delta reads via `paimon_target_snapshot_id`, and extend test coverage for type mapping, partition pruning, and incremental read scenarios. [#93655](https://github.com/ClickHouse/ClickHouse/pull/93655) ([XiaoBinMu](https://github.com/Binnn-MX)).
* The `stem` function is now non-experimental (previously, setting `allow_experimental_nlp_functions` had to be enabled). [#102399](https://github.com/ClickHouse/ClickHouse/pull/102399) ([Jimmy Aguilar Mena](https://github.com/Ergus)). You can now stem all the words/tokens in columns `String`, `FixedString`, `Array([Fixed]String)`, `Nullable`, `LowCardinality` and `Const` easily with the `stem` function. [#99137](https://github.com/ClickHouse/ClickHouse/pull/99137) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Implement new behavior of `max_insert_block_size_rows`, `max_insert_block_size_bytes`, `min_insert_block_size_rows`, `min_insert_block_size_bytes` in squashing under compatibility setting `use_strict_insert_block_limits`. [#94207](https://github.com/ClickHouse/ClickHouse/pull/94207) ([Kirill Kopnev](https://github.com/Fgrtue)).
* Add function `arrayAutocorrelation(arr [, max_lag])` that computes the normalized autocorrelation of a numeric array for each lag. Supports integer, float, and decimal array types. [#94776](https://github.com/ClickHouse/ClickHouse/pull/94776) ([Wenyu Chen](https://github.com/wenyuchen96)).
* A SQL function `obfuscateQuery`. Closes [#98010](https://github.com/ClickHouse/ClickHouse/issues/98010). [#98305](https://github.com/ClickHouse/ClickHouse/pull/98305) ([Xuewei Wang](https://github.com/Sallery-X)).
* Add support for Map and JSON/Object types as dictionary attributes. Now dictionaries can store and retrieve complex types including Map(String, String), Map(String, Array(String)), JSON, and Nullable(JSON) types in both FLAT and HASHED layouts. [#98627](https://github.com/ClickHouse/ClickHouse/pull/98627) ([yanglongwei](https://github.com/ylw510)).
* Added two new MergeTree settings — `replicated_fetches_min_part_level` and `replicated_fetches_min_part_level_timeout_seconds` — that allow replicas to skip fetching freshly-inserted (unmerged) parts from peers, reducing replication overhead during heavy ingestion. [#98625](https://github.com/ClickHouse/ClickHouse/pull/98625) ([tanner-bruce](https://github.com/tanner-bruce)).
* Add MergeTree skip index support for JSON columns using JSONAllPaths with bloom\_filter, tokenbf\_v1, ngrambf\_v1, and text (inverted) index types, enabling granule skipping based on the set of JSON paths present in each granule. [#98886](https://github.com/ClickHouse/ClickHouse/pull/98886) ([Pavel Kruglov](https://github.com/Avogar)).
* The `printf` function now supports non-constant format strings, allowing different format patterns per row based on column values. [#98991](https://github.com/ClickHouse/ClickHouse/pull/98991) ([Yash ](https://github.com/Onyx2406)).
* Add a new projection index, `commit_order`, that reorganizes data in insertion order. [#99004](https://github.com/ClickHouse/ClickHouse/pull/99004) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Add `highlight` function that wraps occurrences of search terms in a text string with HTML tags (default `<em>`/`</em>`). Supports ASCII case-insensitive matching, automatic merging of overlapping matches, and custom open/close tags. [#99131](https://github.com/ClickHouse/ClickHouse/pull/99131) ([Peng](https://github.com/fastio)).
* Implement quotas by normalized query hash to protect public ClickHouse services from abuse. 1. Support `NORMALIZED_QUERY_HASH` as a quota key type - separate quota buckets per unique normalized query, so `CREATE QUOTA q KEYED BY normalized_query_hash` tracks each distinct query independently. 2. Support `QUERIES_PER_NORMALIZED_HASH` as a quota resource type -- limits max executions of any single normalized query within an interval, so `MAX queries_per_normalized_hash = 100` prevents any one query pattern from running more than 100 times. [#99586](https://github.com/ClickHouse/ClickHouse/pull/99586) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Users can now write join queries using the `NATURAL JOIN` syntax, which automatically matches on all columns sharing the same name and deduplicates those columns in the result. [#99840](https://github.com/ClickHouse/ClickHouse/pull/99840) ([Peter Nguyen](https://github.com/petern48)).
* Support `SET TIME ZONE 'tz'` as alias for `SET session_timezone`. [#99883](https://github.com/ClickHouse/ClickHouse/pull/99883) ([phulv94](https://github.com/phulv94)).
* Added support for parameterized queries in the Web UI (`play.html`): query parameters like `{name:Type}` are detected and input fields are shown for filling in their values. [#100041](https://github.com/ClickHouse/ClickHouse/pull/100041) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support SQL standard `VALUES` clause as a table expression in `FROM`, e.g. `SELECT * FROM (VALUES (1, 'a'), (2, 'b')) AS t(id, val)`. [#100143](https://github.com/ClickHouse/ClickHouse/pull/100143) ([Desel72](https://github.com/Desel72)).
* Add PostgreSQL-compatible units to the `EXTRACT` operator: `EPOCH`, `DOW`, `DOY`, `ISODOW`, `ISOYEAR`, `WEEK`, `CENTURY`, `DECADE`, `MILLENNIUM`. Also fix `EXTRACT(WEEK FROM date)` which previously threw an error. [#100274](https://github.com/ClickHouse/ClickHouse/pull/100274) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added support for SQL-standard compound interval literals with `TO` range qualifiers, e.g. `INTERVAL '1:30' HOUR TO MINUTE`. Internally decomposed into sums of intervals. [#100453](https://github.com/ClickHouse/ClickHouse/pull/100453) ([Desel72](https://github.com/Desel72)).
* Add asynchronous metrics for kernel TCP receive and transmit buffer memory (`sk_rmem_alloc`, `sk_wmem_alloc`) of HTTP connection pool sockets, reported as p50/p75/p90/p95 percentiles and totals per connection group. [#100575](https://github.com/ClickHouse/ClickHouse/pull/100575) ([Sema Checherinda](https://github.com/CheSema)).
* Added a jemalloc profiling web UI for ClickHouse Keeper, available at `/jemalloc` on the HTTP control port. [#100606](https://github.com/ClickHouse/ClickHouse/pull/100606) ([murphy-4o](https://github.com/murphy-4o)).
* Implement command `SYSTEM FLUSH OBJECT STORAGE QUEUE db.table PATH 'x'` for ordered and unordered modes. [#100709](https://github.com/ClickHouse/ClickHouse/pull/100709) ([Bharat Nallan](https://github.com/bharatnc)).
* Added function `JSONAllValues` that returns all values from a `JSON` column as `Array(String)`, with values serialized in text representation and ordered by their path names. Added support of text index for `JSONAllValues` expression on `JSON` columns. When a text index is created on `JSONAllValues(json_column)`, it is automatically used to filter queries on `JSON` subcolumns (e.g., `json_column.key1 = 'value'`). [#100730](https://github.com/ClickHouse/ClickHouse/pull/100730) ([Anton Popov](https://github.com/CurtizJ)).
* Adds a new setting `input_format_column_name_matching_mode` which allows different case sensitivities for input formats. [#99346](https://github.com/ClickHouse/ClickHouse/pull/99346) ([manerone](https://github.com/Manerone)).
* Add `watch` command to `clickhouse-keeper-client` with watch support in `get`, `exists`, and `ls` commands. [#100834](https://github.com/ClickHouse/ClickHouse/pull/100834) ([Den Kalantaevskii](https://github.com/Diskein)).
* Added `getChildrenRecursive` (ListRecursive) request to ClickHouse Keeper and `lsr` command to `clickhouse-keeper-client`. This closes [#99916](https://github.com/ClickHouse/ClickHouse/issues/99916). [#100998](https://github.com/ClickHouse/ClickHouse/pull/100998) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Add new function `arrayTranspose` taking a two-dimensional array (matrix) and transposing it: `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` setting defaults to `'minmax, uniq'` — minmax and uniq statistics are created automatically for all suitable columns in new tables - `materialize_statistics_on_insert` defaults to false — statistics are now built during merges rather than at insert time, reducing insert overhead. use `SET materialize_statistics_on_insert = 1` to restore the old behavior. [#101275](https://github.com/ClickHouse/ClickHouse/pull/101275) ([Han Fei](https://github.com/hanfei1991)).
* Add `prefer_dependency_replica` refresh setting for materialized view dependency chains to reduce missing data from cross-replica replication lag. [#101591](https://github.com/ClickHouse/ClickHouse/pull/101591) ([Seva Potapov](https://github.com/seva-potapov)).
* Adds a `hasPhrase` (alias `matchPhrase`) function for phrase search (continuous sequences of tokens). Search is brute-force, i.e. not supported by the text index yet. [#101997](https://github.com/ClickHouse/ClickHouse/pull/101997) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Add `s3_read_request_duration_microseconds` and `s3_read_request_bytes` histogram metrics to observe S3 GET request connection lifetime and bytes consumed, visible in `system.histogram_metrics` and the Prometheus endpoint. [#102058](https://github.com/ClickHouse/ClickHouse/pull/102058) ([Sema Checherinda](https://github.com/CheSema)).
* `Date` and `Date32` values can now be added to `Time` and `Time64` values using the `+` operator, producing a `DateTime` or `DateTime64` result. For example, `SELECT toDate('2024-01-15') + toTime('14:30:25')` returns `2024-01-15 14:30:25`. The result is computed in the session timezone, and out-of-range results are handled according to the `date_time_overflow_behavior` setting. Closes [#95914](https://github.com/ClickHouse/ClickHouse/issues/95914). [#102421](https://github.com/ClickHouse/ClickHouse/pull/102421) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* The text index is now GA and stays enabled regardless of the `compatibility` setting, preventing unexpected disabling during backup restores or when running in compatibility mode. [#101518](https://github.com/ClickHouse/ClickHouse/pull/101518) ([Nikita Fomichev](https://github.com/fm4v)).

#### Experimental Feature

* Add `ALTER TABLE ... EXECUTE remove_orphan_files` for Iceberg tables to identify and remove unreferenced files from object storage. [#99127](https://github.com/ClickHouse/ClickHouse/pull/99127) ([murphy-4o](https://github.com/murphy-4o)).
* Add `query_plan_optimize_join_order_randomize` setting that randomizes statistics used for join reordering, useful for testing. [#100643](https://github.com/ClickHouse/ClickHouse/pull/100643) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Add AI function support to ClickHouse, allowing users to call OpenAI and Anthropic endpoints using SQL. `aiGenerate` is included as the first such function. [#100831](https://github.com/ClickHouse/ClickHouse/pull/100831) ([George Larionov](https://github.com/george-larionov)).
* Add AI functions: `aiClassify`, `aiExtract`, and `aiTranslate` for utilizing LLM APIs in ClickHouse. [#100832](https://github.com/ClickHouse/ClickHouse/pull/100832) ([George Larionov](https://github.com/george-larionov)).
* Added `system.histogram_metric_log`, a new system table that periodically snapshots all histogram metrics (e.g. S3/Azure latencies, keeper request processing stages durations). Also, the `value` column of `system.histogram_metrics` changes to `Float64` as it's more flexible and compatible with the Prometheus data model. [#103046](https://github.com/ClickHouse/ClickHouse/pull/103046) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)). The table structure is likely to be changed in future releases.

#### Performance Improvement

* ClickHouse is now able to prune entire data parts in SELECT queries based on min/max statistics. [#94140](https://github.com/ClickHouse/ClickHouse/pull/94140) ([zoomxi](https://github.com/zoomxi)).
* Reduce lock contention during readonly operations on ReplicatedMergeTree tables with finished mutations. [#95771](https://github.com/ClickHouse/ClickHouse/pull/95771) ([Eduard Karacharov](https://github.com/korowa)).
* Respect `optimize_read_in_order` when reading projections. Closes [#89453](https://github.com/ClickHouse/ClickHouse/issues/89453). [#95885](https://github.com/ClickHouse/ClickHouse/pull/95885) ([Andrey Zvonov](https://github.com/zvonand)).
* Small set of improvements in Hash Join and Concurrent Hash Join. [#96663](https://github.com/ClickHouse/ClickHouse/pull/96663) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Optimize `DISTINCT` transform by disabling `LowCardinality` columns optimization when input data is almost distinct. [#97113](https://github.com/ClickHouse/ClickHouse/pull/97113) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Performance optimization for `LIKE` queries from [#97723](https://github.com/ClickHouse/ClickHouse/issues/97723). Now these queries can use text indices. [#98149](https://github.com/ClickHouse/ClickHouse/pull/98149) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Vectorized math functions (`exp`, `log`, `sigmoid`, `tanh`) are now accelerated on AArch64 (using NEON/SVE) and on FreeBSD/Darwin, where they previously used a slower scalar fallback. [#98230](https://github.com/ClickHouse/ClickHouse/pull/98230) ([Raúl Marín](https://github.com/Algunenano)).
* Queries filtering on `MergeTree` primary key columns with regexp alternations over literal strings, such as `^(abc-1|abc-2)`, can now use primary key pruning when the alternatives share a common prefix. [#98988](https://github.com/ClickHouse/ClickHouse/pull/98988) ([Yash ](https://github.com/Onyx2406)).
* Generalize `ORDER BY ... LIMIT` top-k dynamic filtering to support `Nullable`, `String`, and `COLLATE` types. [#99033](https://github.com/ClickHouse/ClickHouse/pull/99033) ([murphy-4o](https://github.com/murphy-4o)).
* Speedup hash join on `Int32` and `Int64` keys with small range by using a direct-index hash table. [#99275](https://github.com/ClickHouse/ClickHouse/pull/99275) ([Hechem Selmi](https://github.com/m-selmi)).
* Faster discontinuous queries for `LowCardinality` columns with a single dictionary. [#99285](https://github.com/ClickHouse/ClickHouse/pull/99285) ([Ivan Babrou](https://github.com/bobrik)).
* Speed up `var*Stable` and `stddev*Stable` functions for `Float64` columns by devirtualizing the inner loop. Note: this enables compiler optimizations (FMA/registers) that alter floating-point results at the ULP level. [#99460](https://github.com/ClickHouse/ClickHouse/pull/99460) ([Riyane El Qoqui](https://github.com/riyaneel)).
* Use optimised Firedancer base58 encode for inputs of 32/64 bytes (automatic for `base58Encode`). Allow using optimised base58 decode if decoded result is 32/64 bytes (explicit with `base58Decode('...', 32)` or alike). [#99461](https://github.com/ClickHouse/ClickHouse/pull/99461) ([Joanna Hulboj](https://github.com/jh0x)).
* Enable linker section-based optimizations (`-ffunction-sections`, `-fdata-sections`, `--icf=all`) to reduce binary size and improve instruction cache utilization. [#99474](https://github.com/ClickHouse/ClickHouse/pull/99474) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix negative scaling for short queries with aggregation on machines with many cores. When a query reads few marks, the pipeline no longer expands to `max_threads` after aggregation, avoiding overhead from mostly-empty streams. [#99493](https://github.com/ClickHouse/ClickHouse/pull/99493) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improve the performance of queries with parallel replicas by correctly selecting the reading task size. [#99801](https://github.com/ClickHouse/ClickHouse/pull/99801) ([Nikita Taranov](https://github.com/nickitat)).
* Allow prefetching when reading a remote file through the userspace page cache. [#99919](https://github.com/ClickHouse/ClickHouse/pull/99919) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Avoid unnecessary computation of String `.size` subcolumn during subcolumns enumeration. [#99941](https://github.com/ClickHouse/ClickHouse/pull/99941) ([Pavel Kruglov](https://github.com/Avogar)).
* Make clickhouse-client's progress bar less jittery when working from a hotel with clusters with a very large number of replicas. [#100145](https://github.com/ClickHouse/ClickHouse/pull/100145) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Start `MemoryWorker` in `clickhouse-local` when page cache is enabled, so that the userspace page cache can be actually used. [#100306](https://github.com/ClickHouse/ClickHouse/pull/100306) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Optimize queries by pushing the `LIMIT` clause down into the `UNION ALL`. [#100364](https://github.com/ClickHouse/ClickHouse/pull/100364) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add JIT compilation support for `String` and `FixedString` column comparisons in `ORDER BY`, improving merge-phase sort performance by 6–17% for string-heavy sort keys. Co-authored with @lgbo-ustc. [#100577](https://github.com/ClickHouse/ClickHouse/pull/100577) ([Raúl Marín](https://github.com/Algunenano)).
* When `read_in_order_use_virtual_row` is enabled together with the new `read_in_order_use_virtual_row_per_block` setting, virtual row boundary information is now emitted after each block read from `MergeTree`, allowing the merge to reprioritize sources mid-stream for parts whose data is fully filtered out by `WHERE`/`PREWHERE`/`JOIN`. Close [#99945](https://github.com/ClickHouse/ClickHouse/issues/99945). [#100603](https://github.com/ClickHouse/ClickHouse/pull/100603) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Faster Float-to-String conversion for large integer values by extending the `itoa` fast path with dragonbox-compatible rounding. [#100649](https://github.com/ClickHouse/ClickHouse/pull/100649) ([Raúl Marín](https://github.com/Algunenano)).
* Replace `dragonbox` with `zmij` for 1.5x-3x faster Float-to-String conversion. [#100650](https://github.com/ClickHouse/ClickHouse/pull/100650) ([Raúl Marín](https://github.com/Algunenano)).
* Faster `Int128`/`UInt128` to string conversion by replacing software division with Barrett reduction and unrolling the conversion loop. [#100671](https://github.com/ClickHouse/ClickHouse/pull/100671) ([Raúl Marín](https://github.com/Algunenano)).
* Avoid spawning redundant threads in `uniqExact` parallel merge. [#100686](https://github.com/ClickHouse/ClickHouse/pull/100686) ([Jiebin Sun](https://github.com/jiebinn)).
* Add batch parallel merge for `uniqExact`. [#100687](https://github.com/ClickHouse/ClickHouse/pull/100687) ([Jiebin Sun](https://github.com/jiebinn)).
* Better parallelization of queries with simple views (with underlying `MergeTree` table) executed with parallel replicas. [#100815](https://github.com/ClickHouse/ClickHouse/pull/100815) ([Igor Nikonov](https://github.com/devcrafter)).
* Implements support of parallel replicas over simple views (including eligible `UNION ALL` views over `MergeTree` tables) when `parallel_replicas_allow_view_over_mergetree=1`. This allows to parallelize view's outer query instead of inner one which increases query parallelization across nodes. [#100958](https://github.com/ClickHouse/ClickHouse/pull/100958) ([Igor Nikonov](https://github.com/devcrafter)).
* Optimise reading in order of the primary key for `full_sorting_merge` when filters with `IN` are present in the query plan. [#101261](https://github.com/ClickHouse/ClickHouse/pull/101261) ([Nikita Taranov](https://github.com/nickitat)).
* Optimization allocations/deallocations by caching sampling settings instead of traverse all memory tracker hierarchy. [#101267](https://github.com/ClickHouse/ClickHouse/pull/101267) ([Azat Khuzhin](https://github.com/azat)).
* Fix significant INSERT performance regression when `deduplicate_insert = 'enable'` (default since 26.2) by deferring data hash computation from squashing to the sink and using batch column hashing via `updateHashWithValueRange`, reducing overhead from \~2.5s to \~0.5s for 5M rows with 22 columns. [#101494](https://github.com/ClickHouse/ClickHouse/pull/101494) ([Sema Checherinda](https://github.com/CheSema)).
* Reduce profiled lock overhead by using `try_lock` to avoid timing uncontended acquisitions and removing hold-time measurement. [#101502](https://github.com/ClickHouse/ClickHouse/pull/101502) ([Antonio Andelic](https://github.com/antonio2368)).
* Replace hand-written AVX-512 intrinsics in `arrayDotProduct` with platform-independent auto-vectorizable loops, adding AVX2 and ARM NEON support. [#101571](https://github.com/ClickHouse/ClickHouse/pull/101571) ([Peng](https://github.com/fastio)).
* Improve performance in `INSERT VALUES` for `Map`, `Array`, and `Tuple` columns when values are passed as escaped strings (e.g. `'{\'key\':1}'`), avoiding unnecessary fallback to the SQL expression parser. [#102119](https://github.com/ClickHouse/ClickHouse/pull/102119) ([Joanna Hulboj](https://github.com/jh0x)).
* Fixed excessive `RabbitMQ` table engine CPU usage. [#102711](https://github.com/ClickHouse/ClickHouse/pull/102711) ([Jaap Elst](https://github.com/jaapieaapie1)).
* The JOIN order optimizer now infers transitive equi-join predicates from existing join conditions. For example, given `A.x = B.x AND B.x = C.x`, the equivalence `A.x = C.x` is recognized, allowing the optimizer to consider direct joins between transitively-connected tables. This can improve plan quality for star and snowflake schemas where dimension tables connect through a shared fact table. The feature is controlled by the new `enable_join_transitive_predicates` setting (off by default). [#98479](https://github.com/ClickHouse/ClickHouse/pull/98479) ([Alexander Gololobov](https://github.com/davenger)).
* Optimize `TRUNCATE DATABASE TABLES LIKE` by pre-cancelling merges in parallel. [#98597](https://github.com/ClickHouse/ClickHouse/pull/98597) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Add monotonicity support for multiply, enabling primary key pruning for `key * constant` expressions. [#98983](https://github.com/ClickHouse/ClickHouse/pull/98983) ([Amos Bird](https://github.com/amosbird)).
* Cache dictionaries no longer take an exclusive lock in `hasKeys`; this reduces lock contention by using a shared lock for cache reads. [#100796](https://github.com/ClickHouse/ClickHouse/pull/100796) ([liuguangliang](https://github.com/sourcelliu)).
* Inline VIEW subquery in the query tree to allow more optimisations to be applied to the VIEW. [#100830](https://github.com/ClickHouse/ClickHouse/pull/100830) ([Dmitry Novik](https://github.com/novikd)).
* Optimize cache loading on server startup. [#101500](https://github.com/ClickHouse/ClickHouse/pull/101500) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Implement lazy column materialization for ReplacingMergeTree with FINAL in case the predicate is selective enough. [#101647](https://github.com/ClickHouse/ClickHouse/pull/101647) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Re-enable the `optimize_rewrite_array_exists_to_has` optimization (off by default since 23.10). It rewrites `arrayExists(x -> x = elem, arr)` into the much faster `has(arr, elem)` and now correctly skips the rewrite when the array element type and `elem` are not compatible for `has` (e.g. `Date` vs `String`), so previously breaking queries continue to work. Closes [#71431](https://github.com/ClickHouse/ClickHouse/issues/71431). [#100944](https://github.com/ClickHouse/ClickHouse/pull/100944) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### Improvement

* Improved EXPLAIN PLAN pretty=1 output: print top-level query output columns, show join relation labels/symbols with estimated result rows and locality, and include per-step output columns for join/source steps. The changes cover Information Deficit part from [#98117](https://github.com/ClickHouse/ClickHouse/issues/98117). [#99462](https://github.com/ClickHouse/ClickHouse/pull/99462) ([Kirill Kopnev](https://github.com/Fgrtue)).
* Add MergeTree table setting `share_nested_offsets` (default `true`). When set to `false`, Array columns with dotted names (e.g. `n.a`, `n.b`) are treated as independent columns instead of sharing offset files and validating equal array sizes as part of legacy `Nested` semantics. [#98416](https://github.com/ClickHouse/ClickHouse/pull/98416) ([Amos Bird](https://github.com/amosbird)).
* Users can now specify multiple authentication methods in users.xml/yaml configuration (in SQL it was always possible). [#91998](https://github.com/ClickHouse/ClickHouse/pull/91998) ([Flip-Liquid](https://github.com/Flip-Liquid)).
* Auto reload Raft inter-node connections which are using TLS. [#93455](https://github.com/ClickHouse/ClickHouse/pull/93455) ([Evgeny](https://github.com/evkuzin)).
* Extend `cast_keep_nullable` to work with Dynamic/JSON types. When set, casting NULL from types that can be Nullable will return NULL, otherwise NULL will throw `CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN` error. [#96504](https://github.com/ClickHouse/ClickHouse/pull/96504) ([Seva Potapov](https://github.com/seva-potapov)).
* Reduced the memory footprint from the internal data structures (`ISerialization` objects) by introducing an object pool. [#96563](https://github.com/ClickHouse/ClickHouse/pull/96563) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Add support of `password` and `identity` fields to keeper-client XML config. [#96800](https://github.com/ClickHouse/ClickHouse/pull/96800) ([Grigorii Sokolik](https://github.com/GSokol)).
* Improve `Iceberg` writes for the unity catalog. [#98162](https://github.com/ClickHouse/ClickHouse/pull/98162) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Add setting `finalize_projection_parts_synchronously` to allow synchronous finalization of projection parts during INSERT, reducing peak memory usage for tables with many projections while preserving existing async behavior by default. [#98228](https://github.com/ClickHouse/ClickHouse/pull/98228) ([Amos Bird](https://github.com/amosbird)).
* Add `projections_duration_ms` column to `system.part_log` that records per-projection merge/rebuild duration in milliseconds. [#98292](https://github.com/ClickHouse/ClickHouse/pull/98292) ([Amos Bird](https://github.com/amosbird)).
* Improve canceling queries using ExpressionTransform and NumbersRangedSource by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client. [#98908](https://github.com/ClickHouse/ClickHouse/pull/98908) ([Roman Vasin](https://github.com/rvasin)).
* Replace the hardcoded `source_table_engines` list with a runtime lookup via `StorageFactory::getAllStorages()`. This adds access checks for some missing table engines and closes [#71544](https://github.com/ClickHouse/ClickHouse/issues/71544). [#98984](https://github.com/ClickHouse/ClickHouse/pull/98984) ([pufit](https://github.com/pufit)).
* Add a setting to control type mismatch behavior for Variant and Dynamic (throw or return null). [#99085](https://github.com/ClickHouse/ClickHouse/pull/99085) ([Bharat Nallan](https://github.com/bharatnc)).
* Improve `Iceberg` and Spark compatibility: fix inconsistent path handling caused by mixed usage of storage paths and metadata paths; enforce that `Iceberg` tables write down a table location that is either a URL or an absolute path; add a fallback for counting file sizes in `Azure` because some ClickHouse readers don't support byte counting after traversal; handle `version-hint.txt` in a manner compatible with Spark; introduce type-level abstractions that make it harder to mix up path types in the future; add tests for `Azure` and `Local` that verify cross-engine interoperability without intermediate uploading/downloading; fix usage of position deletes, which previously relied on path inference heuristics where that approach is inappropriate. [#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)).
* Fix possible race condition in `IPartitionStrategy::cached_result` introduced in [https://github.com/ClickHouse/ClickHouse/pull/92844](https://github.com/ClickHouse/ClickHouse/pull/92844). [#99400](https://github.com/ClickHouse/ClickHouse/pull/99400) ([Arthur Passos](https://github.com/arthurpassos)).
* Users can now write ClickHouse Interval datatypes in the Arrow Format. [#99519](https://github.com/ClickHouse/ClickHouse/pull/99519) ([Peter Nguyen](https://github.com/petern48)).
* Adds native support for importing and exporting `UUID` data types in `Arrow` and `Parquet` formats. Users can now directly query and transfer UUID data between ClickHouse and other data tools without requiring manual string conversions or workarounds. Automated logical inference for top-level UUIDs, and support for explicit schema hint for nested UUIDs. [#99521](https://github.com/ClickHouse/ClickHouse/pull/99521) ([Ivan](https://github.com/ivanmantova)).
* Support `7z` archives on object storage. Closes [#70968](https://github.com/ClickHouse/ClickHouse/issues/70968). [#99600](https://github.com/ClickHouse/ClickHouse/pull/99600) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `ObjectStorageListedObjects`, `ObjectStorageGlobFilteredObjects`, `ObjectStoragePredicateFilteredObjects`, and `ObjectStorageReadObjects` ProfileEvents for introspection of object storage (`S3`, `Azure`, etc.) file listing and reading pipeline. [#99778](https://github.com/ClickHouse/ClickHouse/pull/99778) ([Sema Checherinda](https://github.com/CheSema)).
* Fix `merge` table function failing with `UNKNOWN_IDENTIFIER` error when querying columns not present in all underlying distributed/remote tables. [#99833](https://github.com/ClickHouse/ClickHouse/pull/99833) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Now we include commit time in total mutation execution time metric for ReplicatedMergeTree. It was lost after [#96376](https://github.com/ClickHouse/ClickHouse/issues/96376). [#99936](https://github.com/ClickHouse/ClickHouse/pull/99936) ([alesapin](https://github.com/alesapin)).
* Add a write-ahead log for blob objects pending removal in `MetadataStorageFromDisk`, improving durability and consistency between metadata and remote object storage when objects are deleted. [#100019](https://github.com/ClickHouse/ClickHouse/pull/100019) ([Maksim Kita](https://github.com/kitaisreal)).
* Disable AI SQL generation (`??` command) in the embedded client (SSH and WebSocket protocols) to prevent access to the server's environment variables. [#100290](https://github.com/ClickHouse/ClickHouse/pull/100290) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Change the interface for Iceberg inserts with the catalog. Deprecate settings: `storage_catalog_type`, `storage_aws_access_key_id`, etc. [#100334](https://github.com/ClickHouse/ClickHouse/pull/100334) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Render tabs as 4 spaces when pasting into clickhouse-client. Closes [#100405](https://github.com/ClickHouse/ClickHouse/issues/100405). [#100416](https://github.com/ClickHouse/ClickHouse/pull/100416) ([Raúl Marín](https://github.com/Algunenano)).
* Avoid scanning the whole remote data lake catalog for “Maybe you meant …” table hints when `show_data_lake_catalogs_in_system_tables` is disabled. [#100452](https://github.com/ClickHouse/ClickHouse/pull/100452) ([Alsu Giliazova](https://github.com/alsugiliazova)).
* Apply `distributed_index_analysis_min_indexes_bytes_to_activate` after partition pruning. [#100477](https://github.com/ClickHouse/ClickHouse/pull/100477) ([Azat Khuzhin](https://github.com/azat)).
* Fix assertion failure in Parquet bloom filter push down when using empty IN/NOT IN clauses. [#100543](https://github.com/ClickHouse/ClickHouse/pull/100543) ([zoomxi](https://github.com/zoomxi)).
* MinMax column statistics now store the minimum and maximum values as Field (typed) instead of Float64. The serialized format includes the column type name alongside the values. The statistics file version is bumped to V2; files written by older versions require re-materialization (ALTER TABLE … MATERIALIZE STATISTICS ALL). fix [#53140](https://github.com/ClickHouse/clickhouse-private/issues/53140). [#100605](https://github.com/ClickHouse/ClickHouse/pull/100605) ([Han Fei](https://github.com/hanfei1991)).
* Update `cppkafka` to include fix for Consumer close deadlock. [#100612](https://github.com/ClickHouse/ClickHouse/pull/100612) ([Azat Khuzhin](https://github.com/azat)).
* Object information used for parsing data files in Iceberg now contains the number of file rows and file size in bytes parsed from manifest file. [#100645](https://github.com/ClickHouse/ClickHouse/pull/100645) ([Daniil Ivanik](https://github.com/divanik)).
* Add `use_separate_cache_arena` configuration parameter to be able to control separation of the cache memory arena. [#100664](https://github.com/ClickHouse/ClickHouse/pull/100664) ([Seva Potapov](https://github.com/seva-potapov)).
* Adds native support for importing Apache Arrow's `StringView` and `BinaryView` data types into ClickHouse `String` columns, improving compatibility for Arrow-based ingestion. [#100762](https://github.com/ClickHouse/ClickHouse/pull/100762) ([Ivan](https://github.com/ivanmantova)).
* A few Keeper server settings are now hot-reloaded if config file is changed at runtime: 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)).
* Increment profile events `MemoryAllocatedWithoutCheck/MemoryAllocatedWithoutCheckBytes` in release build. [#100899](https://github.com/ClickHouse/ClickHouse/pull/100899) ([Pavel Kruglov](https://github.com/Avogar)).
* Cgroupv2 memory tracking now excludes `slab_reclaimable` from kernel memory, giving a more accurate measure of non-reclaimable memory usage. [#100901](https://github.com/ClickHouse/ClickHouse/pull/100901) ([Antonio Andelic](https://github.com/antonio2368)).
* `use_partition_pruning = 0` now also disables `MinMax` index pruning and count optimization on partition key columns, in addition to disabling pruning based on partition keys. [#100904](https://github.com/ClickHouse/ClickHouse/pull/100904) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* `pretty=1` in `EXPLAIN [PLAN]` now prints expressions in a human readable format. [#100927](https://github.com/ClickHouse/ClickHouse/pull/100927) ([Kirill Kopnev](https://github.com/Fgrtue)).
* `accurateCastOrNull` and `accurateCastOrDefault` now support `Tuple` target types, including nested `Tuples` with `Nullable` elements. Previously these functions rejected `Tuple` targets because `Tuple` could not be inside `Nullable`. Closes [#100820](https://github.com/ClickHouse/ClickHouse/issues/100820). [#100942](https://github.com/ClickHouse/ClickHouse/pull/100942) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix chart duplication in Play UI when switching between light and dark themes. [#101058](https://github.com/ClickHouse/ClickHouse/pull/101058) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Update chdig to [v26.3.1](https://github.com/azat/chdig/releases/tag/v26.3.1) (perfetto UI, sparklines to summary for CPU/Memory/Merges/Queries), system.warnings, regexp search in logs). [#101092](https://github.com/ClickHouse/ClickHouse/pull/101092) ([Azat Khuzhin](https://github.com/azat)). Update chdig to [v26.4.3](https://github.com/azat/chdig/releases/tag/v26.4.3) (perfetto improvements, fixes for sharing via pastila.nl, flamegraph diffs, change settings in realtime). [#103145](https://github.com/ClickHouse/ClickHouse/pull/103145) ([Azat Khuzhin](https://github.com/azat)).
* You can now have a trailing comma in the `WITH` clause before a `SELECT` query. [#101093](https://github.com/ClickHouse/ClickHouse/pull/101093) ([Aruj Bansal](https://github.com/arujbansal)).
* Add `compress_per_column_in_compact_parts` MergeTree setting to control how compressed blocks are organized within Compact parts. When `true` (default, preserving current behavior), each column starts a new compressed block, allowing selective decompression. When `false`, all columns within a granule are packed into the same compressed block, improving compression ratio and read performance for workloads that always read all columns. [#101114](https://github.com/ClickHouse/ClickHouse/pull/101114) ([Amos Bird](https://github.com/amosbird)).
* Show table info balloon in Play UI only when hovering over the table name, not the entire row. [#101118](https://github.com/ClickHouse/ClickHouse/pull/101118) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add engine-specific icons and improve table list UX in the Play UI sidebar. [#101134](https://github.com/ClickHouse/ClickHouse/pull/101134) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support `Nullable(Tuple)` for `Arrow`, `ArrowStream`, `ORC`, legacy `Parquet` formats. [#101272](https://github.com/ClickHouse/ClickHouse/pull/101272) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Display TOTALS row as a table footer in the web UI (play.html). [#101286](https://github.com/ClickHouse/ClickHouse/pull/101286) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support multi-query mode in the web UI (`play.html`): run multiple queries at once with parallel execution of `SELECT`-like queries and per-query result display. [#101290](https://github.com/ClickHouse/ClickHouse/pull/101290) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix column resize in play.html web UI after the result table was refactored into a web component. [#101295](https://github.com/ClickHouse/ClickHouse/pull/101295) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add ability limit amount of jemalloc profile flushes on MEMORY\_LIMIT\_EXCEEDED per time interval. [#101396](https://github.com/ClickHouse/ClickHouse/pull/101396) ([Azat Khuzhin](https://github.com/azat)).
* Added keeper settings `nuraft_streaming_mode` (by default `false`), `nuraft_max_log_gap_in_stream`, `nuraft_max_bytes_in_flight_in_stream`. Closes [#90743](https://github.com/ClickHouse/ClickHouse/issues/90743). [#101427](https://github.com/ClickHouse/ClickHouse/pull/101427) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Added `CGroupMemoryUsedWithoutPageCache` async metric that reports cgroup memory usage excluding both the kernel OS page cache and the ClickHouse userspace page cache, mirroring `MemoryResidentWithoutPageCache`. Also clarified the `CGroupMemoryUsed` metric description. [#101513](https://github.com/ClickHouse/ClickHouse/pull/101513) ([Francesco Ciocchetti](https://github.com/primeroz)).
* Add parser-level syntactic sugar for the SQL standard `OVERLAY` function syntax. The `overlay` function already exists; this adds support for the keyword-based form using `PLACING`, `FROM`, and `FOR` as separators. [#101681](https://github.com/ClickHouse/ClickHouse/pull/101681) ([Desel72](https://github.com/Desel72)).
* Added column alias `INDEX_LENGTH` to system table `information_schema.tables`, analogous to existing uppercase aliases in this table. [#101705](https://github.com/ClickHouse/ClickHouse/pull/101705) ([Robert Schulze](https://github.com/rschu1ze)).
* System table `information_schema.tables` now ignores inactive table parts. This makes the shown table size values more realistic. [#101706](https://github.com/ClickHouse/ClickHouse/pull/101706) ([Robert Schulze](https://github.com/rschu1ze)).
* The `ngrams` function now rejects invalid ngram lengths. Example: `SELECT ngrams('abc', 0)` now returns an error. [#101922](https://github.com/ClickHouse/ClickHouse/pull/101922) ([Robert Schulze](https://github.com/rschu1ze)).
* A follow-up for [#91820](https://github.com/ClickHouse/ClickHouse/issues/91820) and [#90837](https://github.com/ClickHouse/ClickHouse/issues/90837): filter unsupported algorithms from the error message; run FIPS-specific tests in FIPS builds. [#102067](https://github.com/ClickHouse/ClickHouse/pull/102067) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* Limit cell height to three lines in the Web UI (`play.html`), with expandable cells on click. [#102154](https://github.com/ClickHouse/ClickHouse/pull/102154) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added new option that allows to force (virtual/path) style for S3 endpoints. Resolves [#82019](https://github.com/ClickHouse/ClickHouse/issues/82019); [#76007](https://github.com/ClickHouse/ClickHouse/issues/76007) Continue of [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)).
* The `restore_replace_external_engines_to_null` setting now also skips restoring databases with external engines (e.g. `DataLakeCatalog`, `MySQL`, `PostgreSQL`, `S3`) instead of failing or initiating external connections. [#102400](https://github.com/ClickHouse/ClickHouse/pull/102400) ([Nikita Fomichev](https://github.com/fm4v)).
* Add text index analysis support for the `hasPhrase` function via the `HINT` mode. [#102438](https://github.com/ClickHouse/ClickHouse/pull/102438) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Treat STATISTICS as read-only in ColumnDependency to fix LOGICAL\_ERROR during MATERIALIZE STATISTICS ALL. [#102627](https://github.com/ClickHouse/ClickHouse/pull/102627) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Create and populate `system.asynchronous_metric_log` in keeper-as-server mode. [#102664](https://github.com/ClickHouse/ClickHouse/pull/102664) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Add `default_system_log_flush_policy.skip_alias_columns` config option to allow omitting ALIAS columns from system log tables, fixing S3-backed system logs that reject ALIAS columns. [#102669](https://github.com/ClickHouse/ClickHouse/pull/102669) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Don't enable auto statistics for system tables. They rarely have chance to use them. [#102862](https://github.com/ClickHouse/ClickHouse/pull/102862) ([Han Fei](https://github.com/hanfei1991)).
* Support `array` tokenizer for the LIKE optimization. [#102880](https://github.com/ClickHouse/ClickHouse/pull/102880) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Send MemoryAllocatedWithoutCheck even in release builds. [#103064](https://github.com/ClickHouse/ClickHouse/pull/103064) ([Azat Khuzhin](https://github.com/azat)).
* Expose per-thread untracked\_memory in system.stack\_trace. [#103065](https://github.com/ClickHouse/ClickHouse/pull/103065) ([Azat Khuzhin](https://github.com/azat)).

#### Bug Fix (user-visible misbehavior in an official stable release)

* Fix `Block structure mismatch in stream` error caused by unnecessary columns returned from Lazy materialization. Fixes [#95191](https://github.com/ClickHouse/ClickHouse/issues/95191). [#96682](https://github.com/ClickHouse/ClickHouse/pull/96682) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Fix a logical error with data masking policy query with `ON CLUSTER`. [#97594](https://github.com/ClickHouse/ClickHouse/pull/97594) ([Bharat Nallan](https://github.com/bharatnc)).
* Fix a bug when using Unity catalog on top of GCS. [#98456](https://github.com/ClickHouse/ClickHouse/pull/98456) ([Melvyn Peignon](https://github.com/melvynator)).
* `DataLakeCatalog` now respects the server's `http_forbid_headers` configuration when validating the `auth_header` setting. [#98827](https://github.com/ClickHouse/ClickHouse/pull/98827) ([Michael Anastasakis](https://github.com/michael-anastasakis)).
* Fix N+1 `HeadObject` calls for S3 brace-expansion globs. [#99219](https://github.com/ClickHouse/ClickHouse/pull/99219) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Validate setting changes in create queries when the engine itself also supports settings. [#99279](https://github.com/ClickHouse/ClickHouse/pull/99279) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fixed `ALTER TABLE UPDATE/DELETE` failing with `Missing columns` error when a table has a MATERIALIZED column whose expression depends on an EPHEMERAL column. [#99281](https://github.com/ClickHouse/ClickHouse/pull/99281) ([Yash ](https://github.com/Onyx2406)).
* Credentials in JDBC, ODBC, and NATS connection strings are now masked in query logs and `SHOW CREATE` output, preventing accidental exposure of sensitive information. For URI-style connection strings (e.g. `{scheme}://{user}:{password}@{host}`), only the password portion is masked while the rest remains visible for easier debugging. The `nats_token` setting is now also masked. [#99344](https://github.com/ClickHouse/ClickHouse/pull/99344) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix parseDateTimeBestEffort incorrectly parsing words starting with month prefixes in DD-month-YYYY format. Closes [#99345](https://github.com/ClickHouse/ClickHouse/issues/99345#event-23517658314). [#99350](https://github.com/ClickHouse/ClickHouse/pull/99350) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix ignoring of TABLE\_UUID\_MISMATCH for non analyzer. [#99380](https://github.com/ClickHouse/ClickHouse/pull/99380) ([Azat Khuzhin](https://github.com/azat)).
* Fix a bug where explicit settings sent alongside `compatibility` in the same request could be silently ignored when their value matched the server default. [#99402](https://github.com/ClickHouse/ClickHouse/pull/99402) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fixes cases where numbers with leading zeros in hive partitioning path were causing errors. Fixes [#98801](https://github.com/ClickHouse/ClickHouse/issues/98801). [#99458](https://github.com/ClickHouse/ClickHouse/pull/99458) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix heap-use-after-free when a table is dropped concurrently with a running read query (19 occurrences in CI over the last 90 days). [#99483](https://github.com/ClickHouse/ClickHouse/pull/99483) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed a bug in Keeper where a read request could get stuck (causing session to time out) if a different unrelated session on the same server was closed at just the wrong moment. [#99484](https://github.com/ClickHouse/ClickHouse/pull/99484) ([Michael Kolupaev](https://github.com/al13n321)).
* Validate column structure before applying patches. [#99531](https://github.com/ClickHouse/ClickHouse/pull/99531) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix vertical merge `rows_sources` assertion failure when `SYSTEM STOP/START MERGES` toggles rapidly during merge of table with `Dynamic` columns. [#99532](https://github.com/ClickHouse/ClickHouse/pull/99532) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect partition pruning for `toWeek()` that caused queries with `WHERE toWeek(date, mode) = N` to return empty results for weeks 49-52 on tables partitioned by `toYYYYMM(date)`. [#99542](https://github.com/ClickHouse/ClickHouse/pull/99542) ([Takumi Hara](https://github.com/takumihara)).
* Fix exception in functions operating on ColumnReplicated with unreferenced rows produced by JOIN. [#99564](https://github.com/ClickHouse/ClickHouse/pull/99564) ([Hechem Selmi](https://github.com/m-selmi)).
* Fix `CLEAR COLUMN` not rebuilding projections and not reevaluation materialized columns that depend on the cleared column, which could cause exceptions or data corruption during subsequent merges. [#99565](https://github.com/ClickHouse/ClickHouse/pull/99565) ([Desel72](https://github.com/Desel72)).
* Fixed an exception (`Bad get: has Tuple, actual type String`) in `ConditionSelectivityEstimator` when a query uses IN with a single scalar query parameter (e.g. `WHERE col IN ({p:String})`) on a table that has column statistics and `use_statistics` is enabled. [#99614](https://github.com/ClickHouse/ClickHouse/pull/99614) ([Ilya Yatsishin](https://github.com/qoega)).
* Part with unknown projections should not be marked as lost forever. [#99623](https://github.com/ClickHouse/ClickHouse/pull/99623) ([Sema Checherinda](https://github.com/CheSema)).
* Fix a rare logical error exception during vertical merge when `SYSTEM STOP MERGES` and `SYSTEM START MERGES` are executed concurrently. [#99628](https://github.com/ClickHouse/ClickHouse/pull/99628) ([Desel72](https://github.com/Desel72)).
* Fix dangling reference in injectRequiredColumns causing crash during merge. [#99679](https://github.com/ClickHouse/ClickHouse/pull/99679) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fix undefined behavior in Avro format reader when reading numeric values that overflow the target column type. Now queries fail on overflows instead of silently producing incorrect values. [#99697](https://github.com/ClickHouse/ClickHouse/pull/99697) ([asyablue22](https://github.com/asyablue22)).
* Fix parsing of shell-style quotes in arguments for the `executable` table function. [#99794](https://github.com/ClickHouse/ClickHouse/pull/99794) ([Nikita Semenov](https://github.com/leftmain)).
* Fix false-positive abort in `NativeReader` when deserializing a Native format stream with a row-count mismatch: changed from `LOGICAL_ERROR` to `INCORRECT_DATA` so the error is handled as a data error rather than triggering `abort()` in sanitizer/debug builds. [#99822](https://github.com/ClickHouse/ClickHouse/pull/99822) ([Rahul Nair](https://github.com/motsc)).
* Fix process abort in `Tuple` column deserialization when the serialization kind in the binary stream is `DETACHED`. [#99823](https://github.com/ClickHouse/ClickHouse/pull/99823) ([Rahul Nair](https://github.com/motsc)).
* Fix false `LOGICAL_ERROR` exception during filesystem cache dynamic resize due to a race condition in SLRU sub-queue promotion. [#99850](https://github.com/ClickHouse/ClickHouse/pull/99850) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix async insert queries reporting zero `written_rows`, `read_rows`, and `result_rows` in `query_log` and client output. [#99879](https://github.com/ClickHouse/ClickHouse/pull/99879) ([Sema Checherinda](https://github.com/CheSema)).
* Fix exception "Bad cast from type X to Y" in `KILL QUERY` when the internal query against system tables returns columns wrapped in `ColumnConst`. [#99881](https://github.com/ClickHouse/ClickHouse/pull/99881) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error with correlated subquery within untuple argument. [#99917](https://github.com/ClickHouse/ClickHouse/pull/99917) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fixes an exception when calling `right`, `rightUTF8`, or other substring functions with a length of INT64\_MIN (-9223372036854775808), which previously caused undefined behavior due to integer overflow. The functions now correctly report an ARGUMENT\_OUT\_OF\_BOUND error. [#99934](https://github.com/ClickHouse/ClickHouse/pull/99934) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Now ClickHouse should properly handle spark-style tables (where we have full absolute path for each file or relative path to common table path). Fixes [#92348](https://github.com/ClickHouse/ClickHouse/issues/92348). [#99935](https://github.com/ClickHouse/ClickHouse/pull/99935) ([alesapin](https://github.com/alesapin)).
* Fix "Inconsistent AST formatting" exception for `ALTER TABLE ... MODIFY QUERY` with nested subqueries containing `SETTINGS` when the `ALTER` itself also has `SETTINGS`. [#99938](https://github.com/ClickHouse/ClickHouse/pull/99938) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Revert [#97114](https://github.com/ClickHouse/ClickHouse/issues/97114) "Move join step row estimation before check for 1 child" due to suspected performance regression. [#99957](https://github.com/ClickHouse/ClickHouse/pull/99957) ([Alexander Gololobov](https://github.com/davenger)).
* Fixes a bug where ClickHouse could skip files if the `Content-Length` header was missing in their HEAD request response (for example, because of decompressive transcoding in GCS). [#99971](https://github.com/ClickHouse/ClickHouse/pull/99971) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix assertion failure (exception in debug builds, incorrect results in release builds) when multiplying `NumericIndexedVector` aggregate states by an even integer constant, caused by self-XOR on aliased Roaring bitmaps in `pointwiseAddInplace`. [#99976](https://github.com/ClickHouse/ClickHouse/pull/99976) ([Desel72](https://github.com/Desel72)).
* Prevent `Unexpected return type` exception in legacy filter pushdown through chained `JOIN USING` when key types change after join conversions. [#99999](https://github.com/ClickHouse/ClickHouse/pull/99999) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception "Unexpected node type for table expression ... Actual IDENTIFIER" when a scalar subquery is used inside an unresolved table function argument, e.g. `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)).
* Fixed `INSERT` with `VALUES` failing when the data was followed by a trailing SQL comment (`--` or `/* */`) on the next line. The comment is now skipped instead of being parsed as another row. [#100016](https://github.com/ClickHouse/ClickHouse/pull/100016) ([Pratima Patel](https://github.com/pratimapatel2008)).
* Fix exception in `arrayRemove` when comparing tuples with NULL components. [#100017](https://github.com/ClickHouse/ClickHouse/pull/100017) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix cross-user data leak in `system.asynchronous_inserts`: any user with `SELECT` on the table could see pending async insert entries belonging to other users. Entries are now filtered by the current user, unless the user has the `SHOW_USERS` privilege. [#100024](https://github.com/ClickHouse/ClickHouse/pull/100024) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fixes case where Time64 to UInt64 cast could clamp values to 24 hours. [#100025](https://github.com/ClickHouse/ClickHouse/pull/100025) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix local server crash when CREATE DICTIONARY has a definition with list value containing non-existing function. [#100036](https://github.com/ClickHouse/ClickHouse/pull/100036) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Fix `CSV`, `MsgPack` format not being able to parse `Nullable(Tuple)` properly. Closes [#99753](https://github.com/ClickHouse/ClickHouse/issues/99753). [#100038](https://github.com/ClickHouse/ClickHouse/pull/100038) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix `CREATE VIEW` failing with `UNKNOWN_IDENTIFIER` when using a WITH function-expression alias (e.g. `tuple(...)`) as the right-hand side of `IN`. [#100042](https://github.com/ClickHouse/ClickHouse/pull/100042) ([Peng](https://github.com/fastio)).
* Fix timeseries aggregate functions (e.g. `timeSeriesResampleToGridWithStaleness`) failing with `ILLEGAL_TYPE_OF_ARGUMENT` when used with `initializeAggregation` or `AggregatingMergeTree` under parallel replicas. [#100053](https://github.com/ClickHouse/ClickHouse/pull/100053) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Make correctly processing negative values inside NumericIndexedVectorDataBSI. [#100086](https://github.com/ClickHouse/ClickHouse/pull/100086) ([Daniil Ivanik](https://github.com/divanik)).
* Fix `accurateCastOrDefault` and `to*OrDefault` functions not preserving Const column type for constant inputs. [#100132](https://github.com/ClickHouse/ClickHouse/pull/100132) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Omitted query parameters with `LowCardinality(Nullable(T))` type now correctly default to NULL, same as `Nullable(T)`. [#100144](https://github.com/ClickHouse/ClickHouse/pull/100144) ([Denys Melnyk](https://github.com/germiBest)).
* Fix use-of-uninitialized-value in StringSearcher.h. [#100225](https://github.com/ClickHouse/ClickHouse/pull/100225) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Allow cancellation of scalar subqueries and other analysis-time pipelines via Ctrl+C. Previously, pressing Ctrl+C during a long-running scalar subquery had no effect until the subquery completed. Also fix the progress bar and JSON statistics to correctly report rows read during scalar subquery execution, both in `clickhouse-client` and `clickhouse-local`. Co-authored with @YjyJeff. [#100230](https://github.com/ClickHouse/ClickHouse/pull/100230) ([Raúl Marín](https://github.com/Algunenano)).
* Fixed a `LOGICAL_ERROR` exception in queries involving `Dynamic` columns with cross joins and runtime filters, caused by `ColumnVariant::filter` sharing variant column pointers instead of cloning them in the `hasOnlyNulls` optimization path. Closes [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)).
* Fixed array of variant bug which may reinterpret data type upon calling `arrayFirst`/`arrayLast` function. For example, previously `Array(Variant(Date, Bool))` is converted to `Bool` when the actual underlying variant type is `Date`. [#100255](https://github.com/ClickHouse/ClickHouse/pull/100255) ([timothygk](https://github.com/timothygk)).
* A few minor changes to functions: h3 functions now validate boundaries better; readWKB checks the size limits (a new setting, `max_wkb_geometry_elements`); random generator functions limit the maximum iterations in their computations. A follow-up for [#93543](https://github.com/ClickHouse/ClickHouse/issues/93543). [#100270](https://github.com/ClickHouse/ClickHouse/pull/100270) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed an issue where cutURLParameter could incorrectly skip parameters when they appeared as substrings of other parameters. [#100280](https://github.com/ClickHouse/ClickHouse/pull/100280) ([Nikita Semenov](https://github.com/leftmain)).
* Fix exception when Iceberg metadata file path setting contains a null byte. [#100283](https://github.com/ClickHouse/ClickHouse/pull/100283) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed the quadratic number of run queries when `distributed_index_analysis` is used with predicates containing `IN` subqueries. [#100287](https://github.com/ClickHouse/ClickHouse/pull/100287) ([Anton Popov](https://github.com/CurtizJ)).
* Fix "Block structure mismatch" exception when using `GROUP BY ... WITH TOTALS HAVING` combined with `UNION DISTINCT` and nullable expressions. [#100293](https://github.com/ClickHouse/ClickHouse/pull/100293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR exception in `estimateCompressionRatio` when `block_size_bytes` parameter is extremely large. [#100298](https://github.com/ClickHouse/ClickHouse/pull/100298) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Inconsistent AST formatting" exception in debug builds when using `GROUP BY CUBE(...) WITH ROLLUP` or similar combinations. [#100376](https://github.com/ClickHouse/ClickHouse/pull/100376) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when creating a view with column aliases and `SELECT *` or `EXCEPT`/`INTERSECT` queries. [#100386](https://github.com/ClickHouse/ClickHouse/pull/100386) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `DROP TABLE` hanging indefinitely on Kafka engine tables when consumers are stuck in a rebalance after a heartbeat error. [#100388](https://github.com/ClickHouse/ClickHouse/pull/100388) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `ReadBuffer is canceled. Can't read from it.` exception in backup/restore operations using zip archives. [#100400](https://github.com/ClickHouse/ClickHouse/pull/100400) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `TOO_MANY_ROWS` exception for `SELECT count()` queries with `max_rows_to_read` / `force_primary_key` when data is split across multiple parts with non-aligned granule boundaries. [#100408](https://github.com/ClickHouse/ClickHouse/pull/100408) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `system.completions` to correctly filter databases, tables, and columns by access rights in all grant combinations: per-table, per-db, and per-column revoke. [#100432](https://github.com/ClickHouse/ClickHouse/pull/100432) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fix SEGFAULT in NuRaft due to race condition. [#100444](https://github.com/ClickHouse/ClickHouse/pull/100444) ([Pablo Marcos](https://github.com/pamarcos)).
* `min`/`max`/`argMin`/`argMax` now treat NaN consistently with `ORDER BY`: NaN is always skipped (returned only when all values are NaN). Previously, results depended on NaN position in the data due to IEEE 754 unordered comparison semantics. [#100448](https://github.com/ClickHouse/ClickHouse/pull/100448) ([Raúl Marín](https://github.com/Algunenano)).
* Fixed a copy-paste bug where `delta_lake_snapshot_end_version` set without `delta_lake_snapshot_start_version` was silently ignored instead of producing a `BAD_ARGUMENTS` error. [#100454](https://github.com/ClickHouse/ClickHouse/pull/100454) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* `StorageRabbitMQ::shutdown` is not idempotent (it unconditionally accesses weak pointers and then destroys the corresponding shared pointers), but is now called twice: once in `StreamingStorageRegistry` and then in `DatabaseCatalog`. This fix makes the method idempotent and adds defensive null checks. [#100455](https://github.com/ClickHouse/ClickHouse/pull/100455) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix `LOGICAL_ERROR` exception when using `accurateCastOrNull` with `QBit` target type. [#100470](https://github.com/ClickHouse/ClickHouse/pull/100470) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix LOGICAL\_ERROR exception "Stream ... not found" when inserting into a table with nested `Array(JSON)` columns in wide parts with `optimize_on_insert=0`. [#100475](https://github.com/ClickHouse/ClickHouse/pull/100475) ([Pavel Kruglov](https://github.com/Avogar)).
* Validate file entry paths in backup metadata to reject path traversal, absolute paths, and empty names during `RESTORE`. [#100483](https://github.com/ClickHouse/ClickHouse/pull/100483) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix `LIMIT m OFFSET n WITH TIES` syntax not working. This syntax is equivalent to `LIMIT n, m WITH TIES` which already worked. [#100491](https://github.com/ClickHouse/ClickHouse/pull/100491) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix exception "No set is registered for key" when using `IN` with `Nullable(Tuple)` columns that have named fields and `LowCardinality` elements. [#100523](https://github.com/ClickHouse/ClickHouse/pull/100523) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix heap-buffer-overflow in usearch `sorted_buffer_gt::insert()` that could crash or silently corrupt memory during vector similarity search. [#100537](https://github.com/ClickHouse/ClickHouse/pull/100537) ([Dustin Healy](https://github.com/dustinhealy)).
* Fix `EXECUTE AS` ignoring `FORMAT` and `INTO OUTFILE` clauses specified in the query. [#100538](https://github.com/ClickHouse/ClickHouse/pull/100538) ([pufit](https://github.com/pufit)).
* Fix inconsistent AST formatting for SAMPLE with query-level OFFSET. Closes [#100576](https://github.com/ClickHouse/ClickHouse/issues/100576). [#100579](https://github.com/ClickHouse/ClickHouse/pull/100579) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix polaris catalog with azure. Since 25.12 this catalog with azure started to add bucket at the beginning of the path. For example `abfss://polaris-polaris@<some_url>.windows.net/polaris-polaris/<other-path>` instead of `abfss://polaris-polaris@<some_url>.windows.net/<other-path>`. This PR cuts bucket in the path. [#100583](https://github.com/ClickHouse/ClickHouse/pull/100583) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix type mismatch exception in transform when default column is const on some blocks. Closes [#100574](https://github.com/ClickHouse/ClickHouse/issues/100574). [#100616](https://github.com/ClickHouse/ClickHouse/pull/100616) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixes NOT\_FOUND\_COLUMN\_IN\_BLOCK cases where the projection SELECT part has columns that do not exist in the original SELECT part of the query. Closes [#100194](https://github.com/ClickHouse/ClickHouse/issues/100194). [#100623](https://github.com/ClickHouse/ClickHouse/pull/100623) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Validate Npy format shape dimensions against file size and overflow limits to prevent denial of service from crafted `.npy` files with unreasonably large dimensions. Also reject empty shapes and cap per-row memory to 2 GiB. [#100625](https://github.com/ClickHouse/ClickHouse/pull/100625) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `session_timezone` being ignored when parsing `DateTime` values during async inserts (TCP) and all inserts over HTTP. [#100647](https://github.com/ClickHouse/ClickHouse/pull/100647) ([Sema Checherinda](https://github.com/CheSema)).
* Allow passing sharding key to `cluster()` and `clusterAllReplicas()` table functions when using a table function as the source (e.g. `cluster('name', view(...), sharding_key)`). [#100665](https://github.com/ClickHouse/ClickHouse/pull/100665) ([Sergey Veletskiy](https://github.com/velom)).
* Fix server crash (assertion failure) when using parametric aggregate functions with Array combinator and NULL arguments, such as `quantileIfArrayArray(0.5)([[NULL]], [[1]])`. [#100679](https://github.com/ClickHouse/ClickHouse/pull/100679) ([nerve-bot](https://github.com/nerve-bot)).
* Fix exception when computing common supertype for empty and non-empty tuples with `use_variant_as_common_type` enabled. [#100699](https://github.com/ClickHouse/ClickHouse/pull/100699) ([Antonio Andelic](https://github.com/antonio2368)).
* Server no longer fails to start when an Azure blob storage disk is configured but the endpoint is temporarily unreachable (e.g. DNS failure). [#100701](https://github.com/ClickHouse/ClickHouse/pull/100701) ([Raúl Marín](https://github.com/Algunenano)).
* Fix undefined behavior in `positiveModulo` when the unsigned divisor does not fit in the signed result type. [#100705](https://github.com/ClickHouse/ClickHouse/pull/100705) ([Raúl Marín](https://github.com/Algunenano)).
* Fix server crash (logical error "Unexpected return type from \_\_topKFilter") when `use_top_k_dynamic_filtering` is enabled and the `ORDER BY` column has `Dynamic` or `Variant` type. [#100742](https://github.com/ClickHouse/ClickHouse/pull/100742) ([Groene AI](https://github.com/groeneai)).
* Fix server crash when using `has()` function with PREWHERE/WHERE on a Tuple key containing LowCardinality elements. [#100760](https://github.com/ClickHouse/ClickHouse/pull/100760) ([Groene AI](https://github.com/groeneai)).
* Fix `file_offset_of_buffer_end <= getFileSize()` assertion failure (exception in debug builds) when reading from `Log` or `StripeLog` tables on S3 object storage with concurrent writes. [#100763](https://github.com/ClickHouse/ClickHouse/pull/100763) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix an exception in the statistics selectivity estimator when a WHERE clause contains a function expression (e.g. toDecimal64(col, 3)) on a table with statistics enabled. The estimator now skips such predicates instead of attempting an invalid type cast. [#100764](https://github.com/ClickHouse/ClickHouse/pull/100764) ([Han Fei](https://github.com/hanfei1991)).
* Fixes a rare case where join with reordering can produce a wrong result. [#100790](https://github.com/ClickHouse/ClickHouse/pull/100790) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix incorrect `AggregateFunction` argument types in optimized trivial count, which caused `NUMBER_OF_ARGUMENTS_DOESNT_MATCH` exception when querying expressions like `count(v0 + v1)` on distributed tables. [#100794](https://github.com/ClickHouse/ClickHouse/pull/100794) ([YjyJeff](https://github.com/YjyJeff)).
* Some catalogs can show some secrets in the `SETTINGS` section of `select * from system.databases` query result. This PR prevents such behavior. [#100800](https://github.com/ClickHouse/ClickHouse/pull/100800) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix undefined behavior (signed integer overflow) in `toStartOfInterval` when using Week, Quarter, or Year intervals with an origin argument and extreme interval values. [#100817](https://github.com/ClickHouse/ClickHouse/pull/100817) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `If`, `Distinct`, `DistinctIf`, `IfState ` aggregate function combinators with `Tuple` return type and one or more `Nullable` argument not being able to read older serialized states after introduction of `Nullable(Tuple)`. Closes [#98917](https://github.com/ClickHouse/ClickHouse/issues/98917). [#100826](https://github.com/ClickHouse/ClickHouse/pull/100826) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix segfault in s3Cluster and distributed queries due to connection pool use-after-free. [#100837](https://github.com/ClickHouse/ClickHouse/pull/100837) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix null pointer dereference segfault when loading dictionaries during server shutdown. `Context::getUserDefinedSQLObjectsStorage` (dereferences `user_defined_sql_objects_storage`) is called by dictionary threads concurrently with the main thread calling `Context::shutdown` (sets `user_defined_sql_objects_storage` to null). We need to make sure we disable future updates in the dictionaries loader, kill the currently running dictionary queries and join the dictionary loading threads - all before running `Context::shutdown`. Similar to what we do with normal queries. [#100839](https://github.com/ClickHouse/ClickHouse/pull/100839) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix buffer overflow in `ULIDStringToDateTime` when input contains non-ASCII bytes. [#100843](https://github.com/ClickHouse/ClickHouse/pull/100843) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix crash (`LOGICAL_ERROR`) when querying a `Merge` table (or `merge()` table function) that wraps multiple tables including a `Distributed` table, with `distributed_group_by_no_merge=1` enabled. [#100859](https://github.com/ClickHouse/ClickHouse/pull/100859) ([Groene AI](https://github.com/groeneai)).
* Cast\_keep\_nullable when enabled will not throw when casting dynamic null to variant. [#100864](https://github.com/ClickHouse/ClickHouse/pull/100864) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix `clickhouse-keeper-client` `get`, `exists`, and `ls` commands printing duplicate `watch_id` error messages to stdout instead of stderr. [#100893](https://github.com/ClickHouse/ClickHouse/pull/100893) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* Fix exception in `intDiv`/`intDivOrZero` on arrays of nullable tuples, e.g. `SELECT intDiv([divide((1, 2), ... AND NULL)], 2)`. [#100895](https://github.com/ClickHouse/ClickHouse/pull/100895) ([Raúl Marín](https://github.com/Algunenano)).
* Evaluate engine arguments for `StorageAlias` before storing the definition, so that expressions like `currentDatabase()` are resolved to literals before being saved to the database. [#100902](https://github.com/ClickHouse/ClickHouse/pull/100902) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fix `processAndOptimizeTextIndexFunctions` when `query_plan_merge_expressions = 0`, where `ExpressionStep` is directly above `ReadFromMergeTree`. Fixes [#100879](https://github.com/ClickHouse/ClickHouse/issues/100879). [#100909](https://github.com/ClickHouse/ClickHouse/pull/100909) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Update replxx to include fix for out-of-bounds access in do\_complete\_line. [#100925](https://github.com/ClickHouse/ClickHouse/pull/100925) ([Azat Khuzhin](https://github.com/azat)).
* Fix wrong results when JOIN with shard-by-PK optimization uses query condition cache and some parts are filtered out by cached conditions. [#100926](https://github.com/ClickHouse/ClickHouse/pull/100926) ([Groene AI](https://github.com/groeneai)).
* Fix `divide` and `intDiv` returning `ILLEGAL_DIVISION` when used in filter expressions during index analysis in some cases. [#100928](https://github.com/ClickHouse/ClickHouse/pull/100928) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fixed "Target table doesn't exist" errors for materialized views with inner tables during async startup, caused by incorrect startup dependency ordering. [#100946](https://github.com/ClickHouse/ClickHouse/pull/100946) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fix undefined behavior (signed integer overflow) in parseDateTimeBestEffort when parsing datetime strings with more than 18 fractional-second digits. [#100948](https://github.com/ClickHouse/ClickHouse/pull/100948) ([Vasily Chekalkin](https://github.com/bacek)).
* Fixed a crash when using a text search index with an `IN` clause containing a tuple subquery, e.g. `WHERE (id, str) IN (SELECT (id, str) FROM ...)`, or when the number of columns in the subquery does not match the tuple on the left side of `IN`. [#100959](https://github.com/ClickHouse/ClickHouse/pull/100959) ([Anton Popov](https://github.com/CurtizJ)).
* Fixed crash when building a polygon dictionary from a `MergeTree` table that uses sparse columns serialization. [#100964](https://github.com/ClickHouse/ClickHouse/pull/100964) ([Anton Popov](https://github.com/CurtizJ)).
* Fix logical error "Invalid action query tree node" when using `INTERSECT ALL` / `UNION ALL` with constant-folded expressions. [#100977](https://github.com/ClickHouse/ClickHouse/pull/100977) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `sumCountOrDefault` aggregate function with one or more `Nullable` argument not being able to read older serialized states after introduction of `Nullable(Tuple)`. Closes [#100882](https://github.com/ClickHouse/ClickHouse/issues/100882). [#101021](https://github.com/ClickHouse/ClickHouse/pull/101021) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix crash (`Logical error: isConst/isSparse/isReplicated assertTypeEquality`) in merge algorithms when lazy column replication (`enable_lazy_columns_replication`) produces `ColumnReplicated` columns that flow into merge-sort pipelines with late-arriving inputs. [#101036](https://github.com/ClickHouse/ClickHouse/pull/101036) ([Groene AI](https://github.com/groeneai)).
* Fix incorrect `UNKNOWN_IDENTIFIER` error when the same alias is used for multiple expressions in `SELECT`; the correct `MULTIPLE_EXPRESSIONS_FOR_ALIAS` error is now reported. [#101040](https://github.com/ClickHouse/ClickHouse/pull/101040) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix ALIAS columns with `DateTime`/`DateTime64` types not applying timezone conversion when the declared timezone differs from the expression timezone. [#101043](https://github.com/ClickHouse/ClickHouse/pull/101043) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix row policies not being recorded in `query_log` for views, subqueries, and `INSERT ... SELECT`. Even though row policies were applied during query planning, they were not propagated from sub-planners to the parent planner for logging. Row policies (for logging only) are now kept in `QueryAccessInfo` so that both planners and sub-planners can populate them. [#101044](https://github.com/ClickHouse/ClickHouse/pull/101044) ([Narasimha Pakeer](https://github.com/npakeer)).
* Fix exception in `DirectJoinMergeTreeEntity` when pipeline blocks contain `ColumnConst` columns that are merged with regular columns. [#101046](https://github.com/ClickHouse/ClickHouse/pull/101046) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix spurious space in CTE column alias formatting (`WITH t (a, b)` → `WITH t(a, b)`). [#101049](https://github.com/ClickHouse/ClickHouse/pull/101049) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `remote`/`cluster` table functions failing with nested table functions like `merge` when the analyzer is enabled. [#101055](https://github.com/ClickHouse/ClickHouse/pull/101055) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `OFFSET` being applied twice in distributed queries when `prefer_localhost_replica=1`, producing fewer rows than expected. [#101071](https://github.com/ClickHouse/ClickHouse/pull/101071) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix crash when using the `Regexp` format with an invalid regular expression in `format_regexp` setting. [#101074](https://github.com/ClickHouse/ClickHouse/pull/101074) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix "Illegal type Decimal64 of start parameter" error for timeseries aggregate functions when using `serialize_query_plan=1` with parallel replicas. [#101083](https://github.com/ClickHouse/ClickHouse/pull/101083) ([Groene AI](https://github.com/groeneai)).
* Fix exception in `optimizeLazyMaterialization` when a projection with PREWHERE is used with `ORDER BY ... LIMIT`. [#101115](https://github.com/ClickHouse/ClickHouse/pull/101115) ([Anton Popov](https://github.com/CurtizJ)).
* Fix server crash (SIGABRT) when using aggregate functions with the internal-only `Null` combinator (e.g. `sumNull`, `avgNull`) and `aggregate_functions_null_for_empty = 1` setting enabled. [#101147](https://github.com/ClickHouse/ClickHouse/pull/101147) ([Groene AI](https://github.com/groeneai)).
* Fix a use-after-free in the filesystem cache write path that could cause reads from freed memory when logging completed file segments (detected by MemorySanitizer in BuzzHouse). [#101161](https://github.com/ClickHouse/ClickHouse/pull/101161) ([Groene AI](https://github.com/groeneai)).
* Fix server crash with "Trying to attach external table to a ready set without explicit elements" when distributed index analysis encounters a GLOBAL IN predicate whose set was built without explicit elements. [#101178](https://github.com/ClickHouse/ClickHouse/pull/101178) ([Groene AI](https://github.com/groeneai)).
* Fix `MAX`/`MIN` aggregate functions on `Decimal` columns returning incorrect results when JIT compilation is enabled (after the compilation threshold is reached). [#101203](https://github.com/ClickHouse/ClickHouse/pull/101203) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `minmax_count_projection` and trivial `COUNT(*)` optimizations being permanently disabled after a lightweight delete, even after all parts with a mask of lightweight delete were merged away. [#101212](https://github.com/ClickHouse/ClickHouse/pull/101212) ([Anton Popov](https://github.com/CurtizJ)).
* Fix a case which can lead to `Having zero bytes, ...` logical error from cache arising from a remote object being overwritten in between `list` and `read` which previously resulted in a stale object metadata. [#101219](https://github.com/ClickHouse/ClickHouse/pull/101219) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix server crash (LOGICAL\_ERROR: Bad cast from ColumnVector to ColumnLowCardinality) when querying a MergeTree table with `ORDER BY CAST(lc_column, 'Type')` where `lc_column` has a LowCardinality type. [#101220](https://github.com/ClickHouse/ClickHouse/pull/101220) ([Groene AI](https://github.com/groeneai)).
* Fix cleanup of stale processing nodes in `S3Queue`. [#101230](https://github.com/ClickHouse/ClickHouse/pull/101230) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix UB in mergeTreeAnalyzeIndexes() in case of invalid optimizations argument. [#101253](https://github.com/ClickHouse/ClickHouse/pull/101253) ([Azat Khuzhin](https://github.com/azat)).
* Fix `Logical error: 'partitions_count > 0'` exception when performing consecutive `ALTER TABLE UPDATE` on a partitioned Iceberg table. [#101278](https://github.com/ClickHouse/ClickHouse/pull/101278) ([Desel72](https://github.com/Desel72)).
* Fix wrong query results when a large integer constant (e.g. 256, 2147483648) is used as a boolean predicate in a WHERE clause with AND on MergeTree tables. For example, `SELECT count() FROM t WHERE (2147483648 > b) AND 2147483648` would incorrectly return 0 instead of matching all rows. [#101287](https://github.com/ClickHouse/ClickHouse/pull/101287) ([Groene AI](https://github.com/groeneai)).
* Fix insert-select from delta lake cluster with replicated merge tree. [#101299](https://github.com/ClickHouse/ClickHouse/pull/101299) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fixed crash with "Logical error: Reading from materialized CTE before materialization" when a scalar subquery references a chain of dependent materialized CTEs. [#101305](https://github.com/ClickHouse/ClickHouse/pull/101305) ([Groene AI](https://github.com/groeneai)).
* Fix data race on `storage_id` in `IStorage::getDependentViewsByColumn`. [#101385](https://github.com/ClickHouse/ClickHouse/pull/101385) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fix BACKUP FROM SNAPSHOT AST formatting and cloning. [#101405](https://github.com/ClickHouse/ClickHouse/pull/101405) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix LOGICAL\_ERROR crash "Current component is empty" when querying `system.part_moves_between_shards` with `enforce_keeper_component_tracking` enabled. [#101462](https://github.com/ClickHouse/ClickHouse/pull/101462) ([Groene AI](https://github.com/groeneai)).
* Fix segmentation fault in DataTypeDynamic::create() when the fuzzer generates a malformed Dynamic type AST. [#101464](https://github.com/ClickHouse/ClickHouse/pull/101464) ([Groene AI](https://github.com/groeneai)).
* Throw an error when `delta_lake_snapshot_version` or CDF version settings are used without DeltaKernel enabled, instead of silently returning wrong data. [#101489](https://github.com/ClickHouse/ClickHouse/pull/101489) ([Desel72](https://github.com/Desel72)).
* Fix `NOT_FOUND_COLUMN_IN_BLOCK` exception when using ARRAY JOIN with JOIN USING and `analyzer_compatibility_join_using_top_level_identifier` setting enabled. Close [#101240](https://github.com/ClickHouse/ClickHouse/issues/101240). [#101507](https://github.com/ClickHouse/ClickHouse/pull/101507) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix Iceberg INSERT retry loop failing when the table was created with `iceberg_metadata_file_path` and the target metadata version already exists. [#101548](https://github.com/ClickHouse/ClickHouse/pull/101548) ([Groene AI](https://github.com/groeneai)).
* Strip Nullable from result column in arrayIntersect and related functions to avoid serialization/deserialization mismatch. [#101569](https://github.com/ClickHouse/ClickHouse/pull/101569) ([George Larionov](https://github.com/george-larionov)).
* Fix server crash (LOGICAL\_ERROR) when SELECT-ing from a materialized view backed by an IcebergLocal table engine. [#101577](https://github.com/ClickHouse/ClickHouse/pull/101577) ([Groene AI](https://github.com/groeneai)).
* Fix incorrect error message when calling `intExp10` with NaN argument — it said `intExp2` instead of `intExp10`. [#101582](https://github.com/ClickHouse/ClickHouse/pull/101582) ([Krishna Chaitanya](https://github.com/Krishnachaitanyakc)).
* Fix `allow_statistics=0` not blocking `ALTER TABLE ADD STATISTICS` and `ALTER TABLE DROP STATISTICS` after refactoring in [#100288](https://github.com/ClickHouse/ClickHouse/issues/100288). [#101585](https://github.com/ClickHouse/ClickHouse/pull/101585) ([Krishna Chaitanya](https://github.com/Krishnachaitanyakc)).
* Fix `KeeperMap` `CREATE TABLE` failing with "Cannot create metadata for table" when leftover ZooKeeper nodes from a pre-25.1 partial drop are missing the `drop_lock_version` node. [#101623](https://github.com/ClickHouse/ClickHouse/pull/101623) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix possible logical error during reading Map subcolumns. Closes [#100769](https://github.com/ClickHouse/ClickHouse/issues/100769). Closes [#101336](https://github.com/ClickHouse/ClickHouse/issues/101336). [#101641](https://github.com/ClickHouse/ClickHouse/pull/101641) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix exact subcolumn match priority over prefix match in `getSubcolumnData` to avoid possible crash. Closes [#101271](https://github.com/ClickHouse/ClickHouse/issues/101271). [#101645](https://github.com/ClickHouse/ClickHouse/pull/101645) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix crash (LOGICAL\_ERROR: "ColumnUnique can't contain null values") when comparing a `LowCardinality` column with a `Variant` NULL constant while `use_variant_default_implementation_for_comparisons` is disabled. [#101690](https://github.com/ClickHouse/ClickHouse/pull/101690) ([Groene AI](https://github.com/groeneai)).
* What: Added empty-stream guard to Bzip2ReadBuffer so it returns EOF instead of throwing UNEXPECTED\_END\_OF\_FILE when the inner stream is empty. [#101691](https://github.com/ClickHouse/ClickHouse/pull/101691) ([ClickGap AI Bot](https://github.com/clickgapai)).
* What: Fixed the inverted description text for the `alterable` column in `system.s3_queue_settings` and `system.azure_queue_settings` — swapped `0` and `1` meanings to match the actual code behavior. [#101703](https://github.com/ClickHouse/ClickHouse/pull/101703) ([ClickGap AI Bot](https://github.com/clickgapai)).
* Fix positiveModulo(tuple, number) incorrectly dispatching to division instead of modulo. [#101709](https://github.com/ClickHouse/ClickHouse/pull/101709) ([ClickGap AI Bot](https://github.com/clickgapai)).
* Fixes a crash when `thread_pool_size` is configured on a cache-wrapped disk. Previously, `FileCacheSettings::loadFromConfig()` rejected `thread_pool_size` as an unknown setting, preventing the server from starting. The setting is a valid `IDisk` parameter that controls the number of threads used for disk-to-disk copy operations during background part moves. [#101712](https://github.com/ClickHouse/ClickHouse/pull/101712) ([Francisco](https://github.com/Milias)).
* Fix `RANGE_HASHED` dictionary creation silently accepting a non-existent `MAX` range attribute and using the wrong type configuration when min and max range attributes had different types. The bug was a copy-paste error in `buildRangeConfiguration` that looked up `min_attr_name` instead of `max_attr_name` for the max attribute. [#101732](https://github.com/ClickHouse/ClickHouse/pull/101732) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Fix use-after-free crash in CPU lease scheduler when the wait timer outlives the worker thread whose `ProfileEvents::Counters` it references. [#101761](https://github.com/ClickHouse/ClickHouse/pull/101761) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixes bug in arrayLevenshteinDistanceWeighted and arraySimilarity functions. Closes [#101725](https://github.com/ClickHouse/ClickHouse/issues/101725). [#101767](https://github.com/ClickHouse/ClickHouse/pull/101767) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
* Fix Prometheus Query API ignoring POST form bodies. [#101794](https://github.com/ClickHouse/ClickHouse/pull/101794) ([James Cunningham](https://github.com/JTCunning)).
* Fix exception escaping from S3 `Client::~Client` destructor causing server termination. [#101798](https://github.com/ClickHouse/ClickHouse/pull/101798) ([Gagan Dhakrey](https://github.com/gagandhakrey)).
* Fix use-after-scope in parallel deserialization of `Object` type dynamic paths, which could cause crashes when reading tables with many dynamic paths. [#101823](https://github.com/ClickHouse/ClickHouse/pull/101823) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixed incorrect output in function `formatDateTime` with formatter`%W` with certain (non-default) formatting settings. [#101847](https://github.com/ClickHouse/ClickHouse/pull/101847) ([Robert Schulze](https://github.com/rschu1ze)).
* Fix `shouldPatchFunction` false negative in `SYSTEM INSTRUMENT ADD` when the search string first appears inside a template argument of the demangled symbol name. [#101885](https://github.com/ClickHouse/ClickHouse/pull/101885) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix UDF registry loss when ZooKeeper session expires during periodic refresh — all user-defined functions could become unavailable until a full refresh succeeds. [#101891](https://github.com/ClickHouse/ClickHouse/pull/101891) ([Nikita Fomichev](https://github.com/fm4v)).
* Fixed `system.codecs` description for `AES_256_GCM_SIV` to report `AES-256` instead of `AES-128`. [#101917](https://github.com/ClickHouse/ClickHouse/pull/101917) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fix using wrong extremes in min-max index created on JSON column leading to wrong query result. Closes [#101700](https://github.com/ClickHouse/ClickHouse/issues/101700). [#101918](https://github.com/ClickHouse/ClickHouse/pull/101918) ([Pavel Kruglov](https://github.com/Avogar)).
* The `splitByString` tokenizer now rejects empty separator strings. [#101928](https://github.com/ClickHouse/ClickHouse/pull/101928) ([Robert Schulze](https://github.com/rschu1ze)).
* Fix `materialize_skip_indexes_on_merge=false` not suppressing text (full-text) indexes during merge. Previously, only non-text skip indexes (minmax, set, bloom\_filter) were suppressed; text indexes continued to be built, wasting CPU and I/O. [#101932](https://github.com/ClickHouse/ClickHouse/pull/101932) ([Groene AI](https://github.com/groeneai)).
* The `sparseGrams` tokenizer generated longer tokens than the provided max length (this was due to a hard-coded `+2` in the implementation). [#101934](https://github.com/ClickHouse/ClickHouse/pull/101934) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Fix SIGSEGV in `MergeTreeDataPartWriterWide::cancel` when a stream constructor throws during `addStreams`, leaving a null entry in `column_streams`. [#101936](https://github.com/ClickHouse/ClickHouse/pull/101936) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixes an exception when querying Merge or Distributed tables with a full-text index and combined filter conditions that mix `has*Tokens` with LIKE, while `query_plan_direct_read_from_text_index` is enabled. [#101939](https://github.com/ClickHouse/ClickHouse/pull/101939) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fix undefined behaviour when parsing native protocol query packets with invalid `QueryProcessingStage` values. [#101972](https://github.com/ClickHouse/ClickHouse/pull/101972) ([Raúl Marín](https://github.com/Algunenano)).
* Close TCP connection when an exception occurs during initial query parsing to prevent reading garbage from a desynchronized stream. [#101989](https://github.com/ClickHouse/ClickHouse/pull/101989) ([Raúl Marín](https://github.com/Algunenano)).
* Fix SLRU race bug in filesystem cache 26.1+, which can lead to space reservation logical error. In debug build it can also lead to failed assert: `'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)).
* Fix exception when casting a string with trailing data to empty `Tuple()` type. [#102011](https://github.com/ClickHouse/ClickHouse/pull/102011) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixes incorrect row ordering in queries that use ORDER BY with the grace\_hash join algorithm. Affected queries could return results in the wrong order, producing silently incorrect output. [#102036](https://github.com/ClickHouse/ClickHouse/pull/102036) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fixes a LOGICAL ERROR (Unexpected size of index type) that could occur in RIGHT JOIN and FULL JOIN queries when the `max_bytes_in_join` setting was configured. [#102042](https://github.com/ClickHouse/ClickHouse/pull/102042) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fixes cases where Time with negative values was returning wrong result on comparison with DateTime. Closes [#101670](https://github.com/ClickHouse/ClickHouse/issues/101670). [#102056](https://github.com/ClickHouse/ClickHouse/pull/102056) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix crash in UDF refresh caused by `ZooKeeperRetriesControl` retrying on a stale (expired) ZooKeeper session without renewing it. [#102059](https://github.com/ClickHouse/ClickHouse/pull/102059) ([Nikita Fomichev](https://github.com/fm4v)).
* Fix missing spaces when formatting unlock snapshot. close [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)).
* Fix crash (SIGSEGV) when querying a view with a WHERE clause and the inner query produces columns with different types than the view metadata (e.g. Nullable from LEFT JOIN with `join_use_nulls`). [#102085](https://github.com/ClickHouse/ClickHouse/pull/102085) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix `VectorSimilarityIndexCache` entries never being evicted after part removal due to mismatched cache keys. [#102152](https://github.com/ClickHouse/ClickHouse/pull/102152) ([Seva Potapov](https://github.com/seva-potapov)).
* NACK broken messages when using rabbitmq storage. [#102157](https://github.com/ClickHouse/ClickHouse/pull/102157) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix logical error when parsing incorrect empty tuple string. [#102289](https://github.com/ClickHouse/ClickHouse/pull/102289) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix incorrect aggregation results (duplicate rows) when using `optimize_aggregation_in_order=1` with GROUP BY columns ordered differently from the table's sorting key. [#102299](https://github.com/ClickHouse/ClickHouse/pull/102299) ([Groene AI](https://github.com/groeneai)).
* Fix crash in `IcebergLocal` `ALTER TABLE ... UPDATE` when using Avro format, caused by `LowCardinality`/`Nullable` wrapper types not being unwrapped before serialization. [#102337](https://github.com/ClickHouse/ClickHouse/pull/102337) ([Desel72](https://github.com/Desel72)).
* Fixed a segmentation fault in mutations on materialized columns without an expression. Closes [#102185](https://github.com/ClickHouse/ClickHouse/issues/102185). [#102342](https://github.com/ClickHouse/ClickHouse/pull/102342) ([zoomxi](https://github.com/zoomxi)).
* Coalescing merge tree fix for array type. This closes [#89509](https://github.com/ClickHouse/ClickHouse/issues/89509). [#102384](https://github.com/ClickHouse/ClickHouse/pull/102384) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix segfault (or LOGICAL\_ERROR in debug builds) when reading Parquet files with bloom filter push down enabled and WHERE clause equality/inequality conditions. The crash occurred due to an out-of-bounds memory access in the Parquet prefetcher's bloom filter data retrieval, and could also cause non-deterministic wrong query results. [#102385](https://github.com/ClickHouse/ClickHouse/pull/102385) ([Groene AI](https://github.com/groeneai)).
* Fix `LOGICAL_ERROR` abort during SLRU filesystem cache dynamic resize caused by shared eviction statistics across sub-queues and incorrect recovery path for failed candidates. [#102396](https://github.com/ClickHouse/ClickHouse/pull/102396) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix failure to initialize on a fresh replica Alias tables without a target table in the Database Replicated. Closes [#101320](https://github.com/ClickHouse/ClickHouse/issues/101320). [#102397](https://github.com/ClickHouse/ClickHouse/pull/102397) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fix out-of-bounds read in string search functions (`countSubstrings`, `position`, etc.) when searching for a needle consisting entirely of null bytes. [#102401](https://github.com/ClickHouse/ClickHouse/pull/102401) ([Raúl Marín](https://github.com/Algunenano)).
* Full text index settings (`enable_full_text_index`, `allow_experimental_full_text_index`, `use_skip_indexes_on_data_read`) are no longer disabled when the `compatibility` setting points to a version older than 26.1. Previously this could prevent `SharedDatabaseCatalog` from creating tables with text indexes. [#102422](https://github.com/ClickHouse/ClickHouse/pull/102422) ([Nikita Fomichev](https://github.com/fm4v)).
* Fix out of bounds read in `printf` with trailing `%`. [#102472](https://github.com/ClickHouse/ClickHouse/pull/102472) ([Raúl Marín](https://github.com/Algunenano)).
* Fixes a chassert exception `ReadBuffer is canceled` in debug builds in AsynchronousMetrics, caused by rewind not resetting the buffer cancellation flag. [#102524](https://github.com/ClickHouse/ClickHouse/pull/102524) ([Yuri Fedoseev](https://github.com/yurifedoseev)).
* Fixed `hasToken` / `hasTokenOrNull` with separator-only needles (e.g. `'()'`, `'!!!'`) on columns with a text index: previously the index silently skipped all granules instead of throwing `BAD_ARGUMENTS` (for `hasToken`) or returning `NULL` (for `hasTokenOrNull`). [#102544](https://github.com/ClickHouse/ClickHouse/pull/102544) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fix OOMs on huge multi requests in the keeper. For OpenTelemetry tracing, we unconditionally allocate >1 KiB for OpenTelemetry spans in `ZooKeeperRequest` objects - meaning, for really huge multi requests, we try to allocate >10 GiB extra memory. To fix this, we now keep shared data in static memory and use `std::unique_ptr` over `std::optional` in `ZooKeeperOpentelemetrySpans`. [#102586](https://github.com/ClickHouse/ClickHouse/pull/102586) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix `NamedCollection` CurrentMetric being inflated by `CREATE NAMED COLLECTION IF NOT EXISTS` on existing collections, and not being initialized for collections loaded from config or SQL storage at startup. Closes [#102507](https://github.com/ClickHouse/ClickHouse/issues/102507). [#102598](https://github.com/ClickHouse/ClickHouse/pull/102598) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix exception in `getStructureOfRemoteTable` when local shard returns empty columns due to concurrent DDL. [#102604](https://github.com/ClickHouse/ClickHouse/pull/102604) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception when multiple concurrent `CREATE TABLE IF NOT EXISTS` queries target the same `S3Queue` table on a Shared database. [#102610](https://github.com/ClickHouse/ClickHouse/pull/102610) ([Nikita Taranov](https://github.com/nickitat)).
* Fix LOGICAL\_ERROR crash "Unexpected number of rows in column subchunk" in native Parquet V3 reader when reading nullable columns with a WHERE filter. [#102628](https://github.com/ClickHouse/ClickHouse/pull/102628) ([Groene AI](https://github.com/groeneai)).
* Fix `AzureWriteMicroseconds` profile event description saying "read" instead of "write". [#102639](https://github.com/ClickHouse/ClickHouse/pull/102639) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Bug with row policy that gives 'Not found column in block' exception in some special cases. [#102648](https://github.com/ClickHouse/ClickHouse/pull/102648) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fixed a server exception in ClusterDiscovery when a static cluster (defined in config) temporarily had no live nodes. [#102661](https://github.com/ClickHouse/ClickHouse/pull/102661) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix wrong date data type inference in case of overflow after timezone adjustment. Closes [#102601](https://github.com/ClickHouse/ClickHouse/issues/102601). [#102674](https://github.com/ClickHouse/ClickHouse/pull/102674) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `SYSTEM WAIT VIEW` hanging forever when the refreshable materialized view is dropped while the wait is in progress. [#102681](https://github.com/ClickHouse/ClickHouse/pull/102681) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fix CASE with Dynamic expression returning ELSE for all rows. Closes [#102511](https://github.com/ClickHouse/ClickHouse/issues/102511). [#102684](https://github.com/ClickHouse/ClickHouse/pull/102684) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix flattened Dynamic type serialization with binary encoded data types. Closes [#101911](https://github.com/ClickHouse/ClickHouse/issues/101911). [#102692](https://github.com/ClickHouse/ClickHouse/pull/102692) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix format\_schema\_source='query' silently ignoring multi-row results. Closes [#101905](https://github.com/ClickHouse/ClickHouse/issues/101905). [#102698](https://github.com/ClickHouse/ClickHouse/pull/102698) ([Pavel Kruglov](https://github.com/Avogar)).
* Report actual exit code via SSH client instead of mapping all errors to `1`. Closes [#101741](https://github.com/ClickHouse/ClickHouse/issues/101741). [#102700](https://github.com/ClickHouse/ClickHouse/pull/102700) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix losing HTTP headers for dynamic/predefined query handlers. Closes [#101846](https://github.com/ClickHouse/ClickHouse/issues/101846). [#102706](https://github.com/ClickHouse/ClickHouse/pull/102706) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Apply Poisson sampling correction to collapsed jemalloc heap profiles to match jeprof output. Previously the collapsed format underestimated actual allocation sizes by not accounting for the sampling probability. [#102759](https://github.com/ClickHouse/ClickHouse/pull/102759) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix the crash in the function `hasPhrase` with a `NULL` argument. [#102802](https://github.com/ClickHouse/ClickHouse/pull/102802) ([Nikita Taranov](https://github.com/nickitat)).
* Fix server crash (SIGSEGV) when reading Avro files with recursive schemas containing cyclic symbolic type references. Now such schemas are detected and rejected with a clear error message instead of crashing. [#102853](https://github.com/ClickHouse/ClickHouse/pull/102853) ([Groene AI](https://github.com/groeneai)).
* Fix server crash (LOGICAL\_ERROR assertion) when a function on a `Variant` column hits a memory limit or other non-type-conversion exception during result casting in `FunctionVariantAdaptor`. The exception is now propagated correctly instead of being misclassified as an internal error. [#102855](https://github.com/ClickHouse/ClickHouse/pull/102855) ([Groene AI](https://github.com/groeneai)).
* Fix server crash in debug/sanitizer builds when `std::length_error` is thrown during schema inference (e.g., from extreme `input_format_msgpack_number_of_columns` values or malformed input data). [#102859](https://github.com/ClickHouse/ClickHouse/pull/102859) ([Groene AI](https://github.com/groeneai)).
* Make null representation in serialization of replicated and sparse columns respect settings (e.g. format\_tsv\_null\_representation). [#102888](https://github.com/ClickHouse/ClickHouse/pull/102888) ([Hechem Selmi](https://github.com/m-selmi)).
* Backported in [#103499](https://github.com/ClickHouse/ClickHouse/issues/103499): Fix S3 requests failing with `ios_base::clear: unspecified iostream_category error` instead of being retried, caused by Poco `BufferedStreamBuf::flushBuffer` not handling short writes from the socket layer. [#102894](https://github.com/ClickHouse/ClickHouse/pull/102894) ([Sema Checherinda](https://github.com/CheSema)).
* Fix `minmax_count_projection` and trivial `COUNT(*)` optimizations being permanently disabled after a lightweight delete, even after all parts with a mask of lightweight delete were merged away. [#102900](https://github.com/ClickHouse/ClickHouse/pull/102900) ([Anton Popov](https://github.com/CurtizJ)).
* Fix random crashes in jemalloc due to LTO. [#102913](https://github.com/ClickHouse/ClickHouse/pull/102913) ([Azat Khuzhin](https://github.com/azat)).
* Optimize row policy OR-chains to IN in the new analyzer. [#102915](https://github.com/ClickHouse/ClickHouse/pull/102915) ([Azat Khuzhin](https://github.com/azat)).
* Fix jemalloc metadata corruption caused by page cache freeing with wrong alignment that may lead to crashes. [#102918](https://github.com/ClickHouse/ClickHouse/pull/102918) ([Azat Khuzhin](https://github.com/azat)).
* Plain INSERTs without materialized views no longer request excessive ConcurrencyControl slots and threads (`max_threads` instead of `max_insert_threads`), preventing CC slot starvation and thread count blowup on clusters with high INSERT throughput. [#102961](https://github.com/ClickHouse/ClickHouse/pull/102961) ([Sema Checherinda](https://github.com/CheSema)).
* Reintroduce ArrowMemoryPool to allow throwing MEMORY\_LIMIT\_EXCEEDED to avoid kernel OOM. [#102999](https://github.com/ClickHouse/ClickHouse/pull/102999) ([Azat Khuzhin](https://github.com/azat)).
* Fix `cast_string_to_date_time_mode` being ignored for `CAST` to `Nullable(DateTime)`. Closes [#101840](https://github.com/ClickHouse/ClickHouse/issues/101840). [#103035](https://github.com/ClickHouse/ClickHouse/pull/103035) ([Pavel Kruglov](https://github.com/Avogar)).
* Added support for `ALIAS` columns in text index direct read optimization. [#103037](https://github.com/ClickHouse/ClickHouse/pull/103037) ([Anton Popov](https://github.com/CurtizJ)).
* Backported in [#103454](https://github.com/ClickHouse/ClickHouse/issues/103454): Fix `SELECT DISTINCT` silently returning incomplete results when an aggregate projection matched the query and some parts of the table had no projection data (e.g. the projection was added on a table that already held data, and `MATERIALIZE PROJECTION` was not run). Closes [#102951](https://github.com/ClickHouse/ClickHouse/issues/102951). [#103052](https://github.com/ClickHouse/ClickHouse/pull/103052) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix wrong results returned by `WHERE x AND toNullable(N)` on `MergeTree` tables when `N` is an integer wider than `UInt8` (e.g. `256`, `65535`, `2147483648`, or any negative integer). The filter incorrectly discarded all rows because `splitFilterNodeForAllowedInputs` used a `NULL` zero when converting the `Nullable` remainder of a reduced `AND` to boolean, turning the comparison into `NULL` under three-valued logic. [#103077](https://github.com/ClickHouse/ClickHouse/pull/103077) ([Groene AI](https://github.com/groeneai)).
* Fixed incorrect argument type reported in error messages of string search functions (e.g. `locate`, `position`) when arguments are passed in swapped order (`locate(needle, haystack)` with `function_locate_has_mysql_compatible_argument_order = 1`). [#103102](https://github.com/ClickHouse/ClickHouse/pull/103102) ([Alex Kuleshov](https://github.com/0xAX)).
* Fix waitForPause hanging indefinitely when disableFailPoint is called with no thread paused at the failpoint. [#103119](https://github.com/ClickHouse/ClickHouse/pull/103119) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Cap pre-auth TCP Hello packet strings to 64 KB and add `handshake_timeout_milliseconds` server setting to limit total handshake time, preventing unauthenticated clients from consuming excessive memory or holding threads indefinitely. [#103284](https://github.com/ClickHouse/ClickHouse/pull/103284) ([Sema Checherinda](https://github.com/CheSema)).
* Fix Parquet ColumnIndex stats min\_value > max\_value for String columns. [#103334](https://github.com/ClickHouse/ClickHouse/pull/103334) ([Saurabh Kumar Ojha](https://github.com/saurabhojha)).
* Check for malformed flattened Dynamic data in Native format. [#103392](https://github.com/ClickHouse/ClickHouse/pull/103392) ([Pavel Kruglov](https://github.com/Avogar)).
* Populate `_time` column from `url` table function. [#103437](https://github.com/ClickHouse/ClickHouse/pull/103437) ([Nikita Taranov](https://github.com/nickitat)).
* Fix SVE detection using SVE instructions when unavailable. [#103568](https://github.com/ClickHouse/ClickHouse/pull/103568) ([Raúl Marín](https://github.com/Algunenano)).

#### Build/Testing/Packaging Improvement

* Libstemmer (Snowball) dependency now uses newer version v3.0.1. [#99256](https://github.com/ClickHouse/ClickHouse/pull/99256) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Randomize settings in 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)).
* Implement a stress test for functions, checking the soundness of their various properties. [#93543](https://github.com/ClickHouse/ClickHouse/pull/93543) ([Michael Kolupaev](https://github.com/al13n321)).
* Provide own CMake configuration for `llvm-project` instead of importing upstream one. [#97453](https://github.com/ClickHouse/ClickHouse/pull/97453) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Randomize more `optimize_*` settings in the test infrastructure to improve coverage of query optimization passes. [#97547](https://github.com/ClickHouse/ClickHouse/pull/97547) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Use Rust toolchain nightly-2026-03-22. [#98602](https://github.com/ClickHouse/ClickHouse/pull/98602) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `wasmtime` v42.0.1. [#98603](https://github.com/ClickHouse/ClickHouse/pull/98603) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `llvm-project` 22.1.1. [#98882](https://github.com/ClickHouse/ClickHouse/pull/98882) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Replace `SANITIZE_COVERAGE` (custom sanitizer callbacks, symbol-level granularity) with LLVM source-based coverage (`WITH_COVERAGE`, `-fprofile-instr-generate -fcoverage-mapping`) for the nightly per-test coverage pipeline. The server now reads its own coverage mapping from ELF sections at startup and collects `(file, line_start, line_end)` tuples per test via a new `SYSTEM SET COVERAGE TEST 'name'` command. Test selection in targeted CI checks uses line-range queries against a new `checks_coverage_lines` CIDB table and ranks candidate tests by how many changed diff lines they cover. [#99513](https://github.com/ClickHouse/ClickHouse/pull/99513) ([Nikita Fomichev](https://github.com/fm4v)).
* Fix llvm-libc link error with -O0 build. [#100023](https://github.com/ClickHouse/ClickHouse/pull/100023) ([Zheguang Zhao](https://github.com/zheguang)).
* Fixed two error messages on container startup in case the configuration did not contain the `logger.log` and `logger.errorlog` settings (e.g. when all log messages are supposed to go to STDOUT/STDERR). [#100239](https://github.com/ClickHouse/ClickHouse/pull/100239) ([Simon](https://github.com/simonhammes)).
* Prefer `ld64.lld` over Apple's `ld` (cctools-port ld64) for macOS builds. This should significantly reduce Darwin link times, as cctools-port's ld64 is very slow with `-ffunction-sections` and `-dead_strip`. Falls back to `ld` if `ld64.lld` is not available. [#100275](https://github.com/ClickHouse/ClickHouse/pull/100275) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Tests to ensure that directories do not register any secrets (REST + Glue). [#100307](https://github.com/ClickHouse/ClickHouse/pull/100307) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Repeat recently modified tests with different randomized settings. [#100385](https://github.com/ClickHouse/ClickHouse/pull/100385) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Track `#embed` file dependencies in CMake and enable ccache depend mode for correct rebuilds. [#100411](https://github.com/ClickHouse/ClickHouse/pull/100411) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add correctness tests for TPC-H queries. [#100580](https://github.com/ClickHouse/ClickHouse/pull/100580) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Use `aws-sdk-cpp` 1.11.771. [#100582](https://github.com/ClickHouse/ClickHouse/pull/100582) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Allow performance test XMLs to reference external SQL query files and settings via file attribute. [#100747](https://github.com/ClickHouse/ClickHouse/pull/100747) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix compilation with `-march=x86-64-v4` by adding missing `TargetSpecific.h` include in `LowerUpperImpl.h`. [#100932](https://github.com/ClickHouse/ClickHouse/pull/100932) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix build on gentoo by adding --no-default-config to cxxflags. [#100973](https://github.com/ClickHouse/ClickHouse/pull/100973) ([Isak Ellmer](https://github.com/spinojara)).
* Added `utils/auto-bisect/` — a shell-based bisection framework that downloads pre-built CI binaries and runs a user-supplied test script to find the first commit that introduced a regression, without requiring a local build. [#100989](https://github.com/ClickHouse/ClickHouse/pull/100989) ([Nikita Fomichev](https://github.com/fm4v)).
* Disable ThinLTO by default in CMake so that local developer builds no longer implicitly enable it. CI release builds are unaffected since they explicitly pass `-DENABLE_THINLTO=1`. [#101041](https://github.com/ClickHouse/ClickHouse/pull/101041) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add TPC-DS SF1 benchmark to performance tests. [#101209](https://github.com/ClickHouse/ClickHouse/pull/101209) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Added stateless tests for MergeTree lightweight deletes covering: `has_lightweight_delete` flag lifecycle, `COUNT(*)` correctness with `optimize_trivial_count_query`, `MATERIALIZED`/`DEFAULT` column integrity, `ReplicatedMergeTree` flag recovery, `read_in_order` with deleted rows, multiple delete/merge cycles, `_row_exists` column hiding, predicate variety, and `ALTER DELETE` RBAC enforcement. [#101792](https://github.com/ClickHouse/ClickHouse/pull/101792) ([Nikita Fomichev](https://github.com/fm4v)).
* Distroless Docker images are now published with ubuntu and alpine variants for tagged releases. [#101941](https://github.com/ClickHouse/ClickHouse/pull/101941) ([Rahul Nair](https://github.com/motsc)).
* Stack traces now show clean bare relative paths (e.g. `src/Common/Exception.cpp`) instead of paths polluted with the build directory (e.g. `./ci/tmp/fast_build/./src/Common/Exception.cpp`). [#102000](https://github.com/ClickHouse/ClickHouse/pull/102000) ([Raúl Marín](https://github.com/Algunenano)).
* Add a CI style check that rejects files larger than 5 MB committed to the repository, with a whitelist for existing legitimate test data. Remove unused 14 MB `zookeeper_log.parquet`. [#102080](https://github.com/ClickHouse/ClickHouse/pull/102080) ([Raúl Marín](https://github.com/Algunenano)).
* Remove \~400 unused `#include` directives from headers to reduce compilation times. [#102585](https://github.com/ClickHouse/ClickHouse/pull/102585) ([Raúl Marín](https://github.com/Algunenano)).
* Use `wasmtime` v43.0.1. [#102603](https://github.com/ClickHouse/ClickHouse/pull/102603) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `openssl` 3.5.6. [#102606](https://github.com/ClickHouse/ClickHouse/pull/102606) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `xz` 5.8.3. [#102607](https://github.com/ClickHouse/ClickHouse/pull/102607) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Upgrade distroless Docker image base from Debian 12 (glibc 2.36, OpenSSL 3.0) to Debian 13 (glibc 2.41, OpenSSL 3.5), reducing CVE surface to zero reachable vulnerabilities. [#101678](https://github.com/ClickHouse/ClickHouse/pull/101678) ([Rahul Nair](https://github.com/motsc)).

<h3 id="263">
  ClickHouse release 26.3 LTS, 2026-03-26. [Presentation](https://presentations.clickhouse.com/), [Video](https://www.youtube.com/watch?v=_bY0ucNB1lQ)
</h3>

#### Backward Incompatible Change

* Downgrading after upgrading may cause data loss. Propagate data types serialization versions to nested data types. For example, String serialization version `with_size_stream` previously was applied only on top-level String columns and Tuple elements. Now it's applied to any String type inside any nested type like `Array`/`Map`/`Variant`/`JSON`/etc. This behaviour is controlled by MergeTree setting `propagate_types_serialization_versions_to_nested_types` that is now enabled by default. After this change, newly created data parts cannot be read by older versions, but old parts can be read on new version with no problems. **Upgrade is safe, but downgrade is not — if you need to roll back after upgrading to 26.3, data written by 26.3 in columns with nested types will be unreadable!** See [#101429](https://github.com/ClickHouse/ClickHouse/issues/101429) for details. [#94859](https://github.com/ClickHouse/ClickHouse/pull/94859) ([Pavel Kruglov](https://github.com/Avogar)).
* Remove the `hypothesis` skip index type. It was an obscure, experimental feature with limited practical use. Creating tables with `INDEX ... TYPE hypothesis` will now produce an error. [#96874](https://github.com/ClickHouse/ClickHouse/pull/96874) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove the experimental `detectProgrammingLanguage` function. [#99567](https://github.com/ClickHouse/ClickHouse/pull/99567) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `NOT` operator precedence to match the SQL standard: `NOT` now binds looser than `IS NULL`, `BETWEEN`, `LIKE`, and arithmetic operators. For example, `NOT (x) IS NULL` is now parsed as `NOT (x IS NULL)` instead of `(NOT x) IS NULL`. This may change the result of queries that relied on the previous (non-standard) behavior. [#97680](https://github.com/ClickHouse/ClickHouse/pull/97680) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Corrects the metadata of normal projections so that projections with multi-column sorting keys are properly recognized. Builds on top of [#90429](https://github.com/ClickHouse/ClickHouse/issues/90429). [#91352](https://github.com/ClickHouse/ClickHouse/pull/91352) ([Amos Bird](https://github.com/amosbird)).
* Fixed skip index files not respecting replace\_long\_file\_name\_to\_hash setting, causing "File name too long" errors and broken index reads for indices with long names. Skip index filenames are now hashed when they exceed max\_file\_name\_length, similar to column files. This is backward compatible (new servers read old parts), but downgrading (or old servers during a rolling upgrade) may cause long-named indices to be ignored. [#97128](https://github.com/ClickHouse/ClickHouse/pull/97128) ([Raúl Marín](https://github.com/Algunenano)).
* Turn on async insert by default. ClickHouse will be batching all small inserts by default now. This setting is set under compatibility. If you set `compatibility=<version less than 26.2>` then default value would be the previous one, `false`. You can turn off/on async inserts at several levels: in the config in users profiles, for the session, for the query, or for the MergeTree table. [#97590](https://github.com/ClickHouse/ClickHouse/pull/97590) ([Sema Checherinda](https://github.com/CheSema)).
* Change the default value of `mysql_datatypes_support_level` from empty to `decimal,datetime64,date2Date32`, enabling proper mapping of MySQL `DATE` to `Date32`, `DECIMAL`/`NUMERIC` to `Decimal`, and `DATETIME`/`TIMESTAMP` with precision to `DateTime64` by default. Previously, MySQL `DATE` columns were mapped to `Date` which cannot represent dates before 1970-01-01, causing data corruption. [#97716](https://github.com/ClickHouse/ClickHouse/pull/97716) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Accept array of part names instead of regexp for `mergeTreeAnalyzeIndexes{,UUID}` since regexp is slow (*Experimental feature*). [#98474](https://github.com/ClickHouse/ClickHouse/pull/98474) ([Azat Khuzhin](https://github.com/azat)).
* Change default `stderr_reaction` from `throw` to `log_last` for executable UDFs. UDFs that write warnings to stderr no longer fail when exit code is 0. Exit code exceptions now include stderr content. [#99232](https://github.com/ClickHouse/ClickHouse/pull/99232) ([Xu Jia](https://github.com/XuJia0210)).

#### New Feature

* Added bucketed serialization for Map columns in MergeTree (`map_serialization_version = 'with_buckets'`). Keys are split into hash-based buckets so that reading a single key (`m['key']`) only reads one bucket instead of the entire column, providing 2-49x speedup for single-key lookups depending on map size. The number of buckets and the bucketing strategy can be controlled by new MergeTree settings: `map_serialization_version`, `max_buckets_in_map`, `map_buckets_strategy`, `map_buckets_coefficient`, and `map_buckets_min_avg_size`. [#99200](https://github.com/ClickHouse/ClickHouse/pull/99200) ([Pavel Kruglov](https://github.com/Avogar)).
* Support materialized CTE. Allow evaluating CTEs only once during query execution and store their results in temporary tables. Closes [#53449](https://github.com/ClickHouse/ClickHouse/issues/53449). [#94849](https://github.com/ClickHouse/ClickHouse/pull/94849) ([Dmitry Novik](https://github.com/novikd)).
* Allow certain SQL-standard functions without parentheses for compatibility, such as `NOW`. Closes [#52102](https://github.com/ClickHouse/ClickHouse/issues/52102). [#95949](https://github.com/ClickHouse/ClickHouse/pull/95949) ([Aly Kafoury](https://github.com/AlyHKafoury)).
* You can now use the natural sort key function as `naturalSortKey(s)`. [#90322](https://github.com/ClickHouse/ClickHouse/pull/90322) ([Nazarii Piontko](https://github.com/nazarii-piontko)).
* You can now use native JSON/Object input for JSONExtract functions. Closes [#88370](https://github.com/ClickHouse/ClickHouse/issues/88370). [#96711](https://github.com/ClickHouse/ClickHouse/pull/96711) ([Fisnik Kastrati](https://github.com/fkastrati)).
* If a query parameter has `Nullable` type and is not specified, we will assume that its value is `NULL`. [#93869](https://github.com/ClickHouse/ClickHouse/pull/93869) ([Vikash Kumar](https://github.com/vikashkumar2020)).
* Support auxiliary ZooKeeper for `Replicated` database. [#95590](https://github.com/ClickHouse/ClickHouse/pull/95590) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* Support `has` function for JSON type to check path existence, similar to Map. [#96927](https://github.com/ClickHouse/ClickHouse/pull/96927) ([DQ](https://github.com/il9ue)).
* Added the `mergeTreeTextIndex(database, table, index)` table function, which allows reading data directly from a text index. This function can be used for introspection or for performing aggregations on top of text index data. [#97003](https://github.com/ClickHouse/ClickHouse/pull/97003) ([Anton Popov](https://github.com/CurtizJ)).
* Add `table_readonly` MergeTree setting to mark tables as read-only, preventing inserts and modifications. [#97652](https://github.com/ClickHouse/ClickHouse/pull/97652) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add new setting `use_partition_pruning` and alias `use_partition_key`. Set it to `false` to disable partition pruning based on the partition key. [#97888](https://github.com/ClickHouse/ClickHouse/pull/97888) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Implements `ALTER TABLE ... EXECUTE expire_snapshots('<timestamp>')` for Iceberg tables. [#97904](https://github.com/ClickHouse/ClickHouse/pull/97904) ([murphy-4o](https://github.com/murphy-4o)). [#99130](https://github.com/ClickHouse/ClickHouse/pull/99130)
* Allow each `type=http` entry in `<protocols>` to specify a custom `<handlers>` key pointing to a separate `<http_handlers_*>` config section, enabling different HTTP routing rules per port. [#98414](https://github.com/ClickHouse/ClickHouse/pull/98414) ([Amos Bird](https://github.com/amosbird)).
* Add `pretty=1` option to `EXPLAIN` for tree-style indented output and `compact=1` to collapse `Expression` steps, making query plans more readable. [#98500](https://github.com/ClickHouse/ClickHouse/pull/98500) ([Kirill Kopnev](https://github.com/Fgrtue)).
* Add `restore_access_entities_with_current_grants` server setting. When enabled, restored users/roles from backups have their grants limited to what the restoring user is allowed to grant (same semantics as `GRANT CURRENT GRANTS`), instead of failing with `ACCESS_DENIED`. [#98795](https://github.com/ClickHouse/ClickHouse/pull/98795) ([pufit](https://github.com/pufit)).
* Add `caseFoldUTF8` and `removeDiacriticsUTF8` functions for Unicode case folding and diacritical mark removal. [#98973](https://github.com/ClickHouse/ClickHouse/pull/98973) ([George Larionov](https://github.com/george-larionov)).
* Add `normalizeUTF8NFKCCasefold` string function for NFKC\_Casefold Unicode normalization, which combines NFKC normalization with case folding. [#99276](https://github.com/ClickHouse/ClickHouse/pull/99276) ([George Larionov](https://github.com/george-larionov)).
* Add `asciiCJK` tokenizer for full-text indexes and the `tokens` function. It splits text using Unicode word boundary rules: ASCII words are formed with connector characters (underscore, colon, dot, single quote), while non-ASCII Unicode characters become single-character tokens. [#99357](https://github.com/ClickHouse/ClickHouse/pull/99357) ([Amos Bird](https://github.com/amosbird)).
* Added `max_skip_unavailable_shards_num` and `max_skip_unavailable_shards_ratio` settings to limit how many shards can be silently skipped when `skip_unavailable_shards` is enabled. If the number or ratio of unavailable shards exceeds the configured threshold, an exception is thrown instead of returning silently incomplete results. [#99369](https://github.com/ClickHouse/ClickHouse/pull/99369) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Users can now use `SOME` keyword for subquery expressions. It behaves identically to `ANY`. [#99842](https://github.com/ClickHouse/ClickHouse/pull/99842) ([Artem Kytkin](https://github.com/Vinceent)).
* Add `output_format_trim_fixed_string` setting to strip trailing null bytes from `FixedString` values in text output formats. [#97558](https://github.com/ClickHouse/ClickHouse/pull/97558) ([NeedmeFordev](https://github.com/spider-yamet)).
* Support parenthesized table join expressions in FROM clause, e.g. `SELECT * FROM (t1 CROSS JOIN t2)`. [#97650](https://github.com/ClickHouse/ClickHouse/pull/97650) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Implement function `toDaysInMonth`: it returns the number of days in the month of the specified date. [#99227](https://github.com/ClickHouse/ClickHouse/pull/99227) ([Vitaly Baranov](https://github.com/vitlibar)).

#### Experimental Feature

* Add experimental support for WebAssembly-based user-defined functions (UDFs), allowing custom function logic to be implemented in WebAssembly and executed within ClickHouse. Special thanks to [Alexey Smirnov](https://github.com/lioshik) for contributing the Wasmtime backend support. [#88747](https://github.com/ClickHouse/ClickHouse/pull/88747) ([Vladimir Cherkasov](https://github.com/vdimir)). Incremental improvements for WASM UDF support. [#99373](https://github.com/ClickHouse/ClickHouse/pull/99373) ([Vasily Chekalkin](https://github.com/bacek)).
* Add support for external SQL dialects using `polyglot` library. [#99496](https://github.com/ClickHouse/ClickHouse/pull/99496) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `ALP` floating-point compression codec (without ALP\_rd fallback for non-compressible doubles). [#91362](https://github.com/ClickHouse/ClickHouse/pull/91362) ([Nazarii Piontko](https://github.com/nazarii-piontko)).
* Add experimental lazy type hints for `JSON` columns. When enabled via `allow_experimental_json_lazy_type_hints`, `ALTER TABLE ... MODIFY COLUMN json JSON(path TypeName)` that only adds or modifies type hints completes instantly as a metadata-only operation, without rewriting historical data. Type hints are applied at query time for old parts and materialized during INSERTs and background merges. [#97412](https://github.com/ClickHouse/ClickHouse/pull/97412) ([tanner-bruce](https://github.com/tanner-bruce)).
* Enable parallel reads from YTsaurus table engine. [#97343](https://github.com/ClickHouse/ClickHouse/pull/97343) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).

#### Performance Improvement

* Improve the performance of data lakes. In previous versions, reading from object storage didn't resize the pipeline to the number of processing threads. This gives orders of magnitude improvements (\~40x) on multi-core machines. [#99548](https://github.com/ClickHouse/ClickHouse/pull/99548) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Now, the relationship between `enable_parallel_replicas` and `automatic_parallel_replicas_mode` is as follows. A query can use parallel replicas only if `enable_parallel_replicas > 0`. Additionally, if `automatic_parallel_replicas_mode=1`, the decision whether to use parallel replicas is made during planning based on the previously collected statistics. If `automatic_parallel_replicas_mode=0`, parallel replicas will be used for all supported queries regardless of any statistics. One notable exemption is distributed insert-select with parallel replicas: in this case, queries will always be executed as if `automatic_parallel_replicas_mode=0`. [#97517](https://github.com/ClickHouse/ClickHouse/pull/97517) ([Nikita Taranov](https://github.com/nickitat)).
* Allow partition pruning when the predicate contains any comparison operator (`=`, `<`, `>`, `!=`) and the partition key is wrapped in a deterministic function chain (e.g. `PARTITION BY x` and predicates like `cityHash64(x) % 5 > 2`, `toYYYYMM(x) < 2026`, `toYYYYMM(x) = 2026`, or `toYYYYMM(x) != 2026` will all use the partition key for pruning). Closes [#28800](https://github.com/ClickHouse/ClickHouse/issues/28800). [#98432](https://github.com/ClickHouse/ClickHouse/pull/98432) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Allow read-in-order optimization and primary-key pruning when the `CAST` target type is `Nullable` and the conversion is monotonic; for example, with `PRIMARY KEY x`, ClickHouse can use read-in-order optimization for `ORDER BY x::Nullable(UInt64)` and can apply primary-key pruning for predicates such as `WHERE x::Nullable(UInt64) > 500000`. [#98482](https://github.com/ClickHouse/ClickHouse/pull/98482) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Allow index pruning and filter pushdown when an integral column is compared with a float literal; for example, predicates like `WHERE x < 10.5` can now use the primary key for pruning, and filters such as `prime < 1e9` or `number < 1e5` are now pushed down for the `primes()` and `numbers()` table functions instead of causing unbounded execution. Closes [#85167](https://github.com/ClickHouse/ClickHouse/issues/85167). [#98516](https://github.com/ClickHouse/ClickHouse/pull/98516) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Added a new SLRU cache for Parquet metadata to improve read performance by removing the need to re-download files just to read metadata. [#98140](https://github.com/ClickHouse/ClickHouse/pull/98140) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* Support swapping sides of ANTI, SEMI and FULL joins based on optimizer statistics. [#97498](https://github.com/ClickHouse/ClickHouse/pull/97498) ([Hechem Selmi](https://github.com/m-selmi)).
* Optimize granules skipping for `pointInPolygon` for large polygons and fix `pointInPolygon` index analysis throwing during primary key pruning. [#91633](https://github.com/ClickHouse/ClickHouse/pull/91633) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Improve performance of `levenshteinDistance` function. [#94543](https://github.com/ClickHouse/ClickHouse/pull/94543) ([Joanna Hulboj](https://github.com/jh0x)).
* Optimize batch decimal type conversions by avoiding per-element function calls. [#95923](https://github.com/ClickHouse/ClickHouse/pull/95923) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Iceberg tables now support asynchronous metadata prefetching via `iceberg_metadata_async_prefetch_period_ms` table setting, which periodically pre-populates the metadata cache. Additionally, the `iceberg_metadata_staleness_ms` query setting allows SELECT queries to use cached metadata if it is fresher than the specified staleness, eliminating calls to the Iceberg catalog during request processing. [#96191](https://github.com/ClickHouse/ClickHouse/pull/96191) ([Arsen Muk](https://github.com/arsenmuk)).
* `S3Queue` ordered mode uses S3 ListObjectsV2 StartAfter to avoid re-listing full prefix history, reducing ListObjects calls. [#96370](https://github.com/ClickHouse/ClickHouse/pull/96370) ([Venkata  Vineel ](https://github.com/vyalamar)).
* Lower memory usage for inserts deduplication. In general the original block is needed for deduplication, but for sync insert we could omit it and save the memory for good. [#96661](https://github.com/ClickHouse/ClickHouse/pull/96661) ([Sema Checherinda](https://github.com/CheSema)).
* Use an arch-specific value for cache line size instead of a hardcoded value of 64. [#97357](https://github.com/ClickHouse/ClickHouse/pull/97357) ([Nikita Taranov](https://github.com/nickitat)).
* Slightly optimized reading from the text index dictionary, improving the overall performance of text index analysis. [#97519](https://github.com/ClickHouse/ClickHouse/pull/97519) ([Anton Popov](https://github.com/CurtizJ)).
* Speed up `LZ4` decompression of 16 byte blocks in ARM. [#97774](https://github.com/ClickHouse/ClickHouse/pull/97774) ([Raúl Marín](https://github.com/Algunenano)).
* Refactor tokenization to a new high-performance interface, replacing the old iterator-style API to support SIMD and stateful tokenizers. Part of [#90268](https://github.com/ClickHouse/ClickHouse/issues/90268). [#97871](https://github.com/ClickHouse/ClickHouse/pull/97871) ([Amos Bird](https://github.com/amosbird)).
* Improved performance of text index analysis for queries with combined conditions involving both indexed and non-indexed columns. Previously, early exit optimization during index analysis was incorrectly disabled in such cases. [#98096](https://github.com/ClickHouse/ClickHouse/pull/98096) ([Anton Popov](https://github.com/CurtizJ)).
* Improve the performance of queries with constant expressions that generate very long arrays or maps. [#98287](https://github.com/ClickHouse/ClickHouse/pull/98287) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix key condition analysis for `DateTime64` primary keys compared with integer constants, which previously resulted in no granule pruning. [#98410](https://github.com/ClickHouse/ClickHouse/pull/98410) ([Amos Bird](https://github.com/amosbird)).
* The setting `optimize_syntax_fuse_functions` is enabled by default. [#98424](https://github.com/ClickHouse/ClickHouse/pull/98424) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Optimize `avgWeighted` aggregate function by using local accumulators instead of per-row store-forwarding through aggregate state, improving performance by up to 27% for Nullable inputs. [#98793](https://github.com/ClickHouse/ClickHouse/pull/98793) ([Antonio Andelic](https://github.com/antonio2368)).
* Improves performance and reduces memory usage for parallel window functions in certain scenarios, and for `arrayFold` workloads with large arrays. This can also reduce page-fault pressure and improve stability under tight memory limits for affected queries. [#98892](https://github.com/ClickHouse/ClickHouse/pull/98892) ([filimonov](https://github.com/filimonov)).
* Improve performance of sorted merges. [#99013](https://github.com/ClickHouse/ClickHouse/pull/99013) ([Artem Zuikov](https://github.com/4ertus2)).
* Optimize `INTERSECT ALL` and `EXCEPT ALL`. [#99097](https://github.com/ClickHouse/ClickHouse/pull/99097) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Support the `read_in_order_use_virtual_row` optimization for reverse-order reads. [#99198](https://github.com/ClickHouse/ClickHouse/pull/99198) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Reduce cache contention in `RIGHT` and `FULL` JOINs by checking if JoinUsedFlags is set before writing. [#99274](https://github.com/ClickHouse/ClickHouse/pull/99274) ([Hechem Selmi](https://github.com/m-selmi)).
* Optimize `PrefetchingHelper::calcPrefetchLookAhead` by replacing floating-point math with pure integer arithmetic, improving instruction cache layout and reducing cycle overhead during aggregation loops. [#99327](https://github.com/ClickHouse/ClickHouse/pull/99327) ([Riyane El Qoqui](https://github.com/riyaneel)).
* Reduce memory consumption of Keeper by replacing `absl::flat_hash_set` with `CompactChildrenSet` for storing node children. The new container stores 0–1 children inline without heap allocation, which covers the majority of Keeper nodes. This reduces `KeeperMemNode` size from 144 to 128 bytes. [#99860](https://github.com/ClickHouse/ClickHouse/pull/99860) ([Antonio Andelic](https://github.com/antonio2368)).
* Aggregate projections are now correctly supported in views. Fixes [#32753](https://github.com/ClickHouse/ClickHouse/issues/32753). [#88798](https://github.com/ClickHouse/ClickHouse/pull/88798) ([Amos Bird](https://github.com/amosbird)).
* Support OUTER to INNER join conversion optimization with `join_use_nulls`. Closes [#90978](https://github.com/ClickHouse/ClickHouse/issues/90978). [#95968](https://github.com/ClickHouse/ClickHouse/pull/95968) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Improve subcolumns reading by correct sizes calculation before reading. It reduces memory usage and speeds up the subcolumns reading. [#96251](https://github.com/ClickHouse/ClickHouse/pull/96251) ([Pavel Kruglov](https://github.com/Avogar)).
* Make mark, uncompressed and page caches to use separate jemalloc arena to avoid memory fragmentation when short lived allocations, i.e., for queries and requests are mixed with longer lived allocations for caches. [#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)
* Tables with `DELETE TTL` rules can now use the vertical merge algorithm. [#97332](https://github.com/ClickHouse/ClickHouse/pull/97332) ([murphy-4o](https://github.com/murphy-4o)).
* Apply data skipping indexes during distributed index analysis. [#97767](https://github.com/ClickHouse/ClickHouse/pull/97767) ([Azat Khuzhin](https://github.com/azat)).
* Marks of secondary indexes are now prewarmed when the `prewarm_mark_cache` setting is enabled (loaded into the index mark cache during data part fetches and table startup). [#97772](https://github.com/ClickHouse/ClickHouse/pull/97772) ([Anton Popov](https://github.com/CurtizJ)).
* Reduced locking during access control. [#97894](https://github.com/ClickHouse/ClickHouse/pull/97894) ([Nikita Taranov](https://github.com/nickitat)).
* When apply\_row\_policy\_after\_final or apply\_prewhere\_after\_final is enabled, compound AND conditions in row policies and PREWHERE are now decomposed to extract sorting-key atoms for primary key index analysis. Previously, if a deferred filter contained a mix of sorting-key and non-sorting-key predicates (e.g. x > 1 AND y != 'foo'), the entire expression was excluded from index analysis. Now sorting-key atoms (like x > 1) are extracted and used for granule pruning, even from nested AND expressions. [#98513](https://github.com/ClickHouse/ClickHouse/pull/98513) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Reduce lock contention in MergeTreeBackgroundExecutor by making task resources release without acquiring the lock. Closes [#93620](https://github.com/ClickHouse/ClickHouse/issues/93620). [#98604](https://github.com/ClickHouse/ClickHouse/pull/98604) ([Dmitry Novik](https://github.com/novikd)).
* Fix excessive memory usage (\~514 MiB) during format auto-detection when reading non-Arrow data (e.g. JSON from `url` or `file` without explicit format), caused by the ArrowStream reader misinterpreting the first bytes as a huge metadata length. [#98893](https://github.com/ClickHouse/ClickHouse/pull/98893) ([Konstantin Bogdanov](https://github.com/thevar1able)).

#### Improvement

* Makes it possible to parse GeoParquet files that contain different Geo type in the same column. [#97851](https://github.com/ClickHouse/ClickHouse/pull/97851) ([Mark Needham](https://github.com/mneedham)).
* Introduce `tokensForLikePattern` SQL function that tokenizes LIKE patterns while respecting wildcard semantics: `%` and `_` are treated as wildcards, escaped wildcards (`\%`, `\_`) are treated as literals, and tokens adjacent to unescaped wildcards are discarded. [#97872](https://github.com/ClickHouse/ClickHouse/pull/97872) ([Amos Bird](https://github.com/amosbird)).
* Add a `{_schema_hash}` placeholder for the S3 table engine that inserts a hash of the table's column definitions into the S3 path. [#98265](https://github.com/ClickHouse/ClickHouse/pull/98265) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* `SymbolIndex`, `addressToSymbol`, `system.symbols`, and `buildId` now work on macOS by parsing Mach-O symbol tables. [#99014](https://github.com/ClickHouse/ClickHouse/pull/99014) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The `system.stack_trace` table now works on macOS, allowing introspection of all server thread stack traces. [#98982](https://github.com/ClickHouse/ClickHouse/pull/98982) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add per-server LDAP config option `<follow_referrals>` (default `false`) to control whether the LDAP client follows referrals. Disabling referral chasing avoids timeouts and hangs when searching from an Active Directory domain-root base DN. Referral-related log messages are moved from `warn` to `trace`. [#96765](https://github.com/ClickHouse/ClickHouse/pull/96765) ([paf91](https://github.com/paf91)).
* We now track any data skipping indices that were used during query execution in the query\_log table in a new column named `skip_indices`. Fixes [#78676](https://github.com/ClickHouse/ClickHouse/issues/78676). Original author @pheepa. [#87862](https://github.com/ClickHouse/ClickHouse/pull/87862) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* ACCESS\_DENIED hints no longer reveal column names unless the user can show all required columns; database/table names remain visible in the hint. [#91067](https://github.com/ClickHouse/ClickHouse/pull/91067) ([filimonov](https://github.com/filimonov)).
* Add a dedicated cleanup thread for MergeTree to prevent cleanup delays under heavy merge load. This resolves [#86181](https://github.com/ClickHouse/ClickHouse/issues/86181). [#91574](https://github.com/ClickHouse/ClickHouse/pull/91574) ([Amos Bird](https://github.com/amosbird)).
* Reload cluster config if IPs of local server’s hostname changed, instead of IPs of any host. Fixes [#81215](https://github.com/ClickHouse/ClickHouse/issues/81215), [#70156](https://github.com/ClickHouse/ClickHouse/issues/70156) and [#65268](https://github.com/ClickHouse/ClickHouse/issues/65268). [#93726](https://github.com/ClickHouse/ClickHouse/pull/93726) ([Zhigao Hong](https://github.com/zghong)).
* Allow optimize\_aggregators\_of\_group\_by\_keys to correctly optimize aggregate functions in GROUPING SETS queries. [#93935](https://github.com/ClickHouse/ClickHouse/pull/93935) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* Keeper-bench: report errors in metrics and generate json metrics file for --input-request-log mode. [#95748](https://github.com/ClickHouse/ClickHouse/pull/95748) ([Mohammad Lareb Zafar](https://github.com/zlareb1)).
* Add new clause ROLE to CREATE USER. [#97074](https://github.com/ClickHouse/ClickHouse/pull/97074) ([Vitaly Baranov](https://github.com/vitlibar)).
* You can now set internal\_replication settings for a cluster created by the Replicated database. [#97228](https://github.com/ClickHouse/ClickHouse/pull/97228) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* New setting `allow_nullable_tuple_in_extracted_subcolumns` controls whether extracted `Tuple(...)` subcolumns from `Tuple`, `Variant`, `Dynamic` and `JSON` are returned as `Nullable(Tuple(...))` (`NULL` for missing rows) or as `Tuple(...)` (default tuple values for missing rows). Disabled by default, this setting can only be changed by restarting the server. [#97299](https://github.com/ClickHouse/ClickHouse/pull/97299) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Add information about deferred filters as a separate item to EXPLAIN query output (when using Row Policies/PREWHERE with FINAL). Related: [#91065](https://github.com/ClickHouse/ClickHouse/pull/91065). [#97374](https://github.com/ClickHouse/ClickHouse/pull/97374) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Enable `type_json_allow_duplicated_key_with_literal_and_nested_object` by default. It allows to avoid errors about duplicated keys during parsing of JSONs like `{"a" : 42, "a" : {"b" : 42}}` that can be formatted by ClickHouse from original JSON data `{"a" : 42, "a.b" : 42}`. [#97423](https://github.com/ClickHouse/ClickHouse/pull/97423) ([Pavel Kruglov](https://github.com/Avogar)).
* Keeper improvement: `find_super_nodes` is a very useful command for debugging unexpected growth in the node count in Keeper. Unfortunately, if there are multiple super nodes, it's almost impossible to find more than one, because the command gets stuck forever traversing the children of the first encountered super node. This PR forbids traversing the children of super nodes. [#97819](https://github.com/ClickHouse/ClickHouse/pull/97819) ([pufit](https://github.com/pufit)).
* Initial completion support for `clickhouse-keeper-client`. [#97828](https://github.com/ClickHouse/ClickHouse/pull/97828) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Flush async logging buffers in case of crash. [#97836](https://github.com/ClickHouse/ClickHouse/pull/97836) ([Azat Khuzhin](https://github.com/azat)).
* Enable the impersonate feature by default (see [EXECUTE AS target\_user](/reference/statements/execute_as)). [#97870](https://github.com/ClickHouse/ClickHouse/pull/97870) ([Vitaly Baranov](https://github.com/vitlibar)).
* Improve canceling queries with SQLite table engine by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client. [#97944](https://github.com/ClickHouse/ClickHouse/pull/97944) ([Roman Vasin](https://github.com/rvasin)).
* Add server setting `jemalloc_profiler_sampling_rate` to control jemalloc's `lg_prof_sample` and expose it as `jemalloc.prof.lg_sample` asynchronous metric. [#97945](https://github.com/ClickHouse/ClickHouse/pull/97945) ([Antonio Andelic](https://github.com/antonio2368)).
* Support weights in concurrent bounded queue implementation. [#97962](https://github.com/ClickHouse/ClickHouse/pull/97962) ([Daniil Ivanik](https://github.com/divanik)).
* Add sslmode to the allowed keys for PostgreSQL dictionary sources. Previously, sslmode was not in the dictionary\_allowed\_keys allowlist in PostgreSQLDictionarySource.cpp, making it impossible to configure SSL mode for PostgreSQL dictionary connections. This prevented dictionaries from connecting to PostgreSQL servers that require SSL (e.g., AWS RDS, which enforces SSL by default), as the connection would fail TLS negotiation and the server would reject the unencrypted fallback. [#98014](https://github.com/ClickHouse/ClickHouse/pull/98014) ([mcalfin](https://github.com/mcalfin)).
* Show a clear "no such file" error when passing a non-existent file path to `clickhouse` or `clickhouse-local`, instead of a confusing generic message. [#98048](https://github.com/ClickHouse/ClickHouse/pull/98048) ([Raúl Marín](https://github.com/Algunenano)).
* Text indexes can now be built on top of `Nullable([Fixed]String)` and `Array(Nullable([Fixed]String))` columns. [#98118](https://github.com/ClickHouse/ClickHouse/pull/98118) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Avoid dropping named collections that are dependencies of dictionary sources. [#98127](https://github.com/ClickHouse/ClickHouse/pull/98127) ([Pablo Marcos](https://github.com/pamarcos)).
* Enable `grace_hash` join algorithm for queries with totals. [#98144](https://github.com/ClickHouse/ClickHouse/pull/98144) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Cancel background merges early in DROP DATABASE for ordinary shared merge tree. [#98161](https://github.com/ClickHouse/ClickHouse/pull/98161) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Improve canceling queries with MongoDB and MySQL by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client. [#98187](https://github.com/ClickHouse/ClickHouse/pull/98187) ([Roman Vasin](https://github.com/rvasin)).
* Remove NetlinkMetricsProvider and use procfs exclusively for per-thread taskstats metric collection. Netlink-based collection is problematic in containerized environments and has worse tail latency under contention. [#98229](https://github.com/ClickHouse/ClickHouse/pull/98229) ([Amos Bird](https://github.com/amosbird)).
* Refactor Iceberg manifest file handling to fix issues with manifest file caching. [#98231](https://github.com/ClickHouse/ClickHouse/pull/98231) ([Daniil Ivanik](https://github.com/divanik)).
* Now we take into account cases where the sorting key of the table can be an expression like `toDate(time)`, and can make the decisions about not-deferring expressions like this if they are part of filters. [#98237](https://github.com/ClickHouse/ClickHouse/pull/98237) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Add a new `MaxAllocatedEphemeralLockSequentialNumber` metric for the maximum sequential number allocated for ephemeral lock znodes in ZooKeeper. [#98243](https://github.com/ClickHouse/ClickHouse/pull/98243) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Update clickstack to version 2.20.0. [#98252](https://github.com/ClickHouse/ClickHouse/pull/98252) ([Aaron Knudtson](https://github.com/knudtty)).
* Added a new profile event `KeeperRequestTotalWithSubrequests` that counts each subrequest within a multi-request individually, providing better visibility into the actual Keeper workload. The existing `KeeperRequestTotal` event continues to count each multi-request as a single request. [#98348](https://github.com/ClickHouse/ClickHouse/pull/98348) ([Antonio Andelic](https://github.com/antonio2368)).
* `SYSTEM RELOAD DICTIONARIES` now reloads dictionaries in topological order so that dictionaries sourcing from other dictionaries see fresh data after reload. [#98356](https://github.com/ClickHouse/ClickHouse/pull/98356) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Restart the statistics cache after changing the MergeTree setting. [#98520](https://github.com/ClickHouse/ClickHouse/pull/98520) ([Han Fei](https://github.com/hanfei1991)).
* Only "alive" replicas (that are connectable) participate in distributed index analysis. [#98521](https://github.com/ClickHouse/ClickHouse/pull/98521) ([Azat Khuzhin](https://github.com/azat)).
* Add a setting `access_control_improvements.disallow_config_defined_profiles_for_sql_defined_users` (disabled/allowed by default) that disallows using config-defined settings profiles (except for the `default` profile) for SQL-defined users. [#98662](https://github.com/ClickHouse/ClickHouse/pull/98662) ([Alexander Tokmakov](https://github.com/tavplubix)).
* Cap the number of nodes used in the automatic parallel replicas heuristic to the actual number of nodes in the cluster (instead of only the `max_parallel_replicas` setting). [#98668](https://github.com/ClickHouse/ClickHouse/pull/98668) ([Nikita Taranov](https://github.com/nickitat)).
* Implement hedged requests and asynchronous reading for distributed index analysis. [#98724](https://github.com/ClickHouse/ClickHouse/pull/98724) ([Azat Khuzhin](https://github.com/azat)).
* Deserialization of binary `AggregateFunction` states now requires consuming the full input. If extra redundant trailing bytes are present, ClickHouse throws an exception instead of accepting malformed state data. [#98786](https://github.com/ClickHouse/ClickHouse/pull/98786) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Make TRUNCATE DATABASE respond to query cancellation. [#98828](https://github.com/ClickHouse/ClickHouse/pull/98828) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Improve `keeper-bench` with request pipelining, warmup period, per-operation stats, reproducible seeds, and better error handling. [#98906](https://github.com/ClickHouse/ClickHouse/pull/98906) ([Antonio Andelic](https://github.com/antonio2368)).
* Support SAMPLE clause in distributed index analysis. [#98931](https://github.com/ClickHouse/ClickHouse/pull/98931) ([Azat Khuzhin](https://github.com/azat)).
* Show chart title in dashboard even when query returns empty result or encounters an error. [#98975](https://github.com/ClickHouse/ClickHouse/pull/98975) ([Yash ](https://github.com/Onyx2406)).
* Analyzer error messages no longer dump all columns of a table (which could produce 150KB+ exceptions). Column lists are now capped at 10 entries. [#99002](https://github.com/ClickHouse/ClickHouse/pull/99002) ([Yash ](https://github.com/Onyx2406)).
* Properly return column stats from sub-queries with joins so that parent query can use them for join reordering. [#99096](https://github.com/ClickHouse/ClickHouse/pull/99096) ([Alexander Gololobov](https://github.com/davenger)).
* Mark ZooKeeper session as expired immediately when finalization starts, instead of waiting for the send thread to exit. This allows other threads to establish a new session without delay. [#99102](https://github.com/ClickHouse/ClickHouse/pull/99102) ([Raúl Marín](https://github.com/Algunenano)).
* Use more math functions from LLVM-libc: `exp`, `exp2`, `expm1`, `fabs`, `fabsl`, `floor`, `fmodl`, `log`, `log2`, `logf`, `pow`, `scalbn`, `scalbnl`, `copysignl`, `nan`, `nanf`, `nanl`, and the `explogxf` shared constants. [#99118](https://github.com/ClickHouse/ClickHouse/pull/99118) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Reduce memory usage and fix potential duplicate output in `system.jemalloc_profile_text` collapsed format. [#99121](https://github.com/ClickHouse/ClickHouse/pull/99121) ([Antonio Andelic](https://github.com/antonio2368)).
* Add `is_subrequest` column to `system.aggregated_zookeeper_log` to separate standalone requests from sub-requests inside Multi/MultiRead requests. Previously, sub-requests were aggregated into the same buckets as standalone requests, and since each sub-operation was logged with the total multi-request duration, the average latency became misleading. Sub-requests now have zero latency. [#99169](https://github.com/ClickHouse/ClickHouse/pull/99169) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Allow `ALTER TABLE MODIFY COLUMN x TTL ...` command without specifying column type. [#99208](https://github.com/ClickHouse/ClickHouse/pull/99208) ([Nikolay Degterinsky](https://github.com/evillique)).
* Skip stale Keeper requests for sessions that have already disconnected, avoiding unnecessary Raft round-trips. The number of tracked finished sessions is capped by the `max_finished_sessions_cache_size` coordination setting. [#99246](https://github.com/ClickHouse/ClickHouse/pull/99246) ([Antonio Andelic](https://github.com/antonio2368)).
* Support text index built on `mapValues(map)` with `IN` operator. [#99286](https://github.com/ClickHouse/ClickHouse/pull/99286) ([Anton Popov](https://github.com/CurtizJ)).
* Shell-like completion support in clickhouse keeper-client (handle completions of arguments in quotes, i.e. `'foo ba'`, handle escaped arguments, i.e. `foo\ ba`, make `ls` print quoted nodes, if they have whitespaces). [#99312](https://github.com/ClickHouse/ClickHouse/pull/99312) ([Azat Khuzhin](https://github.com/azat)).
* Prevent Keeper `mntr` command from getting stuck because of lock contention. [#99472](https://github.com/ClickHouse/ClickHouse/pull/99472) ([Antonio Andelic](https://github.com/antonio2368)).
* Reduce lock contention in Keeper dispatcher by invoking callbacks and dispatching read requests outside mutex scope, and add profiled lock guards for observability. [#99751](https://github.com/ClickHouse/ClickHouse/pull/99751) ([Antonio Andelic](https://github.com/antonio2368)).
* Tolerate missing padding at the end of the last block of parquet files. [#99857](https://github.com/ClickHouse/ClickHouse/pull/99857) ([Seva Potapov](https://github.com/seva-potapov)).

#### Bug Fix (user-visible misbehavior in an official stable release)

* Fixes how an Alias table target is saved as a DDL dependency when not fully qualified: it's now saved with the Alias table database instead of the session database. [#95175](https://github.com/ClickHouse/ClickHouse/pull/95175) ([Enric Calabuig](https://github.com/eclbg)).
* Fix wrong result or exception during reading subcolumns of ALIAS columns. [#95408](https://github.com/ClickHouse/ClickHouse/pull/95408) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix missing column when non-standard identifier alias in JOIN with old analyzer. Fixes [#25594](https://github.com/ClickHouse/ClickHouse/issues/25594), [#47288](https://github.com/ClickHouse/ClickHouse/issues/47288) and [#53263](https://github.com/ClickHouse/ClickHouse/issues/53263). [#95679](https://github.com/ClickHouse/ClickHouse/pull/95679) ([Zhigao Hong](https://github.com/zghong)).
* Fixes a crash in Kusto dialect functions `bin()`, `bin_at()`, `extract()`, and `indexof()` when empty arguments are provided. [#95736](https://github.com/ClickHouse/ClickHouse/pull/95736) ([NeedmeFordev](https://github.com/spider-yamet)).
* Forbids mounting local\_object\_storage (which is used by datalakes above local filesystem and maybe by LocalDisk) anywhere apart from user\_files\_path in clickhouse-client. [#96201](https://github.com/ClickHouse/ClickHouse/pull/96201) ([Daniil Ivanik](https://github.com/divanik)).
* In `DeltaLake` table engine fix logical race on snapshot version change, remove redundant heavy snapshot reloads. [#96226](https://github.com/ClickHouse/ClickHouse/pull/96226) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix logical error on attaching a part in MergeTree if there were several chained renames between detaching and attaching. [#96351](https://github.com/ClickHouse/ClickHouse/pull/96351) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a bug where explicit settings sent alongside `compatibility` in the same request could be silently ignored when their value matched the server default. [#97078](https://github.com/ClickHouse/ClickHouse/pull/97078) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix the client reporting `NETWORK_ERROR` instead of the actual parsing error (with the correct row number) when an INSERT with parallel parsing encounters invalid data. [#97339](https://github.com/ClickHouse/ClickHouse/pull/97339) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `sumCount` aggregate function not being able to read older serialized states after introduction of `Nullable(Tuple)`. Closes [#97370](https://github.com/ClickHouse/ClickHouse/issues/97370). [#97502](https://github.com/ClickHouse/ClickHouse/pull/97502) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix exception in tuple comparison involving `Nothing` type elements (e.g., comparing with `NULL` tuple elements) when used with `GROUPING SETS` and `ORDER BY`. [#97509](https://github.com/ClickHouse/ClickHouse/pull/97509) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix non-deterministic `uncompressed_hash` computation for Compact MergeTree parts when multiple compression codecs are used, which could cause incorrect deduplication behavior. [#97522](https://github.com/ClickHouse/ClickHouse/pull/97522) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error about missing stream during INSERT SELECT with JSON and buckets in shared data. Closes [#97331](https://github.com/ClickHouse/ClickHouse/issues/97331). [#97523](https://github.com/ClickHouse/ClickHouse/pull/97523) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `MEMORY_LIMIT_EXCEEDED` exceptions being incorrectly reported as `CORRUPTED_DATA` during SummingMergeTree and CoalescingMergeTree merges. [#97537](https://github.com/ClickHouse/ClickHouse/pull/97537) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix "Context has expired" exception for correlated subqueries containing table functions like `url()`. [#97544](https://github.com/ClickHouse/ClickHouse/pull/97544) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exceptions and incorrect behavior in `optimize_syntax_fuse_functions` with aggregate projections, Date types, and column name preservation. [#97545](https://github.com/ClickHouse/ClickHouse/pull/97545) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove incorrect `replaceRegexpOne` to `extract` query rewrite that produced wrong results when the regexp didn't match; also fix exception when `replaceRegexpOne` is used with `GROUP BY ... WITH CUBE` and `group_by_use_nulls=1`. [#97546](https://github.com/ClickHouse/ClickHouse/pull/97546) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `DROP DATABASE` with `database_atomic_wait_for_drop_and_detach_synchronously` hanging indefinitely when the query is killed. [#97586](https://github.com/ClickHouse/ClickHouse/pull/97586) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `KILL QUERY` not being able to terminate queries stuck in `WITH FILL` generation, dictionary loading via `dictGet`, or `ALTER DELETE` with `mutations_sync=1` on `ReplicatedMergeTree`. [#97589](https://github.com/ClickHouse/ClickHouse/pull/97589) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The `loop` table function was calling `inner_storage->read()` directly, bypassing the interpreter layer where row policies, column-level grants, and other security checks are applied. This allowed a user restricted by row policies to read all rows via `loop(table)` even when a direct SELECT returned zero rows. [#97682](https://github.com/ClickHouse/ClickHouse/pull/97682) ([pufit](https://github.com/pufit)).
* Fixes incorrect partition pruning in cases of using pre-epoch DateTime64 with `toDate()` function. [#97746](https://github.com/ClickHouse/ClickHouse/pull/97746) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* After this patch, `hasPartitionId` will return false if another partition with a higher partition ID exists in the data part set. [#97748](https://github.com/ClickHouse/ClickHouse/pull/97748) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Fix possible crashes during reading of empty granules in advanced shared data in JSON. Closes [#97563](https://github.com/ClickHouse/ClickHouse/issues/97563). [#97778](https://github.com/ClickHouse/ClickHouse/pull/97778) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `Cannot schedule a file` `LOGICAL_ERROR` on `INSERT` into `Distributed` due to race between `DROP` and `INSERT`. [#97822](https://github.com/ClickHouse/ClickHouse/pull/97822) ([Azat Khuzhin](https://github.com/azat)).
* Fixed ClickHouse server crash/assert in call to `mapContainsKey/mapContainsKeyLike` with `tokenbf_v1` skip index. [#97826](https://github.com/ClickHouse/ClickHouse/pull/97826) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Fix LOGICAL\_ERROR exceptions caused by `LowCardinality` inside compound types (`Variant`, `Dynamic`, `Tuple`) in `concatWithSeparator`, `format`, `IN` subqueries, `GLOBAL IN`, and joins with runtime filters. [#97831](https://github.com/ClickHouse/ClickHouse/pull/97831) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `LOGICAL_ERROR` exception `Chunk info was not set for chunk in MergingAggregatedTransform` when using `ARRAY JOIN` with `merge()` table function over multiple Distributed tables combined with `GROUP BY`. [#97838](https://github.com/ClickHouse/ClickHouse/pull/97838) ([Raúl Marín](https://github.com/Algunenano)).
* Fix server crash (`std::terminate`) caused by an uncaught exception in the HTTP connection pool destructor when the connection group hard limit is reached under high concurrency. The exception `HTTP_CONNECTION_LIMIT_REACHED` could escape `~PooledConnection` when recycling a connection back to the pool, leading to `SIGABRT`. [#97850](https://github.com/ClickHouse/ClickHouse/pull/97850) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix incorrect result when `grace_hash` algorithm is used with non-equi joins and left block cannot be processed completely because of the size constraints on the join result. [#97866](https://github.com/ClickHouse/ClickHouse/pull/97866) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix performance inefficiency in DeltaLake metadata scanning introduced in [#96686](https://github.com/ClickHouse/ClickHouse/pull/96686). [#97880](https://github.com/ClickHouse/ClickHouse/pull/97880) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix data race in ZooKeeper client between sendThread and receiveThread. [#97887](https://github.com/ClickHouse/ClickHouse/pull/97887) ([Pablo Marcos](https://github.com/pamarcos)).
* Fixes a bug where it was not possible to use CTE with distributed insert selects. Continuation of [https://github.com/ClickHouse/ClickHouse/pull/87789](https://github.com/ClickHouse/ClickHouse/pull/87789). Closes [#95837](https://github.com/ClickHouse/ClickHouse/issues/95837). [#97889](https://github.com/ClickHouse/ClickHouse/pull/97889) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix exception from `CachedOnDiskReadBufferFromFile::readBigAt`. Closes [#97325](https://github.com/ClickHouse/ClickHouse/issues/97325). [#97890](https://github.com/ClickHouse/ClickHouse/pull/97890) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix `LOGICAL_ERROR` exception in `Alias` engine with materialized columns due to column mismatch. Closes [#97907](https://github.com/ClickHouse/ClickHouse/issues/97907). [#97921](https://github.com/ClickHouse/ClickHouse/pull/97921) ([Kai Zhu](https://github.com/nauu)).
* Fix Keeper data loss after restart when using Azure Blob Storage with `s3_plain` metadata for log storage. [#97987](https://github.com/ClickHouse/ClickHouse/pull/97987) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix JIT miscompilation of `sign` function for integer types wider than `Int8` — values outside the -128..127 range could produce incorrect sign. [#98012](https://github.com/ClickHouse/ClickHouse/pull/98012) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed `DUPLICATE_COLUMN` exception and silent NULLs when reading Delta Lake tables that use column mapping "name" mode with struct fields whose names contain dots (e.g. ``STRUCT<`a.foo`: STRING, `b.foo`: STRING>``). [#98013](https://github.com/ClickHouse/ClickHouse/pull/98013) ([Caio Ishizaka Costa](https://github.com/ch-caioishizaka)).
* Fix mutation after lightweight update and secondary indices. [#98044](https://github.com/ClickHouse/ClickHouse/pull/98044) ([Raúl Marín](https://github.com/Algunenano)).
* Fix incorrect result of FINAL queries when mixing primary key and non primary key skip indexes. [#98097](https://github.com/ClickHouse/ClickHouse/pull/98097) ([Raúl Marín](https://github.com/Algunenano)).
* Enforce READ ON FILE checks for scalar file() and DESCRIBE TABLE file(). [#98115](https://github.com/ClickHouse/ClickHouse/pull/98115) ([Nikolay Degterinsky](https://github.com/evillique)).
* Fixes a crash where querying files with a glob pattern (e.g., `file('dir/**', 'LineAsString')`) would throw an unhandled filesystem exception (`STD_EXCEPTION`) if the directory contained a dangling symlink. Dangling symlinks are now silently skipped, and the query returns results from all valid files. [#98143](https://github.com/ClickHouse/ClickHouse/pull/98143) ([Mark Andreev](https://github.com/mrk-andreev)).
* Fix segfault in query plan optimization when converting outer join to inner join with `arrayJoin` in filter expression. [#98147](https://github.com/ClickHouse/ClickHouse/pull/98147) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `ProtobufList` format not working with Kafka engine due to read state not being reset between messages. [#98151](https://github.com/ClickHouse/ClickHouse/pull/98151) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error with analyzer\_compatibility\_join\_using\_top\_level\_identifier and ARRAY JOIN, closes [#98164](https://github.com/ClickHouse/ClickHouse/issues/98164). [#98179](https://github.com/ClickHouse/ClickHouse/pull/98179) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Set `Watch` component for watch responses in `aggregated_zookeeper_log` instead of leaving it empty. [#98202](https://github.com/ClickHouse/ClickHouse/pull/98202) ([Antonio Andelic](https://github.com/antonio2368)).
* If the partition key columns are not covered by the sorting key, then partition pruning could incorrectly skip partitions containing rows that should "win" during FINAL deduplication. [#98242](https://github.com/ClickHouse/ClickHouse/pull/98242) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix logical error "Bad cast from type DB::ColumnConst to DB::ColumnArray" in `kql_array_sort_asc`/`kql_array_sort_desc` when called with constant array arguments. [#98251](https://github.com/ClickHouse/ClickHouse/pull/98251) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix out-of-bounds access in `ColumnConst::getExtremes` that could cause a crash when `extremes = 1` is enabled. [#98263](https://github.com/ClickHouse/ClickHouse/pull/98263) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix potential deadlock when two concurrent `MOVE PARTITION` operations work with the same pair of tables in opposite directions. [#98264](https://github.com/ClickHouse/ClickHouse/pull/98264) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* HTTP server now returns an error message in the response body for 400 Bad Request responses caused by malformed headers, instead of an empty body. [#98268](https://github.com/ClickHouse/ClickHouse/pull/98268) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix wrong results with distributed index analysis (experimental feature) and query condition cache. [#98269](https://github.com/ClickHouse/ClickHouse/pull/98269) ([Azat Khuzhin](https://github.com/azat)).
* Fixed LOGICAL\_ERROR exception "Invalid binary search result in `MergeTreeSetIndex`" triggered by `toDate` conversion on key columns with data crossing the 65535 boundary. [#98276](https://github.com/ClickHouse/ClickHouse/pull/98276) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception when a RIGHT JOIN wrapped in a CROSS JOIN is swapped by the `query_plan_join_swap_table` optimization in the legacy join step code path. [#98279](https://github.com/ClickHouse/ClickHouse/pull/98279) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Validate corrupted data during `DDSketch` deserialization to prevent segfaults, exceptions, infinite loops, and OOM when reading corrupted `quantilesDD` aggregate function states. [#98284](https://github.com/ClickHouse/ClickHouse/pull/98284) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR "Trying to execute PLACEHOLDER action" when correlated columns from outer queries are referenced inside lambda functions such as `arrayMap`. [#98285](https://github.com/ClickHouse/ClickHouse/pull/98285) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error exception in `caseWithExpression` when `CASE` expression involves `materialize(NULL)` or other `Nullable(Nothing)` arguments. [#98290](https://github.com/ClickHouse/ClickHouse/pull/98290) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix bad cast exception when filtering `_table` virtual column in `merge` table function. [#98291](https://github.com/ClickHouse/ClickHouse/pull/98291) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix sporadic deduplication failure where re-inserts were incorrectly deduplicated due to inconsistent cleanup ordering between `blocks/` and `deduplication_hashes/` ZooKeeper directories. [#98293](https://github.com/ClickHouse/ClickHouse/pull/98293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when `ORDER BY ... WITH FILL` is used together with `LIMIT BY`. [#98361](https://github.com/ClickHouse/ClickHouse/pull/98361) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix silent data corruption when inserting a Parquet/Arrow `Date` column into an `Enum` column — now properly rejects the incompatible type conversion instead of storing invalid enum values. [#98364](https://github.com/ClickHouse/ClickHouse/pull/98364) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when reading an Arrow file with `Array` column into a table with `Nested` column. [#98365](https://github.com/ClickHouse/ClickHouse/pull/98365) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `MATERIALIZE INDEX` and `MATERIALIZE PROJECTION` mutations getting stuck when the index or projection is dropped before the mutation finishes. [#98369](https://github.com/ClickHouse/ClickHouse/pull/98369) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when reading from `Nullable(Tuple(...))` where a Tuple element name collides with the Nullable `null` subcolumn. [#98372](https://github.com/ClickHouse/ClickHouse/pull/98372) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "Column ... query tree node does not have valid source node" when joining a `Merge` table (wrapping a `Distributed` table) with another table. [#98376](https://github.com/ClickHouse/ClickHouse/pull/98376) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect Parquet `Bool` to `FixedString` conversion in native V3 reader that produced raw bytes instead of string representation. [#98378](https://github.com/ClickHouse/ClickHouse/pull/98378) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `tryGetColumnDescription` to filter subcolumns by parent column kind, consistent with other column lookup methods. [#98391](https://github.com/ClickHouse/ClickHouse/pull/98391) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Accept base64 credentials without padding in HTTP Basic Auth. Some HTTP clients omit trailing `=` padding in the `Authorization: Basic` header, which previously caused authentication failures. [#98392](https://github.com/ClickHouse/ClickHouse/pull/98392) ([Amos Bird](https://github.com/amosbird)).
* Fix incorrect partition pruning results after merging parts with `Nullable` partition key columns, caused by wrong min-max index bounds. [#98405](https://github.com/ClickHouse/ClickHouse/pull/98405) ([Amos Bird](https://github.com/amosbird)).
* Fix rare exception in the pipeline executor, that could manifest as a `Received signal 6` (only in debug builds), when pipeline expansion races with query cancellation. [#98428](https://github.com/ClickHouse/ClickHouse/pull/98428) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "Column identifier is already registered" when `count_distinct_optimization` is used with a `QUALIFY` clause. [#98433](https://github.com/ClickHouse/ClickHouse/pull/98433) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "cannot be inside Nullable type" when using `IN`/`NOT IN` with `LowCardinality` column arguments (e.g. `a NOT IN (b)` where `a` is `LowCardinality(String)`). [#98443](https://github.com/ClickHouse/ClickHouse/pull/98443) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Pipeline stuck" exception in `full_sorting_merge` joins caused by a deadlock in `PingPongProcessor` when the `FilterBySetOnTheFly` optimization created a circular dependency with `MergeJoinTransform`. [#98454](https://github.com/ClickHouse/ClickHouse/pull/98454) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception "Projection cannot increase the number of rows in a block" when merging parts with TTL that deletes all rows and an aggregate projection with a constant `GROUP BY` key. [#98458](https://github.com/ClickHouse/ClickHouse/pull/98458) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error exception when `CROSS JOIN` is used together with `INNER JOIN USING`. [#98459](https://github.com/ClickHouse/ClickHouse/pull/98459) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix null pointer dereference in `dictGetOrDefault` when the key argument is `Nullable`. [#98460](https://github.com/ClickHouse/ClickHouse/pull/98460) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception in `DISTINCT` queries when using aggregate projections and `materialize` causes `LowCardinality` type differences between the query and the projection. [#98462](https://github.com/ClickHouse/ClickHouse/pull/98462) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR exception when `arrayJoin` is used in a filter expression with OUTER JOIN and `join_use_nulls` enabled. [#98464](https://github.com/ClickHouse/ClickHouse/pull/98464) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error exception "Replica decided to read in WithOrder mode, not in ReverseOrder" when using parallel replicas with `optimize_aggregation_in_order`. [#98467](https://github.com/ClickHouse/ClickHouse/pull/98467) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed ClickHouse Keeper disconnecting Java ZooKeeper clients after `addWatch` request. The Java client expects a 4-byte `ErrorResponse` body in the `addWatch` response, but Keeper was sending an empty body, causing `EOFException` and session disconnect. This broke Apache Curator's `CuratorCache` and any Java application using persistent watches. Fixes [#98079](https://github.com/ClickHouse/ClickHouse/issues/98079). [#98499](https://github.com/ClickHouse/ClickHouse/pull/98499) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix `zk_followers` and `zk_synced_followers` Keeper metrics not decreasing when a follower goes down. Add new `zk_learners` and `zk_synced_non_voting_followers` metrics to the `mntr` four-letter-word command. Fixes [#54173](https://github.com/ClickHouse/ClickHouse/issues/54173). [#98504](https://github.com/ClickHouse/ClickHouse/pull/98504) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix a LOGICAL\_ERROR exception in `renameAndCommitEmptyParts` that could occur when `TRUNCATE TABLE` runs concurrently with `OPTIMIZE TABLE` using MergeTree transactions. [#98508](https://github.com/ClickHouse/ClickHouse/pull/98508) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed Keeper's secure raft port ignoring `cipherList` and `dhParamsFile` from `openSSL` configuration, always using defaults instead of user-specified values. Close [#51188](https://github.com/ClickHouse/ClickHouse/issues/51188). [#98509](https://github.com/ClickHouse/ClickHouse/pull/98509) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixed misleading Keeper log messages like "Receiving request for session X took 9963 ms" where the reported time was actually spent waiting idle in `poll()` between heartbeats, not performing the operation itself. Fixes [#79026](https://github.com/ClickHouse/ClickHouse/issues/79026). [#98510](https://github.com/ClickHouse/ClickHouse/pull/98510) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix unexpected result with read\_in\_order\_use\_virtual\_row and monotonic functions, close [#97837](https://github.com/ClickHouse/ClickHouse/issues/97837). [#98514](https://github.com/ClickHouse/ClickHouse/pull/98514) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix `LOGICAL_ERROR: Not-ready Set is passed as the second argument for function 'in'` when using `PREWHERE` with `IN` subquery on MergeTree tables. [#98522](https://github.com/ClickHouse/ClickHouse/pull/98522) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix Keeper TCP connections preventing graceful server shutdown by not responding to shutdown signal. [#98525](https://github.com/ClickHouse/ClickHouse/pull/98525) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "Sorting column wasn't found in the ActionsDAG's outputs" when `query_plan_convert_join_to_in` is enabled with `query_plan_merge_expressions = 0`. [#98526](https://github.com/ClickHouse/ClickHouse/pull/98526) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix MongoDB dictionary source failing with named collections. Closes [#97840](https://github.com/ClickHouse/ClickHouse/issues/97840). [#98528](https://github.com/ClickHouse/ClickHouse/pull/98528) ([Pablo Marcos](https://github.com/pamarcos)).
* Fixed LOGICAL\_ERROR when Identifier is empty after parameter substitution. [#98530](https://github.com/ClickHouse/ClickHouse/pull/98530) ([Pervakov Grigorii](https://github.com/GrigoryPervakov)).
* Fix pipeline deadlock when using `sort_overflow_mode = 'break'` together with window functions. [#98543](https://github.com/ClickHouse/ClickHouse/pull/98543) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix column rollback in Buffer engine during handling an exception during appending a new block. Old logic could lead to corrupted in-memory state of columns. [#98551](https://github.com/ClickHouse/ClickHouse/pull/98551) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed exception `Bad cast from type ColumnConst to ColumnDynamic` in null-safe comparison (`<=>` / `IS NOT DISTINCT FROM`) with const `Dynamic` or `Variant` columns and `NULL`. Also fixed `IS DISTINCT FROM` with `Dynamic`/`Variant` vs `NULL` always incorrectly returning 0. [#98553](https://github.com/ClickHouse/ClickHouse/pull/98553) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed usage of the text index with other skip indexes. Previously, logical errors such as "Trying to get non-existing mark" could be thrown when a query filter utilized a text index and other regular skip indexes simultaneously. [#98555](https://github.com/ClickHouse/ClickHouse/pull/98555) ([Anton Popov](https://github.com/CurtizJ)).
* Fix logical error "TABLE\_FUNCTION is not allowed in expression context" when a table function with an alias appears multiple times in the same query scope (e.g. in both `PREWHERE` and `QUALIFY` clauses). [#98557](https://github.com/ClickHouse/ClickHouse/pull/98557) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix distributed index analysis with expressions (not just columns) in PK (leads to zero filtering of redundant granules on remote replicas). [#98561](https://github.com/ClickHouse/ClickHouse/pull/98561) ([Azat Khuzhin](https://github.com/azat)).
* Disallow dropping column when its subcolumns are used in other columns default/alias expressions and use analyzer for default expressions on alter drop column. [#98569](https://github.com/ClickHouse/ClickHouse/pull/98569) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Fix S3 requests being incorrectly retried on non-retryable errors (including `HTTP_CONNECTION_LIMIT_REACHED`) in the HTTP client. [#98598](https://github.com/ClickHouse/ClickHouse/pull/98598) ([Sema Checherinda](https://github.com/CheSema)).
* Fixes a decimal overflow when partition pruning with DateTime64. [#98628](https://github.com/ClickHouse/ClickHouse/pull/98628) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix two bugs in JIT expression compilation: a copy-paste error in `nativeCast` type checking that made integer-to-integer and float-to-float cast branches unreachable, and incorrect `nullptr` TargetMachine passed to LLVM `PassBuilder` preventing target-specific optimization passes from being registered. [#98660](https://github.com/ClickHouse/ClickHouse/pull/98660) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix RBAC bypass that allowed users to DESCRIBE any table via `remote()`, `remoteSecure()`, `cluster()`, or `clusterAllReplicas()` pointed at localhost, without requiring `SHOW_COLUMNS` privilege. [#98669](https://github.com/ClickHouse/ClickHouse/pull/98669) ([pufit](https://github.com/pufit)).
* Fix `BAD_GET` exception and incorrect query results when a non-boolean expression (e.g. `sin(col)`) is used in both WHERE and SELECT with a JOIN, due to filter push-down optimization corrupting shared DAG nodes. [#98681](https://github.com/ClickHouse/ClickHouse/pull/98681) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR "Replica decided to read in Default mode, not in WithOrder" when using `read_in_order_through_join` with parallel replicas. [#98685](https://github.com/ClickHouse/ClickHouse/pull/98685) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "Bad cast from type `DB::TableFunctionNode` to `DB::QueryNode`" when using `input` table function as an argument of `remote`. [#98694](https://github.com/ClickHouse/ClickHouse/pull/98694) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix outdated data parts resurrection caused by incorrectly cleaning up empty covering parts. [#98698](https://github.com/ClickHouse/ClickHouse/pull/98698) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fix exception in `LogicalExpressionOptimizerPass` when a boolean function in an `equals` comparison returns a `Variant` type. [#98712](https://github.com/ClickHouse/ClickHouse/pull/98712) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `parseDateTimeBestEffort` incorrectly parsing words starting with month/weekday prefixes. Closes [#97965](https://github.com/ClickHouse/ClickHouse/issues/97965). [#98742](https://github.com/ClickHouse/ClickHouse/pull/98742) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `UNKNOWN_IDENTIFIER` exception when querying `merge()` table function or `Merge` engine over tables with JSON columns that have different parameters (e.g. different `SKIP` fields) and ALIAS columns referencing JSON sub-paths, with the new analyzer enabled. Closes [#97812](https://github.com/ClickHouse/ClickHouse/issues/97812). [#98753](https://github.com/ClickHouse/ClickHouse/pull/98753) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `optimize_skip_unused_shards` optimization with the analyzer in case `Distributed` storage is used in a `View`. [#98754](https://github.com/ClickHouse/ClickHouse/pull/98754) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Fix tuple subcolumn access by name (e.g. `SELECT x.a` for `Tuple(a UUID, b Int32)`) for external tables passed via `--external` in `clickhouse-client`. Closes [#96925](https://github.com/ClickHouse/ClickHouse/issues/96925). [#98755](https://github.com/ClickHouse/ClickHouse/pull/98755) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix `reverseUTF8` exception on invalid (truncated) UTF-8 input. [#98770](https://github.com/ClickHouse/ClickHouse/pull/98770) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix detecting set skip index usefulness with OR with false (i.e. or(x, 0)) predicate. [#98776](https://github.com/ClickHouse/ClickHouse/pull/98776) ([Azat Khuzhin](https://github.com/azat)).
* Fix a `LOGICAL_ERROR` exception (Block structure mismatch in `removeUnusedColumns`) that could occur with `FINAL` + `PREWHERE` + constant `WHERE` expression + column-independent aggregates like `count()`. [#98778](https://github.com/ClickHouse/ClickHouse/pull/98778) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Make `system.trace_log` entries for ClickHouse dictionaries' auto-reloads have non-empty query IDs. [#98784](https://github.com/ClickHouse/ClickHouse/pull/98784) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fixes a crash where we could de-reference a null pointer in system tables created between the time when we snapshot the tables in the `IDatabaseTablesIterator::table()` call and the tables changing in another thread during later iteration. [#98792](https://github.com/ClickHouse/ClickHouse/pull/98792) ([Grant Holly](https://github.com/grantholly-clickhouse)).
* Fix `SYSTEM START REPLICATED VIEW` not waking up the refresh task. [#98797](https://github.com/ClickHouse/ClickHouse/pull/98797) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix exception "Inconsistent table names" when using `view()` table function containing JOINs inside another JOIN (only with old analyzer). [#98809](https://github.com/ClickHouse/ClickHouse/pull/98809) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix adjusting RLIMIT\_SIGPENDING (via pending\_signals). [#98829](https://github.com/ClickHouse/ClickHouse/pull/98829) ([Azat Khuzhin](https://github.com/azat)).
* Fix exception when composing `loop` with cluster table functions. [#98860](https://github.com/ClickHouse/ClickHouse/pull/98860) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* LEFT ANTI JOIN with multiple join key columns returned wrong results when `enable_join_runtime_filters=1` (which is default). [#98871](https://github.com/ClickHouse/ClickHouse/pull/98871) ([Alexander Gololobov](https://github.com/davenger)).
* Fix `WITH FILL STALENESS` producing extra filled rows when data is read in multiple chunks (e.g., with small `index_granularity`). [#98895](https://github.com/ClickHouse/ClickHouse/pull/98895) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "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)).
* Fix memory tracking drift caused by failed allocations not being rolled back, `nallocx(0)` undefined behavior, and off-by-one in global peak tracking. Extend tracking to cover `io_uring` ring buffers. [#98915](https://github.com/ClickHouse/ClickHouse/pull/98915) ([Antonio Andelic](https://github.com/antonio2368)).
* Forbid attaching to local data lake tables outside user paths, not only creating them. [#98936](https://github.com/ClickHouse/ClickHouse/pull/98936) ([Daniil Ivanik](https://github.com/divanik)).
* Fix a race condition that could cause a "ReadBuffer is canceled" exception in queries using `urlCluster` or similar cluster table functions. [#98955](https://github.com/ClickHouse/ClickHouse/pull/98955) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception in financial functions (`financialNetPresentValue`, `financialInternalRateOfReturn`, etc.) when `BFloat16` type arguments are passed. [#98958](https://github.com/ClickHouse/ClickHouse/pull/98958) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix skip indexes (and primary key conditions) not being applied for ALIAS columns when query plan expression merging is disabled (query\_plan\_merge\_expressions = 0 or query\_plan\_enable\_optimizations = 0). [#98960](https://github.com/ClickHouse/ClickHouse/pull/98960) ([Peng](https://github.com/fastio)).
* Increment `InsertQuery` ProfileEvent for async inserts. Closes [#98626](https://github.com/ClickHouse/ClickHouse/issues/98626). [#98962](https://github.com/ClickHouse/ClickHouse/pull/98962) ([Narasimha Pakeer](https://github.com/npakeer)).
* Fix exception "Inconsistent KeyCondition behavior" in debug builds when primary key contains NaN float values, by making `accurateLess` and `accurateEquals` handle NaN consistently with ClickHouse sort order. Closes [#98075](https://github.com/ClickHouse/ClickHouse/issues/98075). [#98964](https://github.com/ClickHouse/ClickHouse/pull/98964) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* SummingMergeTree no longer sums Bool (and other domain type) columns. Bool values are kept as-is instead of being arithmetically summed. [#98976](https://github.com/ClickHouse/ClickHouse/pull/98976) ([Yash ](https://github.com/Onyx2406)).
* Fixes an exception Scalar doesn't exist that occurred when querying a remote shard with `optimize_const_name_size` set and `enable_scalar_subquery_optimization` = 0. Large constants replaced with `__getScalar` references in the remote query were not being sent to the shard, causing the query to fail. [#98979](https://github.com/ClickHouse/ClickHouse/pull/98979) ([andriibeee](https://github.com/andriibeee)).
* Fix `NOT_FOUND_COLUMN_IN_BLOCK` for some queries with `GROUP BY` and expressions that include inverse dictionary lookup, `Date/DateTime` conversion comparisons, and tuple comparisons. Closes [#98888](https://github.com/ClickHouse/ClickHouse/issues/98888). [#98980](https://github.com/ClickHouse/ClickHouse/pull/98980) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fixed undefined behavior (null pointer dereference) when altering a version/sign/is\_deleted column to `EPHEMERAL` or `ALIAS` in MergeTree engines. Such alterations are now properly rejected. [#98985](https://github.com/ClickHouse/ClickHouse/pull/98985) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed an issue where `system.grants` omitted the regular expression parameters for `URL` and `S3` grants in the `access_object` column. [#98987](https://github.com/ClickHouse/ClickHouse/pull/98987) ([DQ](https://github.com/il9ue)).
* Fixed Iceberg BigLake reads: ADC credentials are now forwarded to the GCS S3 client (fixing 403 errors), OAuth2 credentials are URL-encoded before sending (fixing auth failures for tokens with special characters), and namespace traversal no longer aborts on BigLake HTTP 400 responses. [#98998](https://github.com/ClickHouse/ClickHouse/pull/98998) ([Nikita Fomichev](https://github.com/fm4v)).
* Fixed `clickhouse-client` failing to switch timezone when `TZ` environment variable uses POSIX file path syntax (e.g. `TZ=:/etc/localtime`). [#99000](https://github.com/ClickHouse/ClickHouse/pull/99000) ([Yash ](https://github.com/Onyx2406)).
* Fix incorrect or less pruning when `startsWith`, `LIKE`, `NOT LIKE` used with `FixedString` column. Additionally, `FixedString` to `String` cast function can now prune granules when wrapped around key column. Closes [#98940](https://github.com/ClickHouse/ClickHouse/issues/98940). [#99001](https://github.com/ClickHouse/ClickHouse/pull/99001) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fixed `windowFunnel` with `strict_deduplication` returning incorrect level when a duplicate event was encountered. [#99003](https://github.com/ClickHouse/ClickHouse/pull/99003) ([Yash ](https://github.com/Onyx2406)).
* Fixes a bug where EXISTS would ignore LIMIT and OFFSET clauses in subqueries, causing incorrect results when the subquery returned no rows due to an offset or a zero limit. Closes [#88722](https://github.com/ClickHouse/ClickHouse/issues/88722). [#99005](https://github.com/ClickHouse/ClickHouse/pull/99005) ([andriibeee](https://github.com/andriibeee)).
* Fix "Block structure mismatch" exception when filter push-down optimization encounters an AND expression that short-circuits to a constant with `GROUPING SETS`. [#99010](https://github.com/ClickHouse/ClickHouse/pull/99010) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when reading patch parts (lightweight updates) without `_part_offset` column in the query plan. [#99023](https://github.com/ClickHouse/ClickHouse/pull/99023) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* A query like `SELECT * FROM table WHERE pk_id = ''` where `pk_id` is the primary key and of `String` type will now correctly use the primary key index for filtering granules. [#99027](https://github.com/ClickHouse/ClickHouse/pull/99027) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Fix `DEPENDENCIES_NOT_FOUND` exception in Kafka engine when materialized view is detached while the background thread is streaming data. [#99028](https://github.com/ClickHouse/ClickHouse/pull/99028) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception when creating a table with an `EPHEMERAL` column that has the same name as a virtual column (e.g., `_part_offset`). [#99031](https://github.com/ClickHouse/ClickHouse/pull/99031) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix misleading "inflate failed: buffer error" when reading non-existent compressed files via `url()` table function with glob patterns. Now returns empty result as expected when `http_skip_not_found_url_for_globs` is enabled. [#99034](https://github.com/ClickHouse/ClickHouse/pull/99034) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix server crash (std::terminate) when executing `ALTER TABLE ... DROP PART` on a patch part after a schema change (e.g. ADD COLUMN). The crash was caused by missing system columns (`_part`) in the empty coverage part metadata, leading to an uncaught exception inside a NOEXCEPT\_SCOPE. [#99036](https://github.com/ClickHouse/ClickHouse/pull/99036) ([Peng](https://github.com/fastio)).
* ClickHouse server process could crash if there was a memory limit exceeded exception thrown during a *cached disk read*. That is now fixed. [#99042](https://github.com/ClickHouse/ClickHouse/pull/99042) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Fix `LOGICAL_ERROR` when querying a table that has both a ROW POLICY and an ALIAS column using `dictGet`. The issue was caused by premature access to the table expression during ALIAS column resolution in the new analyzer. [#99065](https://github.com/ClickHouse/ClickHouse/pull/99065) ([Peng](https://github.com/fastio)).
* Fix out of bounds error when user tries to query only virtual columns from Iceberg table with Avro format for data. It's super rare scenario so not marking it as critical. Fixes [#88238](https://github.com/ClickHouse/ClickHouse/issues/88238). [#99080](https://github.com/ClickHouse/ClickHouse/pull/99080) ([alesapin](https://github.com/alesapin)).
* Fix segfault in recursive CTE with `remote()` + `view()`. [#99081](https://github.com/ClickHouse/ClickHouse/pull/99081) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Skip unnecessary extra index analysis when read-in-order optimization is applied. [#99084](https://github.com/ClickHouse/ClickHouse/pull/99084) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fixed a crash triggered by a memory limit exception thrown during patch part application. [#99086](https://github.com/ClickHouse/ClickHouse/pull/99086) ([Anton Popov](https://github.com/CurtizJ)).
* Fix debug assertion in `DDLWorker` caused by stale `first_failed_task_name` after a ZooKeeper entry is deleted during reinitialization recovery. [#99099](https://github.com/ClickHouse/ClickHouse/pull/99099) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixed rebuild of text indexes on merges with TTL. [#99107](https://github.com/ClickHouse/ClickHouse/pull/99107) ([Anton Popov](https://github.com/CurtizJ)).
* Fix crash in `ALTER TABLE ... REMOVE SETTINGS` query for Iceberg table engine. Fixes [#86330](https://github.com/ClickHouse/ClickHouse/issues/86330). [#99108](https://github.com/ClickHouse/ClickHouse/pull/99108) ([alesapin](https://github.com/alesapin)).
* Fixes a bug in `query_plan_convert_any_join_to_semi_or_anti_join` optimization, returning an incorrect result for unmatched rows. Related: [https://github.com/ClickHouse/ClickHouse/pull/95995](https://github.com/ClickHouse/ClickHouse/pull/95995). [#99112](https://github.com/ClickHouse/ClickHouse/pull/99112) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix LOGICAL\_ERROR exception in `ASTColumnsExceptTransformer::transform`. [#99119](https://github.com/ClickHouse/ClickHouse/pull/99119) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix RBAC bypass that allowed users to obtain table structure via `DESCRIBE TABLE` or `CREATE TABLE AS` on table functions (`mysql()`, `postgresql()`, `sqlite()`, `arrowFlight()`, `jdbc()`, `odbc()`, etc.) without the required source access privileges. For functions that infer schema from remote servers, this also allowed triggering outbound connections (SSRF) without authorization. [#99122](https://github.com/ClickHouse/ClickHouse/pull/99122) ([pufit](https://github.com/pufit)).
* Fix Keeper crash (segfault in NuRaft) during dynamic reconfiguration and leadership transfer. [#99133](https://github.com/ClickHouse/ClickHouse/pull/99133) ([JIaQi Tang](https://github.com/JiaQiTang98)).
* Fix crash on usage of Buffer table with SAMPLE when destination does not support it. [#99141](https://github.com/ClickHouse/ClickHouse/pull/99141) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix LOGICAL\_ERROR due to patch parts column order mismatch. [#99164](https://github.com/ClickHouse/ClickHouse/pull/99164) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix very rare crash when Iceberg table contains files of mixed format (ORC and Parquet). Fixes [#88126](https://github.com/ClickHouse/ClickHouse/issues/88126). [#99168](https://github.com/ClickHouse/ClickHouse/pull/99168) ([alesapin](https://github.com/alesapin)).
* Fix max\_execution\_time not being applied for backup/restore. [#99205](https://github.com/ClickHouse/ClickHouse/pull/99205) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix `insert_deduplication_token` being silently ignored for `INSERT SELECT` queries without `ORDER BY ALL`. Previously, deduplication was disabled entirely for unsorted `INSERT SELECT`, even when an explicit user token was provided. Now, providing `insert_deduplication_token` is sufficient to enable deduplication regardless of `ORDER BY ALL`. [#99206](https://github.com/ClickHouse/ClickHouse/pull/99206) ([Desel72](https://github.com/Desel72)).
* Fix excessive access checks during `InverseDictionaryLookupPass` optimization by checking `CREATE_TEMPORARY_TABLE` grant once before the pass instead of for every visited node. [#99210](https://github.com/ClickHouse/ClickHouse/pull/99210) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Fix `clickhouse format --obfuscate` producing invalid SQL by obfuscating skip index types, compression codec names, database engine names, and dictionary layout/source definitions. [#99260](https://github.com/ClickHouse/ClickHouse/pull/99260) ([Raúl Marín](https://github.com/Algunenano)).
* Fixed a bug where, in some cases, comparing between Time\[64] and DateTime\[64] types was confusing; now, in cases like this, Time\[64] values are promoted to DateTime\[64] by adding the `1970-01-01` as a date part. [#99267](https://github.com/ClickHouse/ClickHouse/pull/99267) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Clamp settings constraints in DDL worker for distributed DDL queries. [#99317](https://github.com/ClickHouse/ClickHouse/pull/99317) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix minor issues with TOTP authentication: the `--one-time-password` CLI option with empty password, validation of `<digits>` and `<period>` configuration values. [#99322](https://github.com/ClickHouse/ClickHouse/pull/99322) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix logical error `unordered_map::at: key not found` in Avro output format when serializing `Enum8`/`Enum16` columns with values not present in the enum definition. [#99332](https://github.com/ClickHouse/ClickHouse/pull/99332) ([Desel72](https://github.com/Desel72)).
* Fix CHECK TABLE with sparse serialization inside Tuple with Dynamic. Closes [#96588](https://github.com/ClickHouse/ClickHouse/issues/96588). [#99351](https://github.com/ClickHouse/ClickHouse/pull/99351) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed too strict validation of text index preprocessor. [#99359](https://github.com/ClickHouse/ClickHouse/pull/99359) ([Anton Popov](https://github.com/CurtizJ)).
* Fix compatibility when upgrading replicated tables with implicit minmax indices from 25.10 to newer versions. [#99392](https://github.com/ClickHouse/ClickHouse/pull/99392) ([Raúl Marín](https://github.com/Algunenano)).
* Removed support for negated functions (`notEquals`, `notLike`, `notIn`) in text index analysis. These functions could never skip any granules, so analyzing the index for them only added overhead without any benefit. [#99393](https://github.com/ClickHouse/ClickHouse/pull/99393) ([Anton Popov](https://github.com/CurtizJ)).
* Fix `optimize_skip_unused_shards` with a new analyzer for the case when a `Distributed` table was used inside an IN subquery. [#99436](https://github.com/ClickHouse/ClickHouse/pull/99436) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Fix heap-use-after-free in `INTERSECT`/`EXCEPT` when the query produces duplicate column names. [#99471](https://github.com/ClickHouse/ClickHouse/pull/99471) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error in `ALTER TABLE ... DROP PART` when a typed query parameter is used for the part name. [#99489](https://github.com/ClickHouse/ClickHouse/pull/99489) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed `NOT_FOUND_COLUMN_IN_BLOCK` exception when a text index predicate (e.g. `hasAllTokens`) is referenced in both `SELECT` and `WHERE` clauses via an alias. [#99504](https://github.com/ClickHouse/ClickHouse/pull/99504) ([Anton Popov](https://github.com/CurtizJ)).
* Fix incorrect results when using `hasAllTokens` with OR across columns that have separate text indexes. [#99505](https://github.com/ClickHouse/ClickHouse/pull/99505) ([Anton Popov](https://github.com/CurtizJ)).
* Initialize page cache in `clickhouse-local` so that `page_cache_max_size` setting takes effect. [#99510](https://github.com/ClickHouse/ClickHouse/pull/99510) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed rare incorrect marking of a data part as broken and detaching it after `DETACH/ATTACH TABLE` query. [#99529](https://github.com/ClickHouse/ClickHouse/pull/99529) ([Anton Popov](https://github.com/CurtizJ)).
* Fix `std::length_error` exception when querying empty system tables with Pretty format via HTTP interface. [#99541](https://github.com/ClickHouse/ClickHouse/pull/99541) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` when using `ALTER TABLE ADD COLUMN` to create an `EPHEMERAL` column with the same name as a virtual column (e.g. `_part_offset`). [#99549](https://github.com/ClickHouse/ClickHouse/pull/99549) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `VectorSimilarityIndexCache` entries never being evicted after part removal due to mismatched cache keys. [#99575](https://github.com/ClickHouse/ClickHouse/pull/99575) ([Seva Potapov](https://github.com/seva-potapov)).
* Forbid reading Google credentials from a local file. This setting is insecure because it allows reading other credentials if the file path is known. [#99584](https://github.com/ClickHouse/ClickHouse/pull/99584) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix performance degradation in the analyzer. Prune unused columns from ARRAY JOIN. [#99587](https://github.com/ClickHouse/ClickHouse/pull/99587) ([Dmitry Novik](https://github.com/novikd)).
* Fixed reading of text index in table with existing lightweight deletes and row policies. [#99661](https://github.com/ClickHouse/ClickHouse/pull/99661) ([Anton Popov](https://github.com/CurtizJ)).
* Fix nullptr dereference in Parquet reader when filter-in-decoder path encounters filtered-out pages. Closes [#99676](https://github.com/ClickHouse/ClickHouse/issues/99676). [#99677](https://github.com/ClickHouse/ClickHouse/pull/99677) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect seek in AsynchronousReadBufferFromFileDescriptor with O\_DIRECT. Closes [#99358](https://github.com/ClickHouse/ClickHouse/issues/99358). [#99678](https://github.com/ClickHouse/ClickHouse/pull/99678) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed heap-buffer-overflow in `CompressionCodecT64` and process abort in `CompressionCodecMultiple` when decompressing malformed compressed data. Both issues were found by new libFuzzer targets. The codecs now throw an exception instead of crashing. [#99680](https://github.com/ClickHouse/ClickHouse/pull/99680) ([Rahul](https://github.com/motsc)).
* Delay processing until server has finished loading all the tables. [#99700](https://github.com/ClickHouse/ClickHouse/pull/99700) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix MySQL dictionary source bypassing `RemoteHostFilter` for inline DDL params. [#99720](https://github.com/ClickHouse/ClickHouse/pull/99720) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fix logical error when iterating over data lake tables in `system.tables`. [#99739](https://github.com/ClickHouse/ClickHouse/pull/99739) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fixed analysis of predicates with the `IN` function by text index with the preprocessor. Fixed the collision of searched tokens in the text index, which could lead to incorrect results. [#99755](https://github.com/ClickHouse/ClickHouse/pull/99755) ([Anton Popov](https://github.com/CurtizJ)).
* Fix infinite loop when reading `Npy` format files with negative shape dimensions. [#99812](https://github.com/ClickHouse/ClickHouse/pull/99812) ([Desel72](https://github.com/Desel72)).
* Fix global-buffer-overflow in `CRC32` function on `FixedString` arguments when evaluated with zero rows during query plan header computation. [#99835](https://github.com/ClickHouse/ClickHouse/pull/99835) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix crash (null pointer dereference) when executing `ALTER TABLE ... MODIFY COLUMN ... COMMENT` on Iceberg tables. [#99838](https://github.com/ClickHouse/ClickHouse/pull/99838) ([Desel72](https://github.com/Desel72)).
* Fix `aggregate_functions_null_for_empty` setting to work with aggregate functions returning non-Nullable types such as `Array` or `Map` (e.g., `groupArray`, `sumMap`). [#99839](https://github.com/ClickHouse/ClickHouse/pull/99839) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix LOGICAL\_ERROR exception in `midpoint` function when called with mixed signed/unsigned integer types. [#99867](https://github.com/ClickHouse/ClickHouse/pull/99867) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Block structure mismatch" exception in queries with HAVING clause where the filter expression contains both an aggregate wrapped in a NULL-producing function and `materialize(0)`. [#99915](https://github.com/ClickHouse/ClickHouse/pull/99915) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix assertion failure in `sipHash128Keyed` (and similar keyed hash functions) when the data argument is a Map with array keys or other nested array types. [#99921](https://github.com/ClickHouse/ClickHouse/pull/99921) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception "Not-ready Set" in `IN` function during query plan optimization with `convertAnyJoinToSemiOrAntiJoin`. [#99939](https://github.com/ClickHouse/ClickHouse/pull/99939) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### Build/Testing/Packaging Improvement

* Reduce compilation time by removing heavy header includes and moving expensive template instantiations out of headers. [#97893](https://github.com/ClickHouse/ClickHouse/pull/97893) ([Raúl Marín](https://github.com/Algunenano)).
* Reduce compile time of arithmetic functions and related headers by shrinking template dispatch matrices and removing heavy includes. [#98204](https://github.com/ClickHouse/ClickHouse/pull/98204) ([Raúl Marín](https://github.com/Algunenano)).
* Use `mongo-c-driver` 2.2.2. [#98304](https://github.com/ClickHouse/ClickHouse/pull/98304) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `postgres` REL\_18\_3. [#98306](https://github.com/ClickHouse/ClickHouse/pull/98306) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Enable jemalloc allocator for UBSan builds to avoid RSS accumulation from glibc malloc's poor memory reclamation behavior. [#98444](https://github.com/ClickHouse/ClickHouse/pull/98444) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Use Rust v0 symbol mangling and strip internal symbols from PRQL library to reduce symbol name bloat from parser combinator libraries. [#98446](https://github.com/ClickHouse/ClickHouse/pull/98446) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add TPC-H benchmark suite and TPC-DS README to `tests/benchmarks`. [#98495](https://github.com/ClickHouse/ClickHouse/pull/98495) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Add correctness tests for all 99 TPC-DS queries. [#99204](https://github.com/ClickHouse/ClickHouse/pull/99204) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Add integration test reproducing DDL CREATE TABLE + ALTER with offline replica bug ([#44070](https://github.com/ClickHouse/ClickHouse/issues/44070)), marked as expected failure. [#99259](https://github.com/ClickHouse/ClickHouse/pull/99259) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Integrate jemalloc with `je_` prefix and remove usage of linker's --wrap. [#99342](https://github.com/ClickHouse/ClickHouse/pull/99342) ([Azat Khuzhin](https://github.com/azat)).

<h3 id="262">
  ClickHouse release 26.2, 2026-02-26. [Presentation](https://presentations.clickhouse.com/2026-release-26.2/), [Video](https://www.youtube.com/watch?v=7qHba08vNfo)
</h3>

#### Backward Incompatible Change

* Deduplication is turned ON for all inserts by default. It was OFF before for async inserts and for MV's, but it was ON for sync inserts. The goal is to have the same defaults for both ways of inserts. If you have deduplication explicitly disabled on your cluster, you have to explicitly set `deduplicate_insert='backward_compatible_choice'` to keep the old behavior. The same with `deduplicate_blocks_in_dependent_materialized_views`. [#95970](https://github.com/ClickHouse/ClickHouse/pull/95970) ([Sema Checherinda](https://github.com/CheSema)).
* Improved storage format of statistics. All statistics are now stored in a single file. [#93414](https://github.com/ClickHouse/ClickHouse/pull/93414) ([Anton Popov](https://github.com/CurtizJ)). If you didn't explicitly enable table statistics, you can ignore this item.
* Limit S3(Azure)Queue in-memory metadata. System tables are renamed from `azure_queue` to `azure_queue_metadata_cache` and `system.s3queue` to `s3queue_metadata_cache`. [#95809](https://github.com/ClickHouse/ClickHouse/pull/95809) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Previously, applying a function to a `Variant` column silently returned NULLs when a variant sub-type was incompatible with the function; now it throws an exception, which may break queries that relied on the silent NULL behavior. [#95811](https://github.com/ClickHouse/ClickHouse/pull/95811) ([Bharat Nallan](https://github.com/bharatnc)).
* `DATE` columns from PostgreSQL are now inferred as `Date32` in ClickHouse (in previous versions they were inferred as `Date`, which led to overflow of the values outside of a narrow range). Allow inserting `Date32` values back to PostgreSQL. Closes [#73084](https://github.com/ClickHouse/ClickHouse/issues/73084). [#95999](https://github.com/ClickHouse/ClickHouse/pull/95999) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The semantics of the `do_not_merge_across_partitions_select_final` setting were made more obvious. Previously, the feature could be automatically enabled when the setting was not explicitly set in the configs. It caused confusion repeatedly and, unfortunately, led to some issues in production. Now, the rules are simpler: `do_not_merge_across_partitions_select_final=1` enables the functionality unconditionally. If `do_not_merge_across_partitions_select_final=0`, then automatic is used only if the new setting `enable_automatic_decision_for_merging_across_partitions_for_final=1` and not used otherwise. To preserve the old behaviour as much as possible, the defaults were set to `do_not_merge_across_partitions_select_final=0` and `enable_automatic_decision_for_merging_across_partitions_for_final=1`. [#96110](https://github.com/ClickHouse/ClickHouse/pull/96110) ([Nikita Taranov](https://github.com/nickitat)).
* When creating an S3 table with explicitly specified columns, ClickHouse now validates that those column names actually exist in the remote file's schema. Queries that previously worked with mismatched column names will now fail at table creation time. This closes [#96089](https://github.com/ClickHouse/ClickHouse/issues/96089). [#96194](https://github.com/ClickHouse/ClickHouse/pull/96194) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Forbid using subqueries in ORDER BY and other table key expressions. [#96847](https://github.com/ClickHouse/ClickHouse/pull/96847) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Enable `apply_row_policy_after_final` by default. Initially, when `optimize_move_to_prewhere_if_final=0`, both ROW POLICY and PREWHERE respect FINAL and were applied after FINAL. This was broken by [#87303](https://github.com/ClickHouse/ClickHouse/issues/87303), which ignored the `optimize_move_to_prewhere_if_final` for the ROW POLICY filter. To fix this, this PR enables the setting `apply_row_policy_after_final` introduced in [#91065](https://github.com/ClickHouse/ClickHouse/issues/91065). With `apply_row_policy_after_final` enabled, ROW POLICY would continue to respect FINAL by default, as previously. This PR is an incompatible change because it changes the behaviour for `optimize_move_to_prewhere_if_final=1`. Now, to get the ROW POLICY applied before FINAL, `apply_row_policy_after_final` should be used instead of `optimize_move_to_prewhere_if_final`. [#97279](https://github.com/ClickHouse/ClickHouse/pull/97279) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* The `Date` type is now serialized as Arrow's native `date32` type in Arrow/ArrowStream formats, instead of `uint16`. Tools like PyArrow will now correctly see the column as a date type. The old behavior can be restored with the `output_format_arrow_date_as_uint16` setting. Reading old Arrow files that used `uint16` for `Date` columns is still supported. [#96860](https://github.com/ClickHouse/ClickHouse/pull/96860) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### New Feature

* Users can now use ClickStack (an observability UI) directly from ClickHouse, useful for debugging and local development. [#96597](https://github.com/ClickHouse/ClickHouse/pull/96597) ([Aaron Knudtson](https://github.com/knudtty)).
* Support time-based one-time password (TOTP) as an authentication method. [#71273](https://github.com/ClickHouse/ClickHouse/pull/71273) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Add `lazy_load_tables` database setting. When enabled, tables are not loaded during database startup — a lightweight `StorageTableProxy` is created instead and the real table engine is materialized on first access. [#96283](https://github.com/ClickHouse/ClickHouse/pull/96283) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* Added `input_format_max_block_wait_ms` setting to emit data blocks by timeout and allowed processing of remaining data when an HTTP connection is closed unexpectedly. [#94509](https://github.com/ClickHouse/ClickHouse/pull/94509) ([Mostafa Mohamed Salah](https://github.com/Sasao4o)).
* Google BigLake catalog integration. This closes [#95339](https://github.com/ClickHouse/ClickHouse/issues/95339). [#97104](https://github.com/ClickHouse/ClickHouse/pull/97104) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Added system table `system.tokenizers` which shows all available tokenizers. [#96753](https://github.com/ClickHouse/ClickHouse/pull/96753) ([Robert Schulze](https://github.com/rschu1ze)).
* Add new system table `system.user_defined_functions` to monitor UDF loading status and configuration. [#90340](https://github.com/ClickHouse/ClickHouse/pull/90340) ([Xu Jia](https://github.com/XuJia0210)).
* Add `system.jemalloc_stats` table exposing jemalloc memory allocator statistics (via `malloc_stats_print`) for diagnosing memory usage on servers built with jemalloc. Also add a `/jemalloc.html` HTTP endpoint on the ClickHouse HTTP interface for interactive visualization of these statistics. [#97077](https://github.com/ClickHouse/ClickHouse/pull/97077) ([Antonio Andelic](https://github.com/antonio2368)).
* Added `system.jemalloc_profile_text` table for reading and analyzing jemalloc heap profiles. The output format is controlled by the `jemalloc_profile_text_output_format` setting (raw, symbolized, or collapsed; default collapsed). Inline frame resolution is controlled by `jemalloc_profile_text_symbolize_with_inline` (when enabled, inline frames are included at the cost of slower symbolization; when disabled, they are skipped for faster output). For the collapsed format, `jemalloc_profile_text_collapsed_use_count` controls whether stacks are weighted by live allocation count (true) or live bytes (false, default). This enables easier memory profiling and flame graph visualization of jemalloc heap profiles. Fixes [#93248](https://github.com/ClickHouse/ClickHouse/issues/93248). [#97218](https://github.com/ClickHouse/ClickHouse/pull/97218) ([Antonio Andelic](https://github.com/antonio2368)).
* Add the `default_dictionary_database` setting, which lets ClickHouse resolve external dictionaries referenced without a database qualifier in a specified default database. This simplifies migration from XML-defined global dictionaries to SQL-defined per-database dictionaries—allowing existing dictionary queries (e.g. dictGet('name', …)) to continue working without modification. [#91412](https://github.com/ClickHouse/ClickHouse/pull/91412) ([Dmitrii Plotnikov](https://github.com/dimbo4ka)).
* Support auxiliary zookeeper for `DatabaseReplicated`. [#91683](https://github.com/ClickHouse/ClickHouse/pull/91683) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* Implement new table function `primes` and new system table `system.primes` that contains prime numbers in ascending order. Closes [#90839](https://github.com/ClickHouse/ClickHouse/issues/90839). [#92776](https://github.com/ClickHouse/ClickHouse/pull/92776) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Async inserts support parallel quorum. The inserted data is replicated to the quorum. If duplicates are found, query waits until previously inserted data is replicated as well. [#93356](https://github.com/ClickHouse/ClickHouse/pull/93356) ([Sema Checherinda](https://github.com/CheSema)).
* Added functions `colorOKLABToSRGB`, `colorSRGBToOKLAB` to convert value from sRGB to OKLAB and vice versa. [#93361](https://github.com/ClickHouse/ClickHouse/pull/93361) ([Pranav Tiwari](https://github.com/pranavt84)).
* A new `deduplicate_insert` setting which overrides `insert_deduplicate` and `async_insert_deduplicate`. [#94413](https://github.com/ClickHouse/ClickHouse/pull/94413) ([Sema Checherinda](https://github.com/CheSema)).
* Server setting `insert_deduplication_version` makes it possible to migrate on unified deduplication hash. [#95409](https://github.com/ClickHouse/ClickHouse/pull/95409) ([Sema Checherinda](https://github.com/CheSema)).
* Add `xxh3_128` hashing function. [#96055](https://github.com/ClickHouse/ClickHouse/pull/96055) ([Raúl Marín](https://github.com/Algunenano)).
* Added `OPTIMIZE <table> DRY RUN PARTS <part names>` query to simulate merges without committing the result part. It may be useful for testing purposes: verifying merge correctness in the new version, deterministically reproducing merge-related bugs, and reliably benchmarking merge performance. [#96122](https://github.com/ClickHouse/ClickHouse/pull/96122) ([Anton Popov](https://github.com/CurtizJ)).
* Add a new check enabled by default via setting `check_named_collection_dependencies` to avoid dropping named collections used by tables. [#96181](https://github.com/ClickHouse/ClickHouse/pull/96181) ([Pablo Marcos](https://github.com/pamarcos)).
* Added `system.fail_points` to inspect existing failpoints in the server and whether they are enabled or not. This is going to help automate testing. [#96762](https://github.com/ClickHouse/ClickHouse/pull/96762) ([Pedro Ferreira](https://github.com/PedroTadim)).
* Add role-based access to Glue catalog. Use settings `aws_role_arn` and, optionally, `aws_role_session_name`. [#90825](https://github.com/ClickHouse/ClickHouse/pull/90825) ([Antonio Andelic](https://github.com/antonio2368)).
* Added a setting `add_minmax_index_for_temporal_columns` that, when enabled, automatically creates minmax indexes for all `Date`, `Date32`, `Time`, `Time64`, `DateTime`, and `DateTime64` columns. [#93355](https://github.com/ClickHouse/ClickHouse/pull/93355) ([Michael Jarrett](https://github.com/EmeraldShift)).
* Support for extended table aliases for JOINs (queries like `SELECT * FROM (SELECT 1) AS t(a) JOIN (SELECT 1) AS u(b) ON a = b`). Closes [#95131](https://github.com/ClickHouse/ClickHouse/issues/95131). [#95331](https://github.com/ClickHouse/ClickHouse/pull/95331) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Added support for `ALTER TABLE RENAME COLUMN` for Iceberg tables. Previously only `ADD COLUMN, DROP COLUMN, and MODIFY COLUMN` were supported. [#97455](https://github.com/ClickHouse/ClickHouse/pull/97455) ([murphy-4o](https://github.com/murphy-4o)).

#### Experimental Feature

* The text index is now GA. [#96794](https://github.com/ClickHouse/ClickHouse/pull/96794) ([Robert Schulze](https://github.com/rschu1ze)).
* The `QBit` data type for quantized bit-packed vector storage (used for approximate nearest-neighbor search) is now generally available and no longer requires enabling an experimental setting. [#95358](https://github.com/ClickHouse/ClickHouse/pull/95358) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Vector search in ClickHouse can now use replicas in the cluster to *distribute* the load and search of vector index parts. This enables ClickHouse to support large vector indexes that exceed the memory capacity of a single VM. [#95876](https://github.com/ClickHouse/ClickHouse/pull/95876) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Add server-side AST fuzzer controlled by `ast_fuzzer_runs` and `ast_fuzzer_any_query` settings. When enabled, the server runs randomized mutations of each query after its normal execution, discarding the results. [#97568](https://github.com/ClickHouse/ClickHouse/pull/97568) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `iif` function to the experimental KQL dialect. [#94790](https://github.com/ClickHouse/ClickHouse/pull/94790) ([happyso](https://github.com/sunyeongchoi)).
* Schema inference now respects `allow_experimental_nullable_tuple_type`. When enabled, it allows inferred tuple types to be `Nullable(Tuple(...))`, so missing nested objects can become `NULL` instead of a tuple of `NULL` elements. [#95525](https://github.com/ClickHouse/ClickHouse/pull/95525) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* The `use_statistics_cache` setting is now enabled by default, so column statistics are cached in memory to speed up query optimization without needing to reload them from each part. [#95950](https://github.com/ClickHouse/ClickHouse/pull/95950) ([Han Fei](https://github.com/hanfei1991)).

#### Performance Improvement

* Allow any deterministic expression in Primary Key to be used for data skipping (e.g. `ORDER BY cityHash64(user_id)`/ `ORDER BY length(user_id)`). For deterministic expressions, ClickHouse can apply the expression to query constants and use the result in the primary key index for predicates like `=`, `IN`, and `has`. If the expression is also injective (e.g. `ORDER BY hex(p)` or `ORDER BY reverse(tuple(reverse(p), hex(p)))`), we can effectively use the index for the negated forms: `!=`, `NOT IN`, and `NOT has`. Closes [#10685](https://github.com/ClickHouse/ClickHouse/issues/10685). Closes [#82161](https://github.com/ClickHouse/ClickHouse/issues/82161). [#92952](https://github.com/ClickHouse/ClickHouse/pull/92952) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Improved storage format of statistics. All statistics are now stored in a single file. [#93414](https://github.com/ClickHouse/ClickHouse/pull/93414) ([Anton Popov](https://github.com/CurtizJ)).
* Allow parallelized read for remote table engines/functions in the filesystem cache. [#71781](https://github.com/ClickHouse/ClickHouse/pull/71781) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Allow using userspace page cache with local files and object storage table functions. [#77874](https://github.com/ClickHouse/ClickHouse/pull/77874) ([Michael Kolupaev](https://github.com/al13n321)).
* Avoid unnecessary memcpy in userspace page cache. [#77884](https://github.com/ClickHouse/ClickHouse/pull/77884) ([Michael Kolupaev](https://github.com/al13n321)).
* The default for `concurrent_threads_scheduler` is now `max_min_fair` instead of `fair_round_robin`. This improves fairness under high load by prioritizing queries with fewer allocated slots, so short-running queries aren't penalized by long-running ones. [#95300](https://github.com/ClickHouse/ClickHouse/pull/95300) ([Sergei Trifonov](https://github.com/serxa)).
* If a `FINAL` query used primary key condition for filtering followed by skip indexes for other conditions, the `PrimaryKeyExpand` processing step will now only check the initial shortlisted primary key ranges for intersection. [#94903](https://github.com/ClickHouse/ClickHouse/pull/94903) ([Shankar Iyer](https://github.com/shankar-iyer)).
* When using parallel replicas with table functions like `s3(...)`, queries with a single subquery wrapping the table function are now automatically parallelized across replicas, whereas previously only direct table function references were parallelized. Closes [#92264](https://github.com/ClickHouse/ClickHouse/issues/92264). [#96332](https://github.com/ClickHouse/ClickHouse/pull/96332) ([phulv94](https://github.com/phulv94)).
* Enable splitting data and system files in cache into separate segments. [#87834](https://github.com/ClickHouse/ClickHouse/pull/87834) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* Speed up some hash join operations by implementing dynamic dispatch for `ColumnVector::replicate`. [#79573](https://github.com/ClickHouse/ClickHouse/pull/79573) ([Raúl Marín](https://github.com/Algunenano)).
* Performance improvement for parallel hash join in cases of complex predicates. Previously, we were processing non-joined rows in one thread, which is suboptimal the idea of the optimization is to parallelize the processing of the non-joined rows across multiple threads. Can be toggled by the `parallel_non_joined_rows_processing` setting. Enabled by default. [#92068](https://github.com/ClickHouse/ClickHouse/pull/92068) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Slightly optimize parsing of JSON type. [#93614](https://github.com/ClickHouse/ClickHouse/pull/93614) ([Pavel Kruglov](https://github.com/Avogar)).
* Improve memory footprint of AST. Optimization makes sense as fields are not used when highlighting is not used and there is no VALUES parsing. [#93974](https://github.com/ClickHouse/ClickHouse/pull/93974) ([Ilya Yatsishin](https://github.com/qoega)).
* Optimize memory consumption of named Tuple AST objects. Place column names as strings in tuple object instead of having them in generic AST literal nodes. [#94704](https://github.com/ClickHouse/ClickHouse/pull/94704) ([Ilya Yatsishin](https://github.com/qoega)).
* Devirtualization is improved with additional linker options. [#94737](https://github.com/ClickHouse/ClickHouse/pull/94737) ([Nikita Taranov](https://github.com/nickitat)).
* Improve clone replica performance for ReplicatedMergeTree tables with many parts by batching ZooKeeper requests. [#94847](https://github.com/ClickHouse/ClickHouse/pull/94847) ([c-end](https://github.com/c-end)).
* When read step already has PREWHERE filters a new filter couldn't be added. This change postpones PREWHERE optimization until after JOIN runtime filter optimization so that runtime filters can be also pushed to PREWHERE. [#95838](https://github.com/ClickHouse/ClickHouse/pull/95838) ([Alexander Gololobov](https://github.com/davenger)).
* Speedup `T64` codec compression by using dynamic dispatch on x86. [#95881](https://github.com/ClickHouse/ClickHouse/pull/95881) ([Raúl Marín](https://github.com/Algunenano)).
* Speed up `uniq` over numeric types by batching inserts when possible (not null, not -If, no GROUP BY, no IPv6 or String). [#95904](https://github.com/ClickHouse/ClickHouse/pull/95904) ([Raúl Marín](https://github.com/Algunenano)).
* Low-level optimizations for Keeper: `ZooKeeper::observeOperations` has been found to account for >20% of the ZooKeeper receive thread CPU consumption. This change addresses that by: 1. For `AggregatedZooKeeperLog::stats`, use `CityHash64` instead of `SipHash` which is >10x faster. 2. For `Coordination::ErrorCounter`, use `std::array<std::atomic<UInt32>, N>` instead of `std::unordered_map` and `std::mutex`. [#95962](https://github.com/ClickHouse/ClickHouse/pull/95962) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Remove 64-byte alignment for ProfileEvents::Counter to save memory. [#96097](https://github.com/ClickHouse/ClickHouse/pull/96097) ([Azat Khuzhin](https://github.com/azat)).
* Memory optimization: trim size of `CachedOnDiskReadBufferFromFile` structure 50x. [#96098](https://github.com/ClickHouse/ClickHouse/pull/96098) ([Azat Khuzhin](https://github.com/azat)).
* Don't copy old data on hash table resizing if it's empty. [#96180](https://github.com/ClickHouse/ClickHouse/pull/96180) ([Raúl Marín](https://github.com/Algunenano)).
* Support JOIN runtime filters for `RIGHT OUTER` JOINs. [#96183](https://github.com/ClickHouse/ClickHouse/pull/96183) ([Hechem Selmi](https://github.com/m-selmi)).
* The optimization `enable_join_runtime_filters` is now the default. [#89314](https://github.com/ClickHouse/ClickHouse/pull/89314) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Previously, text index direct read optimization was applied only when all parts had a materialized text index. This PR adds partial support: if some parts have a materialized text index, those parts will use it, while parts without a materialized text index will fall back to executing the original filter expression. [#96411](https://github.com/ClickHouse/ClickHouse/pull/96411) ([Anton Popov](https://github.com/CurtizJ)).
* Added `minmax` secondary indexes on time columns and `bloom_filter` indexes on `query_id`/`initial_query_id` columns to system log tables for faster filtering. [#96712](https://github.com/ClickHouse/ClickHouse/pull/96712) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Lazy materialization optimization is now applied to all branches of a `UNION ALL` query, not just the first one. Queries that combine multiple sorted and limited reads from different `MergeTree` tables via `UNION ALL` will now benefit from deferred column reading on every branch, reducing I/O. [#96832](https://github.com/ClickHouse/ClickHouse/pull/96832) ([Federico Ginosa](https://github.com/menxit)).
* Optimize minmax skip index computation during INSERT by removing an unnecessary data copy and enabling vectorized min/max calculation for numeric columns. [#97392](https://github.com/ClickHouse/ClickHouse/pull/97392) ([Raúl Marín](https://github.com/Algunenano)).
* Storage `DeltaLake` now takes `count()` result from delta lake metadata and shows correct table stats in system.tables (total bytes/rows). [#96190](https://github.com/ClickHouse/ClickHouse/pull/96190) ([Kseniia Sumarokova](https://github.com/kssenii)).
* The unused columns are removed also from the reading step in case of reading from a MergeTree. It is especially useful when a filter is pushed down into `PREWHERE`. [#89982](https://github.com/ClickHouse/ClickHouse/pull/89982) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Improved processing `SHOW TABLES` query by fetching only names of tables and improved getLightweightTablesIterator to return structure containing only table names. resolves [#93835](https://github.com/ClickHouse/ClickHouse/issues/93835). [#94467](https://github.com/ClickHouse/ClickHouse/pull/94467) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* Improve `assumeNotNull`, `coalesce`, `ifNull` to enable primary key and skip index pruning for range predicates when key columns are wrapped in these functions. Closes [#94689](https://github.com/ClickHouse/ClickHouse/issues/94689). [#94754](https://github.com/ClickHouse/ClickHouse/pull/94754) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Add with\_data & with\_stat extension to getChildren Keeper request. This allows fetching not only the list of children, but also their `stat` and/or `data` in a single operation. [#94826](https://github.com/ClickHouse/ClickHouse/pull/94826) ([Nikolay Degterinsky](https://github.com/evillique)).
* The index analysis is done only once (in most cases) regardless of whether we end up executing a local plan or a plan with parallel replicas. [#94854](https://github.com/ClickHouse/ClickHouse/pull/94854) ([Nikita Taranov](https://github.com/nickitat)).
* Allow to enable distributed index analysis based on amount of parts (`distributed_index_analysis_min_parts_to_activate`) and indexes size (`distributed_index_analysis_min_indexes_size_to_activate`). [#95216](https://github.com/ClickHouse/ClickHouse/pull/95216) ([Azat Khuzhin](https://github.com/azat)).
* Enable PREWHERE optimization for Iceberg tables. [#95476](https://github.com/ClickHouse/ClickHouse/pull/95476) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Reduce the memory footprint of some AST classes. [#95514](https://github.com/ClickHouse/ClickHouse/pull/95514) ([Raúl Marín](https://github.com/Algunenano)).
* Limit the number of pipeline streams generated with `split_intersecting_parts_ranges_into_layers` enabled. Helps to avoid excessive memory consumption. [#96478](https://github.com/ClickHouse/ClickHouse/pull/96478) ([Nikita Taranov](https://github.com/nickitat)).
* Implement equivalent sets optimization for multiple joins. Queries with multiple consecutive `INNER JOIN` operations now benefit from improved filter pushdown optimization. When tables are joined on equivalent columns (e.g., `t1 JOIN t2 ON t1.id = t2.id JOIN t3 ON t2.id = t3.id WHERE t1.id > 10`), filters applied to any table in the chain are automatically pushed down to all tables. Close [#96550](https://github.com/ClickHouse/ClickHouse/issues/96550). [#96596](https://github.com/ClickHouse/ClickHouse/pull/96596) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Optimize delta lake metadata scan. Uses changes from 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)).
* In Replicated database, don't update the cached cluster for every dummy query. [#96897](https://github.com/ClickHouse/ClickHouse/pull/96897) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Use the primary key index when filtering with `startsWithUTF8` if the prefix contains only ASCII characters. [#97055](https://github.com/ClickHouse/ClickHouse/pull/97055) ([vkcku](https://github.com/vkcku)).

#### Improvement

* Add OpenTelemetry tracing for Keeper requests. [#91332](https://github.com/ClickHouse/ClickHouse/pull/91332) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* New configuration options: `logger.startup_console_level` & `logger.shutdown_console_level` to allow for overriding the console log level during the startup & shutdown of ClickHouse respectively. [#95919](https://github.com/ClickHouse/ClickHouse/pull/95919) ([Garrett Thomas](https://github.com/garrettthomaskth)).
* Respect command-line overrides when reloading configuration. Closes [#80294](https://github.com/ClickHouse/ClickHouse/issues/80294). [#80295](https://github.com/ClickHouse/ClickHouse/pull/80295) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Allow key-value overrides for named collection parameters in `mongodb` table function. [#89616](https://github.com/ClickHouse/ClickHouse/pull/89616) ([vanchaklar](https://github.com/vanchaklar)).
* The read-in-order optimization for Iceberg tables now works with complex sorting functions like `icebergBucket` and `icebergTruncate`, not just simple column references. [#90256](https://github.com/ClickHouse/ClickHouse/pull/90256) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Add a new column named parts\_postpone\_reasons in system.mutations to improve diagnostics, which shows the parts postpone reasons. [#92206](https://github.com/ClickHouse/ClickHouse/pull/92206) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Track changes in the number of rows to read (due to inserts/deletes or query condition cache usage) in `DataflowStatisticsCache`. [#93636](https://github.com/ClickHouse/ClickHouse/pull/93636) ([Nikita Taranov](https://github.com/nickitat)).
* Support SYSTEM RESET DDL WORKER \[ON CLUSTER] query. It requests to reset the state of DDLWorker in its main thread. It is helpful to refresh the replica active when host IDs are updated. [#93780](https://github.com/ClickHouse/ClickHouse/pull/93780) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Support `mutation_ids` in `system.part_log` for event type of `MUTATE_PART` and `MUTATE_PART_START`. [#93811](https://github.com/ClickHouse/ClickHouse/pull/93811) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Background operations (Mutate, Merge) can now be configured independently via 'background' profile. Previously such operations shared settings with regular queries via 'default' profile. [#93905](https://github.com/ClickHouse/ClickHouse/pull/93905) ([Arsen Muk](https://github.com/arsenmuk)).
* Add more information to `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)).
* Added new `QueryNonInternal` metric to track the number of executing non-internal queries. This metric is exposed as `ClickHouseMetrics_QueryNonInternal` and helps operators monitor query concurrency against the `max_concurrent_queries` limit, which only applies to non-internal queries. [#94284](https://github.com/ClickHouse/ClickHouse/pull/94284) ([Ashwath Singh](https://github.com/ashwath)).
* Support input bytes statistics collection for columns from compact parts in `RuntimeDataflowStatisticsCacheUpdater`. [#94626](https://github.com/ClickHouse/ClickHouse/pull/94626) ([Nikita Taranov](https://github.com/nickitat)).
* Add a check for Keeper misconfiguration leading to cluster assembly failures. Closes [#60932](https://github.com/ClickHouse/ClickHouse/issues/60932). [#94682](https://github.com/ClickHouse/ClickHouse/pull/94682) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Improve JSON prefixes deserialization during part loading. [#94848](https://github.com/ClickHouse/ClickHouse/pull/94848) ([Pavel Kruglov](https://github.com/Avogar)).
* Refactor the write using full INSERT pipeline, which triggers materialized views on the target table. [#94890](https://github.com/ClickHouse/ClickHouse/pull/94890) ([Kai Zhu](https://github.com/nauu)).
* Use vector similarity search plan optimizations only if the index exists for the search column. [#94998](https://github.com/ClickHouse/ClickHouse/pull/94998) ([Eduard Karacharov](https://github.com/korowa)).
* Check for the total memory limit before the user authentication and throw `(total) memory limit exceeded` if the total limit is more than allowed. [#95003](https://github.com/ClickHouse/ClickHouse/pull/95003) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Added the `throw_on_unmatched_row_policies` configuration option which, when enabled, throws an exception if a user queries a table that has row policies but none of them apply to that user — preventing the ambiguous behavior of returning all rows due to access control misconfiguration. [#95014](https://github.com/ClickHouse/ClickHouse/pull/95014) ([Vitaly Baranov](https://github.com/vitlibar)).
* Dynamic update s3 access tokens in long queries with unity catalog. This closes [#93981](https://github.com/ClickHouse/ClickHouse/issues/93981). [#95069](https://github.com/ClickHouse/ClickHouse/pull/95069) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Disable jemalloc's dirty page decay if ClickHouse is under sustained memory pressure for `memory_worker_decay_adjustment_period_ms` milliseconds. Enable jemalloc's dirty page decay back if ClickHouse is working under normal conditions for same amount of time. [#95145](https://github.com/ClickHouse/ClickHouse/pull/95145) ([Antonio Andelic](https://github.com/antonio2368)).
* S3Queue auxiliary Zookeeper support using `keeper_path` setting from s3Queue. [#95203](https://github.com/ClickHouse/ClickHouse/pull/95203) ([Diego Nieto](https://github.com/lesandie)).
* Respect `max_parts_to_merge_at_once` in TTL drop part merges. [#95315](https://github.com/ClickHouse/ClickHouse/pull/95315) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Add `connection_address` and `connection_port` to query\_log to reflect physical connection (`address` and `port` are replaced when connected through proxy and auth\_use\_forwarded\_address=1). [#95471](https://github.com/ClickHouse/ClickHouse/pull/95471) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Fix incorrect memory accounting for the query conditions cache. The key problem was that it didn't take into account the cache key that composed of several strings (like part\_name, the table id and the whole SQL condition). [#95478](https://github.com/ClickHouse/ClickHouse/pull/95478) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Server started with the embedded configuration will allow to manipulate users and grants, saving them to the `access` directory, as the regular configuration does. This improves testing. Also enabled all access\_control\_improvements in the embedded config and in clickhouse-local. [#95481](https://github.com/ClickHouse/ClickHouse/pull/95481) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improved S3 authentication error messages to include a hint to check credentials when access is denied. [#95648](https://github.com/ClickHouse/ClickHouse/pull/95648) ([Gerald Latkovic](https://github.com/batkovic75)).
* Enable statistics cache and set the update period of cache to 300s. [#95841](https://github.com/ClickHouse/ClickHouse/pull/95841) ([Han Fei](https://github.com/hanfei1991)).
* Add component name to `system.aggregated_zookeeper_log`. [#95882](https://github.com/ClickHouse/ClickHouse/pull/95882) ([Antonio Andelic](https://github.com/antonio2368)).
* Skip object storage reads when querying `DeltaLake` tables from `system.tables`. [#95899](https://github.com/ClickHouse/ClickHouse/pull/95899) ([Antonio Andelic](https://github.com/antonio2368)).
* Enable `enable_max_bytes_limit_for_min_age_to_force_merge` by default if the `compatibility` setting is `26.2` or higher. [#95917](https://github.com/ClickHouse/ClickHouse/pull/95917) ([Christoph Wurm](https://github.com/cwurm)).
* Delta Lake is now available on macOS. Closes #95979. [#95985](https://github.com/ClickHouse/ClickHouse/pull/95985) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* In previous versions, when combining conflicting ALTER expressions with UPDATE and RENAME COLUMN, a logical error was thrown instead of a proper exception. Closes [#70678](https://github.com/ClickHouse/ClickHouse/issues/70678). [#96022](https://github.com/ClickHouse/ClickHouse/pull/96022) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improve the help output for all ClickHouse applications and add a --no-sudo option with a few fixes. This is a continuation of [#58244](https://github.com/ClickHouse/ClickHouse/issues/58244) from [Ilya Yatsishin](https://github.com/qoega). [#96025](https://github.com/ClickHouse/ClickHouse/pull/96025) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add `distanceCosine` alias for `cosineDistance` because all other distance functions already have alias of this form. [#96065](https://github.com/ClickHouse/ClickHouse/pull/96065) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Add support for the `with_data` Keeper extension to improve table fetching in Database Replicated. [#96090](https://github.com/ClickHouse/ClickHouse/pull/96090) ([Nikolay Degterinsky](https://github.com/evillique)).
* Update chdig to [v26.2.1](https://github.com/azat/chdig/releases/tag/v26.2.1) (new features and MacOS support). [#96113](https://github.com/ClickHouse/ClickHouse/pull/96113) ([Azat Khuzhin](https://github.com/azat)).
* Improve filter pushdown for `numbers` and `primes`. ClickHouse can now derive conservative value bounds from `WHERE` conditions when exact bounds cannot be derived, and restrict sequence generation accordingly (for example, for `WHERE number % 5 < 2 AND number > 100 AND number < 300`, ClickHouse will only generate numbers between 100 and 300, then apply the predicate), avoiding unbounded scans. Closes [#84853](https://github.com/ClickHouse/ClickHouse/issues/84853). Closes [#93913](https://github.com/ClickHouse/ClickHouse/issues/93913). [#96115](https://github.com/ClickHouse/ClickHouse/pull/96115) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* The formatter previously wrapped SELECT in parentheses when a `COMMENT` clause was present to disambiguate parsing. Instead, output `COMMENT` before `AS SELECT`, which eliminates the ambiguity without parentheses. [#96293](https://github.com/ClickHouse/ClickHouse/pull/96293) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The `allow_impersonate_user` config setting is now located inside the `access_control_improvements` section rather than being a standalone server setting. [#96451](https://github.com/ClickHouse/ClickHouse/pull/96451) ([Vitaly Baranov](https://github.com/vitlibar)).
* Make `core_dump.size_limit` configuration setting hot-reloadable, to avoid having to restart servers for configuration changes to take place. [#96524](https://github.com/ClickHouse/ClickHouse/pull/96524) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Improves CPU and real-time profiler interoperability with socket timeouts. [#96601](https://github.com/ClickHouse/ClickHouse/pull/96601) ([Sergei Trifonov](https://github.com/serxa)).
* Prevent the resurrection of dropped data if ADD COLUMN is run quickly after the DROP COLUMN mutation. [#96713](https://github.com/ClickHouse/ClickHouse/pull/96713) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Change `function_id` type in `system.instrumentation` from LowCardinality(Int32) to Int32. [#96726](https://github.com/ClickHouse/ClickHouse/pull/96726) (Copilot).
* Synchronous waiting for mutations will respect query cancellation and time limits. [#96756](https://github.com/ClickHouse/ClickHouse/pull/96756) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added system command `SYSTEM RELOAD DELTA KERNEL TRACING <level>` to be able to change delta-kernel logging, which can be useful for debugging. [#96763](https://github.com/ClickHouse/ClickHouse/pull/96763) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Filtering by IP address family, i.e. `dns_allow_resolve_names_to_ipv4/ipv6` settings, are applied even if DNS cache is disabled. [#96810](https://github.com/ClickHouse/ClickHouse/pull/96810) ([c-end](https://github.com/c-end)).
* Better jemalloc introspection. [#96840](https://github.com/ClickHouse/ClickHouse/pull/96840) ([Azat Khuzhin](https://github.com/azat)).
* Fix `/play` Web UI throwing `QUERY_CACHE_USED_WITH_SYSTEM_TABLE` when querying system tables. [#96869](https://github.com/ClickHouse/ClickHouse/pull/96869) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improve Web UI: change favicon to indicate running query state; display errors from auxiliary queries (loading databases and tables) instead of silently ignoring them. Closes [#85055](https://github.com/ClickHouse/ClickHouse/issues/85055). [#96883](https://github.com/ClickHouse/ClickHouse/pull/96883) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Make the left panel in `/play` UI clickable to toggle the database list. [#96884](https://github.com/ClickHouse/ClickHouse/pull/96884) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `DROP DATABASE` now drops tables in reverse dependency order, improving crash-safety when the database contains tables with loading dependencies (e.g. `Distributed` tables using `joinGet`). [#97057](https://github.com/ClickHouse/ClickHouse/pull/97057) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Bump yaml-cpp to prevent skipping invalid YAML. [#97333](https://github.com/ClickHouse/ClickHouse/pull/97333) ([Azat Khuzhin](https://github.com/azat)).
* Show a loading indicator in the `play.html` sidebar while tables are being fetched. [#97531](https://github.com/ClickHouse/ClickHouse/pull/97531) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add a copy-to-clipboard button for raw query results in the built-in web UI (play.html). [#97532](https://github.com/ClickHouse/ClickHouse/pull/97532) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix query obfuscator (`clickhouse-format --obfuscate`) to produce parseable SQL in more cases. [#97584](https://github.com/ClickHouse/ClickHouse/pull/97584) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### Bug Fix (user-visible misbehavior in an official stable release)

* After metadata-only ALTERs, such as extending the elements of Enums, the optimization of aggregation with projection may end up producing an exception. [#84143](https://github.com/ClickHouse/ClickHouse/pull/84143) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Materialized views now use the database where they were created as execution context, meaning that: - it is possible to omit explicit database qualification on names referred in view's select query - if no explicit database qualification is given, the same database where the materialized view was created is assumed. [#88193](https://github.com/ClickHouse/ClickHouse/pull/88193) ([Dmitry Kovalev](https://github.com/dk-github)).
* Fix query parameter substitution in CREATE USER authentication methods when using ON CLUSTER. Query parameters in authentication methods (e.g., password) were not being replaced, causing UNKNOWN\_QUERY\_PARAMETER errors on remote nodes. [#92777](https://github.com/ClickHouse/ClickHouse/pull/92777) ([xiaohuanlin](https://github.com/xiaohuanlin)).
* Fixed inconsistencies in text index analysis for `has`, `mapContainsKey`, and `mapContainsValue` functions. Previously, queries using these functions could return different results depending on whether the expression was evaluated with or without a text index. [#93578](https://github.com/ClickHouse/ClickHouse/pull/93578) ([Anton Popov](https://github.com/CurtizJ)).
* Fix crash when attaching a table to a `MaterializedPostgreSQL` database if `dropReplicationSlot` throws during stack unwinding. [#96871](https://github.com/ClickHouse/ClickHouse/pull/96871) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Backups could crash the server if you do many concurrent backups clashing over the same files. [#93659](https://github.com/ClickHouse/ClickHouse/pull/93659) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixes queries with parallel replicas and JOIN with non-MT table. Closes [#92056](https://github.com/ClickHouse/ClickHouse/issues/92056). [#93902](https://github.com/ClickHouse/ClickHouse/pull/93902) ([Igor Nikonov](https://github.com/devcrafter)).
* Fixes an issue when Iceberg columns with dot in names returned NULL as values. [#94335](https://github.com/ClickHouse/ClickHouse/pull/94335) ([Mikhail Koviazin](https://github.com/mkmkme)).
* Fixed handling of UTF8 strings in `stringJaccardIndexUTF8` and improve performance. [#94613](https://github.com/ClickHouse/ClickHouse/pull/94613) ([Joanna Hulboj](https://github.com/jh0x)).
* Fix possible overflows in `WITH FILL STALENESS` (that leads to UB or/and endless loops). Fix possible endless loop due to big jumps. Add old analyzer support (mostly for stress tests). [#94663](https://github.com/ClickHouse/ClickHouse/pull/94663) ([Azat Khuzhin](https://github.com/azat)).
* Fix possible hung distributed queries when hostnames resolve to multiple addresses and a remote replica freezes. [#94726](https://github.com/ClickHouse/ClickHouse/pull/94726) ([c-end](https://github.com/c-end)).
* Fix invalid result on joining multiple table expressions, when leftmost table expression is a `-Cluster` table function. Resolves [#89996](https://github.com/ClickHouse/ClickHouse/issues/89996). [#94748](https://github.com/ClickHouse/ClickHouse/pull/94748) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Fix incorrect primary key and skip index pruning for predicates involving `toWeek`, `toYearWeek`, `toStartOfWeek`, `toLastDayOfWeek`, and `toDayOfWeek`, and fix exceptions in some of these functions for valid queries with `LowCardinality(String)`. [#94816](https://github.com/ClickHouse/ClickHouse/pull/94816) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Remove unnecessary skip permissions check in `ATTACH` queries for a view with SQL Security. This prevents potential privilege escalation when a user attaches a view with a definer without validating required access. [#94865](https://github.com/ClickHouse/ClickHouse/pull/94865) ([pufit](https://github.com/pufit)).
* Fixes a crash during `ReplicatedMergeTree` startup caused by concurrent removal of `delete_tmp_*` directories. [#94892](https://github.com/ClickHouse/ClickHouse/pull/94892) ([myeongjun](https://github.com/myeongjjun)).
* Fix `INSERT` into Iceberg tables with materialized views losing deduplication information, which caused an exception. [#94938](https://github.com/ClickHouse/ClickHouse/pull/94938) ([Daniil Ivanik](https://github.com/divanik)).
* Fix a bug where `SYSTEM DROP QUERY CACHE TAG 'TAGNAME' ON CLUSTER <CLUSTERNAME>` would drop the full cache on the cluster. [#94978](https://github.com/ClickHouse/ClickHouse/pull/94978) ([Rory Crispin](https://github.com/RoryCrispin)).
* Preserve constant index granularity (use\_const\_adaptive\_granularity) after Vertical merges (v2 with a fix for Nested, and in general). [#95013](https://github.com/ClickHouse/ClickHouse/pull/95013) ([Azat Khuzhin](https://github.com/azat)).
* Fixes race in filesystem cache in version 26.1 after \[ClickHouse/ClickHouse[#82764](https://github.com/ClickHouse/ClickHouse/issues/82764)]\([https://github.com/ClickHouse/ClickHouse/pull/82764](https://github.com/ClickHouse/ClickHouse/pull/82764)). [#95042](https://github.com/ClickHouse/ClickHouse/pull/95042) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix postgresql() table function canceling by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client. [#95136](https://github.com/ClickHouse/ClickHouse/pull/95136) ([Roman Vasin](https://github.com/rvasin)).
* Fixed type inference for qualified columns from source tables when multiple joins are used with `USING` clause. Previously, subsequent joins incorrectly updated types of underlying source columns to a common supertype even when the column was not involved in that join (e.g., in `SELECT t2.a FROM t1 LEFT JOIN t2 USING (a) LEFT JOIN t3 USING (a)`, the `t2.a` column is only used by the first join, so its type should be the supertype of `t1.a` and `t2.a`, excluding `t3.a`). This could lead to logical errors or crashes when functions expected different column types than what actually appeared in the execution plan. [#95157](https://github.com/ClickHouse/ClickHouse/pull/95157) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Make column transform only once during getting content of manifest .avro list and files. [#95164](https://github.com/ClickHouse/ClickHouse/pull/95164) ([Daniil Ivanik](https://github.com/divanik)).
* Fix incorrect calculation of JSON column sizes that could lead to excessive memory usage or wrong column statistics. [#95207](https://github.com/ClickHouse/ClickHouse/pull/95207) ([Azat Khuzhin](https://github.com/azat)).
* Fixed inaccurate memory accounting when applying large patch parts after lightweight updates. Previously, applying large patches could cause excessive memory usage and result in the server process being killed by the OOM killer. [#95231](https://github.com/ClickHouse/ClickHouse/pull/95231) ([Anton Popov](https://github.com/CurtizJ)).
* Fix undefined behavior that could cause incorrect results or an exception when a distributed query with `max_parallel_replicas` fell back to a local replica during index analysis. [#95263](https://github.com/ClickHouse/ClickHouse/pull/95263) ([Azat Khuzhin](https://github.com/azat)).
* Fix aggregation of sparse columns for `sum` and timeseries when `group_by_overflow_mode` is set to `any`. [#95301](https://github.com/ClickHouse/ClickHouse/pull/95301) ([Mikhail Koviazin](https://github.com/mkmkme)).
* Fix a reliability issue in `plain_rewritable` disk policy where a network error mid-way through unlinking a metadata file could leave the storage in an inconsistent state. [#95302](https://github.com/ClickHouse/ClickHouse/pull/95302) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Replace Date with Date32 for iceberg. [#95322](https://github.com/ClickHouse/ClickHouse/pull/95322) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* The password argument of the `redis` table function now will be masked in the logs and system tables (e.g.: `query_log`). [#95325](https://github.com/ClickHouse/ClickHouse/pull/95325) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix a bug where tables could be dropped or altered while a distributed query was still executing against them, potentially causing exceptions or incorrect results. [#95356](https://github.com/ClickHouse/ClickHouse/pull/95356) ([Azat Khuzhin](https://github.com/azat)).
* Fix a logical error in some cases when negative `LIMIT/OFFSET` is used in distributed queries. [#95357](https://github.com/ClickHouse/ClickHouse/pull/95357) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix a bug where clickhouse-client would ask for password twice when connecting using ssh. [#95372](https://github.com/ClickHouse/ClickHouse/pull/95372) ([Isak Ellmer](https://github.com/spinojara)).
* Fix a data race in storage S3(Azure)Queue. [#95385](https://github.com/ClickHouse/ClickHouse/pull/95385) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix the prewhere filter error caused by lambda expressions in prewhere. [#95395](https://github.com/ClickHouse/ClickHouse/pull/95395) ([Xiaozhe Yu](https://github.com/wudidapaopao)).
* Fix `optimize_syntax_fuse_functions` to not rewrite `sum/count/avg` into `sumCount()` when the aggregate argument is `Nullable`. Closes [#95390](https://github.com/ClickHouse/ClickHouse/issues/95390). [#95441](https://github.com/ClickHouse/ClickHouse/pull/95441) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Avoid possible crash for distributed queries in case of cancellation. [#95466](https://github.com/ClickHouse/ClickHouse/pull/95466) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* Fix deduplication for streaming from S3(Azure)Queue engine. [#95467](https://github.com/ClickHouse/ClickHouse/pull/95467) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix updating row policies assigned to the initial user in distributed queries. [#95469](https://github.com/ClickHouse/ClickHouse/pull/95469) ([Vitaly Baranov](https://github.com/vitlibar)).
* Fix check for encrypted disks over plain\_rewritable (Fixes possible `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)).
* The `mergeTreeProjection` table function was missing an access check, allowing users without SELECT permission on a table (but with permissions for table functions) to read data from its projections. This fix adds the same access check that `mergeTreeIndex` and `mergeTreeAnalyzeIndexes` already have. [#95480](https://github.com/ClickHouse/ClickHouse/pull/95480) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix possible logical error during reading of size subcolumn from dynamic subcolumns of Dynamic/JSON types. [#95573](https://github.com/ClickHouse/ClickHouse/pull/95573) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix regression in (experimental) zero‑copy replication introduced by [#94262](https://github.com/ClickHouse/ClickHouse/issues/94262) where shared parts could be deleted before other replicas finished fetching them. [#95597](https://github.com/ClickHouse/ClickHouse/pull/95597) ([filimonov](https://github.com/filimonov)).
* Fix crash during `tupleElement` applied to arrays of JSON. Closes [#95581](https://github.com/ClickHouse/ClickHouse/issues/95581). [#95647](https://github.com/ClickHouse/ClickHouse/pull/95647) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix logical error exception when using a matcher (`*`) inside a lambda function within a VALUES clause in a JOIN with USING. Close [#93675](https://github.com/ClickHouse/ClickHouse/issues/93675). [#95661](https://github.com/ClickHouse/ClickHouse/pull/95661) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fixed `There was an error: Cannot obtain error message` logical error when waiting for a distributed DDL and dropping the Replicated database concurrently. Fixes [#95539](https://github.com/ClickHouse/ClickHouse/issues/95539). [#95664](https://github.com/ClickHouse/ClickHouse/pull/95664) ([Alexander Tokmakov](https://github.com/tavplubix)).
* Fix `IN` function returning incorrect results with `NULL` values when `transform_null_in` is enabled. Closes [#65776](https://github.com/ClickHouse/ClickHouse/issues/65776). [#95674](https://github.com/ClickHouse/ClickHouse/pull/95674) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Correctly handle LowCardinality Nullable types in `CAST` when the setting `cast_keep_nullable` is enabled. Closes [#95670](https://github.com/ClickHouse/ClickHouse/issues/95670). [#95747](https://github.com/ClickHouse/ClickHouse/pull/95747) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix squashing partitioned delta lake data. [#95773](https://github.com/ClickHouse/ClickHouse/pull/95773) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix race condition for Nullable join column in runtime filters. [#95775](https://github.com/ClickHouse/ClickHouse/pull/95775) ([Hechem Selmi](https://github.com/m-selmi)).
* Fix possible logical error in query with matcher (`*`, `table.*`) and `analyzer_compatibility_join_using_top_level_identifier` when `USING` column has different types in tables and select list. Close [#90477](https://github.com/ClickHouse/ClickHouse/issues/90477). [#95808](https://github.com/ClickHouse/ClickHouse/pull/95808) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix memory safety bugs in parallel thread pool operations (backups, aggregation, distributed queries) that could cause exceptions when an error occurred during task scheduling. [#95818](https://github.com/ClickHouse/ClickHouse/pull/95818) ([Raúl Marín](https://github.com/Algunenano)).
* Fixes a crash on the DROP WORKLOAD while running concurrently with queries using the workload being dropped. [#95856](https://github.com/ClickHouse/ClickHouse/pull/95856) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix slow performance when querying system tables with a user that has limited grants on many databases. Closes [#89371](https://github.com/ClickHouse/ClickHouse/issues/89371). [#95874](https://github.com/ClickHouse/ClickHouse/pull/95874) ([pufit](https://github.com/pufit)).
* Fix executing tupleElement on JSON with nested paths, previously it could lead to wrong query result. [#95907](https://github.com/ClickHouse/ClickHouse/pull/95907) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed a `NOT_SUPPORTED` error that could occur when using the `direct` join algorithm with an empty MergeTree table. [#95935](https://github.com/ClickHouse/ClickHouse/pull/95935) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix the client not suggesting and auto-completing alias names for settings, closes [#92190](https://github.com/ClickHouse/ClickHouse/issues/92190). [#95945](https://github.com/ClickHouse/ClickHouse/pull/95945) ([phulv94](https://github.com/phulv94)).
* Fix event\_date in system.asynchronous\_metric\_log. [#95947](https://github.com/ClickHouse/ClickHouse/pull/95947) ([Raúl Marín](https://github.com/Algunenano)).
* Fix skipping paths in JSON data type. Previously with `JSON(SKIP path)` all JSON keys with prefix `path` were skipped, even keys like `"pathpath"`, so it could lead to data loss for these paths during insert. Now it's fixed and only key `"path"` is skipped. [#95948](https://github.com/ClickHouse/ClickHouse/pull/95948) ([Pavel Kruglov](https://github.com/Avogar)).
* Part with unknown projections should not be marked as lost forever. [#95952](https://github.com/ClickHouse/ClickHouse/pull/95952) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Fix empty string becoming `NULL` in `Join` table with `Nullable(String)` key. Closes [#71414](https://github.com/ClickHouse/ClickHouse/issues/71414). [#96002](https://github.com/ClickHouse/ClickHouse/pull/96002) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Now the PostgreSQL engine can correctly read `BOOLEAN[]`. Closes [#72754](https://github.com/ClickHouse/ClickHouse/issues/72754). [#96006](https://github.com/ClickHouse/ClickHouse/pull/96006) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix the `ProtobufList` format for the case of reading from an empty file. Closes [#70059](https://github.com/ClickHouse/ClickHouse/issues/70059). [#96007](https://github.com/ClickHouse/ClickHouse/pull/96007) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `ProtobufList` format producing ghost record for empty tables. Closes [#72596](https://github.com/ClickHouse/ClickHouse/issues/72596). [#96010](https://github.com/ClickHouse/ClickHouse/pull/96010) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `if` function type mismatch between `UInt64` and `Int32` in an unusual case of distributed queries and PREWHERE, with type inference. Closes [#70017](https://github.com/ClickHouse/ClickHouse/issues/70017). [#96012](https://github.com/ClickHouse/ClickHouse/pull/96012) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `JIT` compiled queries involving `Bool` types. [#96013](https://github.com/ClickHouse/ClickHouse/pull/96013) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error when reading UUID column from SQLite TEXT column. Closes [#71263](https://github.com/ClickHouse/ClickHouse/issues/71263). [#96016](https://github.com/ClickHouse/ClickHouse/pull/96016) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix SQLite engine type conversion for `DateTime`, `Date`, `UUID`, and other types. Closes [#73481](https://github.com/ClickHouse/ClickHouse/issues/73481). [#96017](https://github.com/ClickHouse/ClickHouse/pull/96017) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `FixedString` values were escaped incorrectly in queries to external databases, SQLite and PostgreSQL. Closes [#73519](https://github.com/ClickHouse/ClickHouse/issues/73519). Co-authored with @jh0x. [#96019](https://github.com/ClickHouse/ClickHouse/pull/96019) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix assertion failure in WindowTransform with a large PRECEDING offset. Closes [#75852](https://github.com/ClickHouse/ClickHouse/issues/75852). [#96026](https://github.com/ClickHouse/ClickHouse/pull/96026) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a bug with possible data corruption when concurrent async inserts are using the same parameter names but contain different values. [#96035](https://github.com/ClickHouse/ClickHouse/pull/96035) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix period for global profilers (controlled by `global_profiler_real_time_period_ns` and `global_profiler_cpu_time_period_ns`). Instead of set value, a truncated value was used, causing profiler to wakeup more than intended. [#96048](https://github.com/ClickHouse/ClickHouse/pull/96048) ([Antonio Andelic](https://github.com/antonio2368)).
* Earlier if reference data file inside iceberg manifest file for position delete was present in an entry but was null, we didn't get correct bounds for a corresponding data files. This PR fixes this bug. [#96061](https://github.com/ClickHouse/ClickHouse/pull/96061) ([Daniil Ivanik](https://github.com/divanik)).
* Fix revoking default roles. [#96103](https://github.com/ClickHouse/ClickHouse/pull/96103) ([Vitaly Baranov](https://github.com/vitlibar)).
* Fix use-after-free in the index analysis in a rare combination of disabled `use_primary_key` and a very large number of disjunctions of conditions that use the index. [#96112](https://github.com/ClickHouse/ClickHouse/pull/96112) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a regression with the `Gorilla` codec when an explicitly specified size does not correspond to the data type size, and the buffer size is too small. In previous versions, it threw an exception on decompression. Closes [#78253](https://github.com/ClickHouse/ClickHouse/issues/78253). [#96118](https://github.com/ClickHouse/ClickHouse/pull/96118) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Avoid a deadlock in dictionaries loaded when one dictionary references a Merge table that references it recursively. Closes [#78360](https://github.com/ClickHouse/ClickHouse/issues/78360). [#96120](https://github.com/ClickHouse/ClickHouse/pull/96120) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix use-of-uninitialized-value in `formatDateTime` with non-fixed-width formatters, such as MySQL and JODA-style. [#96133](https://github.com/ClickHouse/ClickHouse/pull/96133) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The combination of settings `use_const_adaptive_granularity` and `index_granularity_bytes` (which means "non-adaptive granularity") led to a miscalculation of the number of rows to read and an exception. [#96143](https://github.com/ClickHouse/ClickHouse/pull/96143) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Running an invalid ALTER UPDATE mutation on object storage file-like tables, such as S3 and Azure, could lead to a nullptr dereference. Closes [#92994](https://github.com/ClickHouse/ClickHouse/issues/92994). [#96162](https://github.com/ClickHouse/ClickHouse/pull/96162) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `AccessRights::contains` returning incorrect results with partial revokes. [#96170](https://github.com/ClickHouse/ClickHouse/pull/96170) ([pufit](https://github.com/pufit)).
* Fix query condition cache hash collision for CTE folded constants, which could lead to a wrong query result. Closes [#96060](https://github.com/ClickHouse/ClickHouse/issues/96060). [#96172](https://github.com/ClickHouse/ClickHouse/pull/96172) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix possible deadlock in ProcessList. It can happen because of possible lock inversion if memory overcommit tracker triggers when we are adding task to cancellation checker. [#96182](https://github.com/ClickHouse/ClickHouse/pull/96182) ([Antonio Andelic](https://github.com/antonio2368)).
* Fixed a bug where queries involving outer joins (LEFT, RIGHT, or FULL) combined with multiple INNER JOINs could return incorrect results due to illegal join reordering. When an outer join's ON condition referenced columns from multiple previously joined tables, the optimizer failed to account for all table dependencies and could reorder the joins incorrectly, producing missing rows. Close [#95972](https://github.com/ClickHouse/ClickHouse/issues/95972). [#96193](https://github.com/ClickHouse/ClickHouse/pull/96193) ([Vladimir Cherkasov](https://github.com/vdimir)).
* When a table has no statistics defined, ClickHouse shouldn't try to load them. This avoids some overhead (100+ms) for checking if the statistics files exist. (issue [#96068](https://github.com/ClickHouse/ClickHouse/issues/96068)). [#96233](https://github.com/ClickHouse/ClickHouse/pull/96233) ([Han Fei](https://github.com/hanfei1991)).
* Fix `optimize_syntax_fuse_functions` to not rewrite `sum/count/avg` into `sumCount()` when the aggregate argument is `LowCardinality(Nullable)`. Closes [#95390](https://github.com/ClickHouse/ClickHouse/issues/95390). [#96239](https://github.com/ClickHouse/ClickHouse/pull/96239) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix incorrect partition pruning for `not IN` and `not has` function in some cases. [#96241](https://github.com/ClickHouse/ClickHouse/pull/96241) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix `stack-use-after-scope` in the vector similarity index. [#96259](https://github.com/ClickHouse/ClickHouse/pull/96259) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix test runner not recognizing error hint comments when a query is preceded by a SQL comment. [#96336](https://github.com/ClickHouse/ClickHouse/pull/96336) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Fix logical error in KeyCondition when a table has a nullable primary key, and the query uses the `coalesce` function, which has its first argument constant. [#96340](https://github.com/ClickHouse/ClickHouse/pull/96340) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* The interaction of `GROUPING SETS`, `group_by_use_nulls`, and the `Tuple` data type with `LowCardinality` inside it, could produce an unexpected block structure in the query pipeline, which led to a logical error. This appeared after the introduction of `Nullable` `Tuple`s. [#96358](https://github.com/ClickHouse/ClickHouse/pull/96358) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* It was possible to create a table with an empty expression `()` as an index, which led to an invalid memory access. [#96363](https://github.com/ClickHouse/ClickHouse/pull/96363) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed crash in old analyzer if JOIN and duplicated aliases. [#96405](https://github.com/ClickHouse/ClickHouse/pull/96405) ([Ilya Golshtein](https://github.com/ilejn)).
* Fix `Nested columns sizes are inconsistent with local_discriminators` error due to a wrong in-place filtering optimization for Variant columns. [#96410](https://github.com/ClickHouse/ClickHouse/pull/96410) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `CREATE TABLE ... CLONE AS ...` ignoring full qualifier of source table. [#96415](https://github.com/ClickHouse/ClickHouse/pull/96415) ([Hasyimi Bahrudin](https://github.com/hasyimibhar)).
* Fix `mysql` table function canceling by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client. [#96437](https://github.com/ClickHouse/ClickHouse/pull/96437) ([Roman Vasin](https://github.com/rvasin)).
* Fixes livelock in the cancellation checker thread for queries with high `max_execution_time` values. [#96450](https://github.com/ClickHouse/ClickHouse/pull/96450) ([Sergei Trifonov](https://github.com/serxa)).
* Fix a logical error in some cases when fractional `LIMIT/OFFSET` is used in distributed queries. [#96475](https://github.com/ClickHouse/ClickHouse/pull/96475) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix null pointer dereference in certain expressions with lambda functions. [#96479](https://github.com/ClickHouse/ClickHouse/pull/96479) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect results when `LowCardinality` columns are converted to `Nullable`. [#96483](https://github.com/ClickHouse/ClickHouse/pull/96483) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix a crash when creating an Iceberg table with an `ORDER BY` clause referencing a non-existent column or using a positional argument. Closes [#93280](https://github.com/ClickHouse/ClickHouse/issues/93280). [#96484](https://github.com/ClickHouse/ClickHouse/pull/96484) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix runtime filter exception for Tuple columns with Nullable subfields. [#96509](https://github.com/ClickHouse/ClickHouse/pull/96509) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception in Parquet V3 native reader when `PREWHERE` filter column contains non-boolean UInt8 values. [#96594](https://github.com/ClickHouse/ClickHouse/pull/96594) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix implicit index regeneration in replicated tables during metadata changes. [#96600](https://github.com/ClickHouse/ClickHouse/pull/96600) ([Raúl Marín](https://github.com/Algunenano)).
* Fixes a datarace on DROP WORKLOAD. [#96614](https://github.com/ClickHouse/ClickHouse/pull/96614) ([Sergei Trifonov](https://github.com/serxa)).
* Fix a bug in Iceberg table writes where partitioned inserts could produce incorrect data distribution across partition files. [#96620](https://github.com/ClickHouse/ClickHouse/pull/96620) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fixed `heap-use-after-free` in `CREATE TABLE` with constraints. [#96669](https://github.com/ClickHouse/ClickHouse/pull/96669) ([Nikita Taranov](https://github.com/nickitat)).
* Validate witness version in bech32 to avoid buffer overflow. [#96671](https://github.com/ClickHouse/ClickHouse/pull/96671) ([Raúl Marín](https://github.com/Algunenano)).
* Fix `system.tables` returning errors when a Data Lake REST catalog is created with an invalid `auth_header` setting. [#96680](https://github.com/ClickHouse/ClickHouse/pull/96680) ([Han Fei](https://github.com/hanfei1991)).
* Fix `min(timestamp)` returning epoch (`1970-01-01`) via `_minmax_count_projection` after TTL merge when all rows in a block are filtered out. [#96703](https://github.com/ClickHouse/ClickHouse/pull/96703) ([Raquel Barbadillo](https://github.com/rbarbadillo)).
* Improve validation of the `iceberg_metadata_file_path` setting to prevent path traversal and ensure the specified metadata file is within the table directory. [#96754](https://github.com/ClickHouse/ClickHouse/pull/96754) ([Daniil Ivanik](https://github.com/divanik)).
* Fix crash in `ifNull` with `Variant` argument used in `GROUP BY`. [#96790](https://github.com/ClickHouse/ClickHouse/pull/96790) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fixed cache key collisions between tables with `table_disk=1` setting. [#96818](https://github.com/ClickHouse/ClickHouse/pull/96818) ([Raufs Dunamalijevs](https://github.com/rienath)).
* 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)).
* Fix `LOGICAL_ERROR` exception in `FunctionVariantAdaptor` when a function operating on Variant columns returns `Nothing` type, which can happen with empty arrays in `UNION ALL` queries. [#97213](https://github.com/ClickHouse/ClickHouse/pull/97213) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a data race during S3 multipart copy operations (e.g., during `BACKUP`/`RESTORE` to S3) that could cause exceptions under concurrent access. [#97227](https://github.com/ClickHouse/ClickHouse/pull/97227) ([Azat Khuzhin](https://github.com/azat)).
* Fix `LOGICAL_ERROR` exception when `arrayJoin` in `WHERE` clause references columns from both sides of a `JOIN`. [#97239](https://github.com/ClickHouse/ClickHouse/pull/97239) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception when reading `.size` subcolumn of a sparse `Nullable(String)` in a Tuple with PREWHERE. [#97264](https://github.com/ClickHouse/ClickHouse/pull/97264) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix exception "Number of rows in lazy chunk does not match number of offsets" in `LazyMaterializingTransform` when reading from tables with non-adaptive index granularity (`index_granularity_bytes = 0`) using `ORDER BY ... LIMIT`. [#97270](https://github.com/ClickHouse/ClickHouse/pull/97270) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `SYSTEM RESTART REPLICA` losing table from database when table re-creation fails with a non-ZooKeeper exception (e.g. memory limit), causing metadata digest mismatches in `DatabaseReplicated`. [#97276](https://github.com/ClickHouse/ClickHouse/pull/97276) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Field `readonly` in `system.merge_tree_settings` now properly reflects that certain merge tree settings (e.g. `index_granularity`) are unconditionally readonly. [#97277](https://github.com/ClickHouse/ClickHouse/pull/97277) ([Robert Schulze](https://github.com/rschu1ze)).
* Fix a crash during `count()` optimization on `MergeTree` tables when the storage snapshot was created without data. [#97281](https://github.com/ClickHouse/ClickHouse/pull/97281) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix a possible crash when resolving function names from debug information for stack traces. [#97294](https://github.com/ClickHouse/ClickHouse/pull/97294) ([Azat Khuzhin](https://github.com/azat)).
* Fix logical error with analyzer\_compatibility\_join\_using\_top\_level\_identifier and ALIAS columns. Close [#96228](https://github.com/ClickHouse/ClickHouse/issues/96228). [#97297](https://github.com/ClickHouse/ClickHouse/pull/97297) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix `LOGICAL_ERROR` exception in `applyOrder` when using text-indexed columns with `QUALIFY` clause. [#97313](https://github.com/ClickHouse/ClickHouse/pull/97313) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* System table `system.functions` now shows for internal functions `categories = 'Internal'` instead of `categories = ''`. [#97315](https://github.com/ClickHouse/ClickHouse/pull/97315) ([Robert Schulze](https://github.com/rschu1ze)).
* Query with RIGHT JOIN chain and enabled parallel replicas can produce incorrect result. Fixes [#74341](https://github.com/ClickHouse/ClickHouse/issues/74341). [#97316](https://github.com/ClickHouse/ClickHouse/pull/97316) ([Igor Nikonov](https://github.com/devcrafter)).
* Fix spurious `TABLE_UUID_MISMATCH` errors that could occur with refreshable materialized views and other scenarios where tables are renamed. [#97323](https://github.com/ClickHouse/ClickHouse/pull/97323) ([Azat Khuzhin](https://github.com/azat)).
* Fix segfault in `StorageKeeperMap` backup due to use-after-free of dangling storage pointer in lazy backup batch. [#97336](https://github.com/ClickHouse/ClickHouse/pull/97336) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix the `exists` function with a scalar subquery inside an `ALTER UPDATE/DELETE` when `mutations_execute_subqueries_on_initiator` is enabled. The scalar subquery was incorrectly evaluated, which could lead to an error or a corrupt mutation command that made the table unloadable on the next server restart. [#97347](https://github.com/ClickHouse/ClickHouse/pull/97347) ([Kirill Kopnev](https://github.com/Fgrtue)).
* Fix logical exception `Unexpected return type from equals. Expected Nullable(UInt8). Got Const(LowCardinality(Nullable(UInt8)))` when comparing NULL with a Variant column containing LowCardinality types. [#97379](https://github.com/ClickHouse/ClickHouse/pull/97379) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a possible race condition when `EXCHANGE TABLES` is executed in parallel with the sharded query cache enabled. [#97411](https://github.com/ClickHouse/ClickHouse/pull/97411) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix `LOGICAL_ERROR` exception in Array-to-`QBit` conversion when `nullable_source` from an outer `Tuple` wrapper replaces the converted array column with a mismatched column type. Closes [#97389](https://github.com/ClickHouse/ClickHouse/issues/97389). [#97413](https://github.com/ClickHouse/ClickHouse/pull/97413) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix AST formatting roundtrip inconsistency for aliased tuple literals inside parentheses, e.g., `(('a', 'b') AS x)` was incorrectly reformatted as `tuple(('a', 'b') AS x)`. [#97418](https://github.com/ClickHouse/ClickHouse/pull/97418) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix an exception during asynchronous inserts with deduplication when a parsing failure produced an empty block with zero rows. [#97460](https://github.com/ClickHouse/ClickHouse/pull/97460) ([Sema Checherinda](https://github.com/CheSema)).
* Fix exception "Number of rows in lazy chunk does not match number of offsets" in `LazyMaterializingTransform` when reading from tables with non-adaptive index granularity (`index_granularity_bytes = 0`) using `ORDER BY ... LIMIT`. [#97482](https://github.com/ClickHouse/ClickHouse/pull/97482) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix insert iceberg settings. Add alias for the `allow_experimental_insert_into_iceberg` setting. [#97483](https://github.com/ClickHouse/ClickHouse/pull/97483) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix `ACCESS_DENIED` for users without `CREATE TEMPORARY TABLE` permission when `optimize_inverse_dictionary_lookup` optimization rewrites `dictGet(...)` predicates. ClickHouse now skips the rewrite and executes the original expression. Closes [#97269](https://github.com/ClickHouse/ClickHouse/issues/97269). [#97484](https://github.com/ClickHouse/ClickHouse/pull/97484) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix assertion failure (exception in debug/sanitizer builds) in `Set` and `MergeTreeIndexSet` when processing columns with inner sparse subcolumns (e.g., `Tuple` columns from MergeTree parts with different sparse serialization profiles). [#97493](https://github.com/ClickHouse/ClickHouse/pull/97493) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a possible use after free in StorageKafka2. [#97520](https://github.com/ClickHouse/ClickHouse/pull/97520) ([Bharat Nallan](https://github.com/bharatnc)).
* Fix `INTO OUTFILE` with `TRUNCATE` and `into_outfile_create_parent_directories` setting when the output path contains directories. [#97549](https://github.com/ClickHouse/ClickHouse/pull/97549) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `BAD_ARGUMENTS` error when querying tables with lambda expressions inside ALIAS columns through the `merge()` table function with the analyzer enabled. [#97551](https://github.com/ClickHouse/ClickHouse/pull/97551) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `system.zookeeper_info` exception when Keeper zxid is 0. [#97553](https://github.com/ClickHouse/ClickHouse/pull/97553) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a possible logical error in `ip_trie` dictionary when key type is not String. [#97555](https://github.com/ClickHouse/ClickHouse/pull/97555) ([Bharat Nallan](https://github.com/bharatnc)).
* Fix REST catalog OAuth authentication not working for the base `RestCatalog` (it only worked for derived catalogs like `OneLakeCatalog`). This broke the default REST catalog after BigLake catalog was introduced. [#97561](https://github.com/ClickHouse/ClickHouse/pull/97561) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Geometry functions (`perimeterSpherical`, `areaSpherical`, etc.) now accept individual geometry subtypes (`Polygon`, `Ring`, `Point`, etc.) in addition to the `Geometry` variant type. [#97571](https://github.com/ClickHouse/ClickHouse/pull/97571) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `LOGICAL_ERROR` exception when using `isNull`/`isNotNull` on subcolumns of `Nullable(Tuple(... Nullable(T) ...))` types. Closes [#97224](https://github.com/ClickHouse/ClickHouse/issues/97224). [#97582](https://github.com/ClickHouse/ClickHouse/pull/97582) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix null pointer dereference when applying patch parts during lightweight updates. [#97583](https://github.com/ClickHouse/ClickHouse/pull/97583) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `BaseSettings::readBinary` passes the index from `accessor.find` to `field_infos[]` without checking for the not-found sentinel value (i.e., `-1`), which may cause a `std::vector` out-of-bounds access. The issue was caught thanks to libcxx hardening. This probably happened during query plan deserialization when a newer server sends a setting unknown to an older server. The string-based read method already handles this correctly; `readBinary` was missing the same check. [#97585](https://github.com/ClickHouse/ClickHouse/pull/97585) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix incorrect query results for `UNION ALL` queries where one branch had a constant-false predicate — the branch would incorrectly read data instead of returning nothing. [#97620](https://github.com/ClickHouse/ClickHouse/pull/97620) ([Bharat Nallan](https://github.com/bharatnc)).
* Fix `IN (col)` with a single column reference failing with `UNSUPPORTED_METHOD` error. [#97646](https://github.com/ClickHouse/ClickHouse/pull/97646) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix logical error exception during `GROUP BY ... WITH ROLLUP/CUBE` when keys include `LowCardinality(Nullable(...))` inside `Nullable(Tuple(...))`. [#97647](https://github.com/ClickHouse/ClickHouse/pull/97647) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix AST formatting inconsistency for `NOT (1, 1, 1)` that could cause `LOGICAL_ERROR` in debug builds. [#97653](https://github.com/ClickHouse/ClickHouse/pull/97653) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix `keeper-converter` exception when encountering empty ZooKeeper transaction log files. [#97673](https://github.com/ClickHouse/ClickHouse/pull/97673) ([Alexey Milovidov](https://github.com/alexey-milovidov)).

#### Build/Testing/Packaging Improvement

* ClickHouse can be built with clang-23 (master). [#95578](https://github.com/ClickHouse/ClickHouse/pull/95578) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix force `is_local` to false when `bind_host` is configured and replace with integration test. Follow-up for [#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)).
* Stress tests: fix stress and upgrade tests in CI. ignore `no-{build}` tags. add compatibility randomization. [#94693](https://github.com/ClickHouse/ClickHouse/pull/94693) ([Nikita Fomichev](https://github.com/fm4v)).
* Publish parser\_memory\_profiler binary from build. Tool can be used to analyze AST memory consumption. [#95826](https://github.com/ClickHouse/ClickHouse/pull/95826) ([Ilya Yatsishin](https://github.com/qoega)).
* Add `--symbolize` flag for `parser_memory_profiler` tool that produces `.heap.sym` files with resolved symbols in results. [#96477](https://github.com/ClickHouse/ClickHouse/pull/96477) ([Ilya Yatsishin](https://github.com/qoega)).
* Pin third-party Docker images in integration tests to specific versions. [#96500](https://github.com/ClickHouse/ClickHouse/pull/96500) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Restore the possibility to link `OpenSSL` dynamically. This is not recommended and not used by any production builds, but the option still exists for enthusiasts on the Internet. [#96506](https://github.com/ClickHouse/ClickHouse/pull/96506) ([Govind R Nair](https://github.com/Revertionist)).
* Reduce `magic_enum` range from \[-100, 1000] to default \[-128, 127] by using a per-type specialization for `Coordination::OpNum`, improving build time. [#96632](https://github.com/ClickHouse/ClickHouse/pull/96632) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove unnecessary C++ templates from Function classes to reduce build times. [#96646](https://github.com/ClickHouse/ClickHouse/pull/96646) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Move `StorageSystemLicenses` generation to configure time to improve build parallelism. [#96697](https://github.com/ClickHouse/ClickHouse/pull/96697) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Parallelize license scanning. [#96727](https://github.com/ClickHouse/ClickHouse/pull/96727) ([Raúl Marín](https://github.com/Algunenano)).
* Add stateless functional test for SSH protocol support. [#96996](https://github.com/ClickHouse/ClickHouse/pull/96996) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add Kafka 3.9.0 to the stateless functional test infrastructure, enabling direct testing of Kafka and Kafka2 table engines using ClickHouse Keeper as ZooKeeper. Six new stateless tests cover basic produce/consume, virtual columns, INSERT, multiple formats, broken message handling, and Keeper-based offset storage. [#96997](https://github.com/ClickHouse/ClickHouse/pull/96997) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Add a CI workflow to build PGO+BOLT optimized clang toolchain. [#96991](https://github.com/ClickHouse/ClickHouse/pull/96991) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Use the PGO-optimized LLVM/Clang build in CI, which should give 20..30% build speed improvement. [#97031](https://github.com/ClickHouse/ClickHouse/pull/97031) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Replace math functions from glibc with llvm-libc implementations. [#90151](https://github.com/ClickHouse/ClickHouse/pull/90151) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Update Boost from 1.83 to 1.90, fixing a `devector` assertion failure in debug builds. [#97037](https://github.com/ClickHouse/ClickHouse/pull/97037) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Update `postgres` to REL\_18\_1. [#95189](https://github.com/ClickHouse/ClickHouse/pull/95189) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `libexpat` 2.7.3. [#95218](https://github.com/ClickHouse/ClickHouse/pull/95218) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `OpenSSL` 3.5.5. [#95345](https://github.com/ClickHouse/ClickHouse/pull/95345) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `simdjson` v4.2.4. [#97129](https://github.com/ClickHouse/ClickHouse/pull/97129) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `libarchive` 3.8.5. [#97131](https://github.com/ClickHouse/ClickHouse/pull/97131) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `fast_float` v8.2.3. [#97133](https://github.com/ClickHouse/ClickHouse/pull/97133) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Use `abseil-cpp` 20260107.1, `s2geometry` to v0.13.1. [#97134](https://github.com/ClickHouse/ClickHouse/pull/97134) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Bump `libxml2` to 2.15.1. [#95574](https://github.com/ClickHouse/ClickHouse/pull/95574) ([Robert Schulze](https://github.com/rschu1ze)).
* Upgraded 7 Tier-3 integration test Docker images from EOL or removed base images to current supported versions. [#97314](https://github.com/ClickHouse/ClickHouse/pull/97314) ([Rahul](https://github.com/motsc)).
* Add TPC-DS benchmark queries. [#97349](https://github.com/ClickHouse/ClickHouse/pull/97349) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Replace individual x86 instruction-set cmake options (`ENABLE_SSSE3`, `ENABLE_AVX2`, `NO_SSE3_OR_HIGHER`, `ARCH_NATIVE`, etc.) with a single numeric `X86_ARCH_LEVEL` option (`1`/`2`/`3`/`4`), matching the standard x86-64 microarchitecture levels already used by the runtime dispatch system. [#97354](https://github.com/ClickHouse/ClickHouse/pull/97354) ([Raúl Marín](https://github.com/Algunenano)).
* Avoid instantiating `division_by_nullable=true` template variants for non-division operations in `FunctionBinaryArithmetic`, reducing compilation time and binary size. [#97496](https://github.com/ClickHouse/ClickHouse/pull/97496) ([Raúl Marín](https://github.com/Algunenano)).
* Reduce the include footprint of `Exception.h` by removing it from high-fan-out headers like `typeid_cast.h`, `assert_cast.h`, `Context_fwd.h`, `IDataType.h`, and various Column headers. [#97497](https://github.com/ClickHouse/ClickHouse/pull/97497) ([Raúl Marín](https://github.com/Algunenano)).
* Always use bundled `compiler-rt` headers (sanitizer and XRay interfaces) instead of the host compiler's headers, and build `compiler-rt` libraries from source by default. [#97499](https://github.com/ClickHouse/ClickHouse/pull/97499) ([Raúl Marín](https://github.com/Algunenano)).
* Avoid including boost/multiprecision headers in `wide_integer_impl.h` on platforms with adequate `long double`, improving build time. [#96633](https://github.com/ClickHouse/ClickHouse/pull/96633) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Implement LLVM Code Coverage job and enable it initially for master branch. [#90952](https://github.com/ClickHouse/ClickHouse/pull/90952) ([Alexey Bakharew](https://github.com/alexbakharew)).
* Enable fast libcxx hardening for release builds. This is mostly needed for out-of-bounds checks. Given performance tests results, no noticeable performance impact is expected. [#94757](https://github.com/ClickHouse/ClickHouse/pull/94757) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).

<h3 id="261">
  ClickHouse release 26.1, 2026-01-29. [Presentation](https://presentations.clickhouse.com/2026-release-26.1/), [Video](https://www.youtube.com/watch?v=fWuYt4M0xE4)
</h3>

#### Backward Incompatible Change

* Fix inconsistent formatting caused by an incorrect substitution of aliases in the formatter. This closes [#82833](https://github.com/ClickHouse/ClickHouse/issues/82833). This closes [#82832](https://github.com/ClickHouse/ClickHouse/issues/82832). This closes [#68296](https://github.com/ClickHouse/ClickHouse/issues/68296). This change is potentially backward incompatible: when the analyzer is disabled, certain CREATE VIEW queries with IN referencing an alias cannot be processed. To prevent the incompatibility, enable the analyzer (it is enabled by default since 24.3). [#82838](https://github.com/ClickHouse/ClickHouse/pull/82838) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Codecs `DEFLATE_QPL` and `ZSTD_QAT` were removed. Users are advised to convert existing data compressed with `DEFLATE_QPL` or `ZSTD_QAT` to another codec before upgrade. Note that in order to use the codecs, settings `enable_deflate_qpl_codec` and `enable_zstd_qat_codec` had to be enabled. [#92150](https://github.com/ClickHouse/ClickHouse/pull/92150) ([Robert Schulze](https://github.com/rschu1ze)).
* Improve UDF debugging by enabling stderr capture in `system.query_log.exception`. Previously, UDF stderr was only logged to files and not exposed in query logs, making debugging impossible. Now stderr triggers exceptions by default and is fully accumulated (up to 1MB) before throwing, so complete Python tracebacks and error messages appear in `system.query_log.exception` for effective troubleshooting. [#92209](https://github.com/ClickHouse/ClickHouse/pull/92209) ([Xu Jia](https://github.com/XuJia0210)).
* Empty column list in `JOIN USING ()` clause is now considered a syntax error. Previously it was supposed to be `INVALID_JOIN_ON_EXPRESSION` during query execution. In some cases such as joining with `Join` storage it led to `LOGICAL_ERROR`, close [#82502](https://github.com/ClickHouse/ClickHouse/issues/82502). [#92371](https://github.com/ClickHouse/ClickHouse/pull/92371) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Use partial match for SKIP REGEXP in JSON type by default. Closes [#79250](https://github.com/ClickHouse/ClickHouse/issues/79250). [#92847](https://github.com/ClickHouse/ClickHouse/pull/92847) ([Pavel Kruglov](https://github.com/Avogar)).
* Revert "Allow INSERT into simple ALIAS columns" (Reverts ClickHouse/ClickHouse[#84154](https://github.com/ClickHouse/ClickHouse/issues/84154)). It does not work with custom formats, and is not guarded with a setting. [#92849](https://github.com/ClickHouse/ClickHouse/pull/92849) ([Azat Khuzhin](https://github.com/azat)).
* Setting to throw an error if a data lake catalog doesn't have access to object storage. [#93606](https://github.com/ClickHouse/ClickHouse/pull/93606) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* The `Lazy` database engine is removed and no longer available. Closes [#91231](https://github.com/ClickHouse/ClickHouse/issues/91231). [#93627](https://github.com/ClickHouse/ClickHouse/pull/93627) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove the `transposed_with_wide_view` mode of the `metric_log` - it is unusable due to a bug. It is no longer possible to define `system.metric_log` with this mode. This partially reverts [#78412](https://github.com/ClickHouse/ClickHouse/issues/78412). [#93867](https://github.com/ClickHouse/ClickHouse/pull/93867) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* CPU scheduling for workloads is now preemptive by default. See `cpu_slot_preemption` server setting. [#94060](https://github.com/ClickHouse/ClickHouse/pull/94060) ([Sergei Trifonov](https://github.com/serxa)).
* Escape index filenames to prevent broken parts. With this change ClickHouse will fail to load indices with non-ascii characters in their name created by previous versions. To handle it you can use the merge tree setting `escape_index_filenames`. [#94079](https://github.com/ClickHouse/ClickHouse/pull/94079) ([Raúl Marín](https://github.com/Algunenano)).
* Format settings `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` and `dictionary_use_async_executor` were changed to be regular (non-format) settings now. This is a purely internal change without user-visible side effects except in the (unlikely) case that you specified any of these settings in Iceberg or DeltaLake or Kafka or S3 or S3Queue or Azure or Hive or RabbitMQ or Set or FileLog or NATS table engine definitions. In these cases, these settings were previously ignored, now such definitions throw an error. [#94106](https://github.com/ClickHouse/ClickHouse/pull/94106) ([Robert Schulze](https://github.com/rschu1ze)).
* The `joinGet/joinGetOrNull` functions now enforce `SELECT` privileges on the underlying Join table. After this change, executing `joinGet('db.table', 'column', key)` requires the user to have `SELECT` privilege on both the key columns defined in the Join table and the attribute column being retrieved. Queries lacking these privileges will fail with `ACCESS_DENIED`. To migrate, grant the necessary permissions using `GRANT SELECT ON db.join_table TO user` for full table access, or `GRANT SELECT(key_col, attr_col) ON db.join_table TO user` for column-level access. This change affects all users and applications relying on `joinGet`/`joinGetOrNull` where explicit `SELECT` grants were not previously configured. [#94307](https://github.com/ClickHouse/ClickHouse/pull/94307) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Check `SHOW COLUMNS` for `CREATE TABLE ... AS ...` queries. Previously, it checked `SHOW TABLES`, which is an incorrect grant for this type of permission check. [#94556](https://github.com/ClickHouse/ClickHouse/pull/94556) ([pufit](https://github.com/pufit)).
* Make the `Hash` output format independent of block sizes. [#94503](https://github.com/ClickHouse/ClickHouse/pull/94503) ([Alexey Milovidov](https://github.com/alexey-milovidov)). Note that this changes the output hash values compared to previous versions.

#### New Feature

* HTTP API and embedded Web UI for ClickHouse Keeper. [#78181](https://github.com/ClickHouse/ClickHouse/pull/78181) ([pufit](https://github.com/pufit) and [speeedmaster](https://github.com/speeedmaster)).
* Async insert deduplication now works with dependent materialized views. When collision by block\_id occurs, the original block is filtered to remove rows associated with the block\_id, and the remaining rows are transformed with all relevant materialized views select queries, this rebuilds original block without conflicting rows. [#89140](https://github.com/ClickHouse/ClickHouse/pull/89140) ([Sema Checherinda](https://github.com/CheSema)). It is allowed to use deduplication with async inserts when materialized views are involved. [#93957](https://github.com/ClickHouse/ClickHouse/pull/93957) ([Sema Checherinda](https://github.com/CheSema)).
* Introduced a new syntax and framework to simplify and extend projection index feature. This follows up [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)).
* Add text index support for `Array` columns. [#89895](https://github.com/ClickHouse/ClickHouse/pull/89895) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Enable `use_variant_as_common_type` by default, which lets you use incompatible types inside an `Array`, in `UNION` queries, and in branches of `if`/`multiIf`/`case`. [#90677](https://github.com/ClickHouse/ClickHouse/pull/90677) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* New system table `zookeeper_info`. Implements [#88014](https://github.com/ClickHouse/ClickHouse/issues/88014). [#90809](https://github.com/ClickHouse/ClickHouse/pull/90809) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* Support the `Variant` type in all functions. [#90900](https://github.com/ClickHouse/ClickHouse/pull/90900) ([Bharat Nallan](https://github.com/bharatnc)).
* Adds a `ClickHouse_Info` metric to the Prometheus `/metrics` endpoint containing mainly version information so it's possible to build charts tracking detailed version information over time. [#91125](https://github.com/ClickHouse/ClickHouse/pull/91125) ([Christoph Wurm](https://github.com/cwurm)).
* Introduce a new four letter `rcfg` command for keeper which allows to change cluster configuration. This command provides broader possibilities for configuration changes than standard `reconfigure` request. Command takes `json` string as an argument. The whole set of bytes sent to TCP interface should look like this: `rcfg{json_string_length_big_endian}{json_string}`. Some examples of command may look like this: `{"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)).
* Add function `reverseBySeparator` which reverses the order of substrings in a string separated by a specified separator. Close [#91463](https://github.com/ClickHouse/ClickHouse/issues/91463). [#91780](https://github.com/ClickHouse/ClickHouse/pull/91780) ([Xuewei Wang](https://github.com/Sallery-X)).
* Adds new setting `max_insert_block_size_bytes` which control the formation of inserted blocks in finer detail. [#92833](https://github.com/ClickHouse/ClickHouse/pull/92833) ([Kirill Kopnev](https://github.com/Fgrtue)).
* It is possible to execute DDL queries with `ON CLUSTER` clause for a Replicated database if the `ignore_on_cluster_for_replicated_database` setting is enabled. In this case, the cluster name will be ignored. [#92872](https://github.com/ClickHouse/ClickHouse/pull/92872) ([Kirill](https://github.com/kirillgarbar)).
* Implement `mergeTreeAnalyzeIndexes` function. [#92954](https://github.com/ClickHouse/ClickHouse/pull/92954) ([Azat Khuzhin](https://github.com/azat)).
* Add new setting `use_primary_key`. Set it to `false` to disable granule pruning based on the primary key. [#93319](https://github.com/ClickHouse/ClickHouse/pull/93319) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Add `icebergLocalCluster` table function. [#93323](https://github.com/ClickHouse/ClickHouse/pull/93323) ([Anton Ivashkin](https://github.com/ianton-ru)).
* Added `cosineDistanceTransposed` function that approximates the [cosine distance](https://en.wikipedia.org/wiki/Cosine_similarity#Cosine_distance) between two points. [#93621](https://github.com/ClickHouse/ClickHouse/pull/93621) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Add `files` column to system.parts table that shows the number of files in each data part. [#94337](https://github.com/ClickHouse/ClickHouse/pull/94337) ([Match](https://github.com/gayanMatch)).
* Adds a max-min fair scheduler for concurrency control. Provides better fairness under high oversubscription, where many queries compete for limited CPU slots. Short-running queries are not penalized by long-running queries that have accumulated more slots over time. Enabled by the `concurrent_threads_scheduler` server setting `max_min_fair` value. [#94732](https://github.com/ClickHouse/ClickHouse/pull/94732) ([Sergei Trifonov](https://github.com/serxa)).
* Added the ability for ClickHouse client to override TLS SNI when connecting to the server. [#89761](https://github.com/ClickHouse/ClickHouse/pull/89761) ([Matt Klein](https://github.com/mattklein123)).
* Support temporary tables in `joinGet` function calls. [#92973](https://github.com/ClickHouse/ClickHouse/pull/92973) ([Eduard Karacharov](https://github.com/korowa)).
* Support deletion vectors in `DeltaLake` table engine. [#93852](https://github.com/ClickHouse/ClickHouse/pull/93852) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Support deletion vectors for `deltaLakeCluster`. [#94365](https://github.com/ClickHouse/ClickHouse/pull/94365) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Google cloud storage support for data lakes. [#93866](https://github.com/ClickHouse/ClickHouse/pull/93866) ([Konstantin Vedernikov](https://github.com/scanhex12)).

#### Experimental Feature

* Move `QBit` from Experimental to Beta. [#93816](https://github.com/ClickHouse/ClickHouse/pull/93816) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Add support for `Nullable(Tuple)`. Set `allow_experimental_nullable_tuple_type = 1` to enable it. [#89643](https://github.com/ClickHouse/ClickHouse/pull/89643) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Support Paimon REST catalog, continuing from [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)).

#### Performance Improvement

* Setting `use_skip_indexes_on_data_read` is now enabled by default. This setting allows filtering in a streaming fashion, at the same time as reading, improving query performance and startup time. [#93407](https://github.com/ClickHouse/ClickHouse/pull/93407) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Improve performance of `DISTINCT` on `LowCardinality` columns. Closes [#5917](https://github.com/ClickHouse/ClickHouse/issues/5917). [#91639](https://github.com/ClickHouse/ClickHouse/pull/91639) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Optimize `distinctJSONPaths` aggregate function so it reads only JSON paths from data parts and not the whole JSON column. [#92196](https://github.com/ClickHouse/ClickHouse/pull/92196) ([Pavel Kruglov](https://github.com/Avogar)).
* More filters pushed down JOINs. [#85556](https://github.com/ClickHouse/ClickHouse/pull/85556) ([Nikita Taranov](https://github.com/nickitat)).
* Support more cases for push down from join ON condition when the filter uses inputs only from one side. Support `ANY`, `SEMI`, `ANTI` joins. [#92584](https://github.com/ClickHouse/ClickHouse/pull/92584) ([Dmitry Novik](https://github.com/novikd)).
* Allow using equivalent sets to push down filters for `SEMI JOIN`. Closes [#85239](https://github.com/ClickHouse/ClickHouse/issues/85239). [#92837](https://github.com/ClickHouse/ClickHouse/pull/92837) ([Dmitry Novik](https://github.com/novikd)).
* Skip reading left side of hash join when right side is empty. Previously we were reading left side until first non-empty block, which might do a lot of work in case when there is heavy filtering or aggregation. [#94062](https://github.com/ClickHouse/ClickHouse/pull/94062) ([Alexander Gololobov](https://github.com/davenger)).
* Using the "fastrange" (Daniel Lemire) method for partitioning data inside the query pipeline. This could improve parallel sorting and JOINs. [#93080](https://github.com/ClickHouse/ClickHouse/pull/93080) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Improve performance of window functions when PARTITION BY matches or is a prefix of the sorting key. [#87299](https://github.com/ClickHouse/ClickHouse/pull/87299) ([Nikita Taranov](https://github.com/nickitat)).
* Outer filter is pushed down into views which allows applying PREWHERE on local and remote nodes. Resolves [#88189](https://github.com/ClickHouse/ClickHouse/issues/88189). [#88316](https://github.com/ClickHouse/ClickHouse/pull/88316) ([Igor Nikonov](https://github.com/devcrafter)).
* Implement JIT compilations for more functions. Closes [#73509](https://github.com/ClickHouse/ClickHouse/issues/73509). [#88770](https://github.com/ClickHouse/ClickHouse/pull/88770) ([Alexey Milovidov](https://github.com/alexey-milovidov) with [Taiyang Li](https://github.com/taiyang-li)).
* If a skip index used in a `FINAL` query is on a column that is part of the primary key, the additional step to check for primary key intersection in other parts is unnecessary and now not performed. Resolves [#85897](https://github.com/ClickHouse/ClickHouse/issues/85897). [#93899](https://github.com/ClickHouse/ClickHouse/pull/93899) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Optimize performance and memory usage for fractional `LIMIT` and `OFFSET`. [#91167](https://github.com/ClickHouse/ClickHouse/pull/91167) ([Ahmed Gouda](https://github.com/0xgouda)).
* Fix using of faster random read logic for Parquet Reader V3 prefetcher. Closes [#90890](https://github.com/ClickHouse/ClickHouse/issues/90890). [#91435](https://github.com/ClickHouse/ClickHouse/pull/91435) ([Arsen Muk](https://github.com/arsenmuk)).
* Improve performance of `icebergCluster`. Closes [#91462](https://github.com/ClickHouse/ClickHouse/issues/91462). [#91537](https://github.com/ClickHouse/ClickHouse/pull/91537) ([Yang Jiang](https://github.com/Ted-Jiang)).
* Don't filter by virtual columns on constant filters. [#91588](https://github.com/ClickHouse/ClickHouse/pull/91588) ([c-end](https://github.com/c-end)).
* Reduce INSERT/merges memory usage with wide parts for very wide tables by enabling adaptive write buffers. Add support of adaptive write buffers for encrypted disks. [#92250](https://github.com/ClickHouse/ClickHouse/pull/92250) ([Azat Khuzhin](https://github.com/azat)).
* Improved performance of full text search with text index and `sparseGrams` tokenizer by reducing the number of searched tokens in the index. [#93078](https://github.com/ClickHouse/ClickHouse/pull/93078) ([Anton Popov](https://github.com/CurtizJ)).
* Function `isValidASCII` was optimized for positive outcomes, i.e. all-ASCII input values. [#93347](https://github.com/ClickHouse/ClickHouse/pull/93347) ([Robert Schulze](https://github.com/rschu1ze)).
* The read-in-order optimization now recognizes when ORDER BY columns are constant due to WHERE conditions, enabling efficient reverse-order reads. This benefits multi-tenant queries like `WHERE tenant='42' ORDER BY tenant, event_time DESC` which can now use InReverseOrder instead of requiring a full sort.". [#94103](https://github.com/ClickHouse/ClickHouse/pull/94103) ([matanper](https://github.com/matanper)).
* Introduce Enum AST specialized class to store value parameters in (string, integer) pairs instead of ASTLiteral children to optimize memory consumption. [#94178](https://github.com/ClickHouse/ClickHouse/pull/94178) ([Ilya Yatsishin](https://github.com/qoega)).
* Distributed index analysis on multiple replicas. Beneficial for shared storage and huge amount of data in cluster. This is applicable for SharedMergeTree (ClickHouse Cloud) and could be applicable for other types of MergeTree tables on a shared storage. [#86786](https://github.com/ClickHouse/ClickHouse/pull/86786) ([Azat Khuzhin](https://github.com/azat)).
* Reduce overhead of join runtime filters by disabling them in the following cases: - too many bits are set in the bloom filter - too few rows are filtered out at runtime. [#91578](https://github.com/ClickHouse/ClickHouse/pull/91578) ([Alexander Gololobov](https://github.com/davenger)).
* Use an in-memory buffer for correlated subqueries input to avoid evaluating it multiple times. Part of [#79890](https://github.com/ClickHouse/ClickHouse/issues/79890). [#91205](https://github.com/ClickHouse/ClickHouse/pull/91205) ([Dmitry Novik](https://github.com/novikd)).
* Allow all replicas to steal orphaned ranges in parallel replicas reading. This improves load balancing and reduces long-tail latency. [#91374](https://github.com/ClickHouse/ClickHouse/pull/91374) ([zoomxi](https://github.com/zoomxi)).
* External aggregation/sorting/join now respects query setting `temporary_files_codec` in all contexts. Fixed missing profile events for grace hash join. [#92388](https://github.com/ClickHouse/ClickHouse/pull/92388) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Make query memory usage detection for spilling to disk during aggregation/sorting more robust. [#92500](https://github.com/ClickHouse/ClickHouse/pull/92500) ([Azat Khuzhin](https://github.com/azat)).
* Estimate total rows count and NDV (number of distinct values) statistics of aggregation key columns. [#92812](https://github.com/ClickHouse/ClickHouse/pull/92812) ([Alexander Gololobov](https://github.com/davenger)).
* Optimize postings list compression with simdcomp. [#92871](https://github.com/ClickHouse/ClickHouse/pull/92871) ([Peng Jian](https://github.com/fastio)).
* Refactor S3Queue Ordered mode processing with buckets. This should also improve performance, reducing the number of keeper requests. [#92889](https://github.com/ClickHouse/ClickHouse/pull/92889) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Functions `mapContainsKeyLike` and `mapContainsValueLike` can now leverage a text index on `mapKeys()` or `mapValues()`, respectively. [#93049](https://github.com/ClickHouse/ClickHouse/pull/93049) ([Michael Jarrett](https://github.com/EmeraldShift)).
* Reduce memory usage on non-Linux systems (enable immediate purging of jemalloc dirty pages). [#93360](https://github.com/ClickHouse/ClickHouse/pull/93360) ([Eduard Karacharov](https://github.com/korowa)).
* Force purging of jemalloc arenas in case the ratio of dirty pages size to `max_server_memory_usage` exceeds `memory_worker_purge_dirty_pages_threshold_ratio`. [#93500](https://github.com/ClickHouse/ClickHouse/pull/93500) ([Eduard Karacharov](https://github.com/korowa)).
* Reduce memory usage for AST. [#93601](https://github.com/ClickHouse/ClickHouse/pull/93601) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* In some cases we've seen ClickHouse doesn't respect a memory limit when reading from a table. This behaviour is fixed. [#93715](https://github.com/ClickHouse/ClickHouse/pull/93715) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Enable `CHECK_STAT` and `TRY_REMOVE` Keeper extension by default. [#93886](https://github.com/ClickHouse/ClickHouse/pull/93886) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Parse lower and upper bounds of file names corresponding to position deletes from Iceberg manifest file entries for better selection of corresponding data files. [#93980](https://github.com/ClickHouse/ClickHouse/pull/93980) ([Daniil Ivanik](https://github.com/divanik)).
* Add two more settings to control maximum number of dynamic subcolumns in JSON column. First is MergeTree setting `merge_max_dynamic_subcolumns_in_compact_part` (similar to already added `merge_max_dynamic_subcolumns_in_wide_part`) that limits number of dynamic subcolumns created during merge into a Compact part. Second is query level setting `max_dynamic_subcolumns_in_json_type_parsing` that limits number of dynamic subcolumns created during parsing of JSON data, it will allow to specify the limit on insert. [#94184](https://github.com/ClickHouse/ClickHouse/pull/94184) ([Pavel Kruglov](https://github.com/Avogar)).
* Slightly optimize squashing of JSON columns for some cases. [#94247](https://github.com/ClickHouse/ClickHouse/pull/94247) ([Pavel Kruglov](https://github.com/Avogar)).
* Lower the thread pool queue sizes based on the production experience. Add an explicit memory consumption check before reading any data from the MergeTree. [#94692](https://github.com/ClickHouse/ClickHouse/pull/94692) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Make sure the scheduler would prefer MemoryWorker thread under the CPU starvation, because it protects ClickHouse process from an existential threat. [#94864](https://github.com/ClickHouse/ClickHouse/pull/94864) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
* Run purging of jemalloc dirty pages in a different thread from main thread of MemoryWorker. If purging is slow, it could delay updates of RSS usage which could lead to out of memory kills of the process. Introduce new config `memory_worker_purge_total_memory_threshold_ratio` to start purging dirty pages based on ratio of total memory usage. [#94902](https://github.com/ClickHouse/ClickHouse/pull/94902) ([Antonio Andelic](https://github.com/antonio2368)).

#### Improvement

* `system.blob_storage_log` is now available for Azure Blob Storage. [#93105](https://github.com/ClickHouse/ClickHouse/pull/93105) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Implement `blob_storage_log` for Local and HDFS. Fix an error when `S3Queue` used something other than the disk name for logging in `blob_storage_log`. Add `error_code` column to `blob_storage_log`. Split the test configuration file to simplify local testing. [#93106](https://github.com/ClickHouse/ClickHouse/pull/93106) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* `clickhouse-client` and `clickhouse-local` will highlight digit groups (thousands, millions, etc.) inside numeric literals while typing. This closes [#93100](https://github.com/ClickHouse/ClickHouse/issues/93100). [#93108](https://github.com/ClickHouse/ClickHouse/pull/93108) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Adds support in `clickhouse-client` for command-line arguments with a space surrounding the equals sign. Closes [#93077](https://github.com/ClickHouse/ClickHouse/issues/93077). [#93174](https://github.com/ClickHouse/ClickHouse/pull/93174) ([Cole Smith](https://github.com/colesmith54)).
* With `<interactive_history_legacy_keymap>true</interactive_history_legacy_keymap>`, the CLI client can now fall back to Ctrl-R for regular search like before, while Ctrl-T does fuzzy search. [#87785](https://github.com/ClickHouse/ClickHouse/pull/87785) ([Larry Snizek](https://github.com/larry-cdn77)).
* The statement to clear caches `SYSTEM DROP [...] CACHE` gave the false impression that the statement disables the cache. ClickHouse now supports statement `SYSTEM CLEAR [...] CACHE` which is more obvious. The old syntax remains available. [#93727](https://github.com/ClickHouse/ClickHouse/pull/93727) ([Pranav Tiwari](https://github.com/pranavt84)).
* Support multiple columns as primary key in `EmbeddedRocksDB`. Closes [#32819](https://github.com/ClickHouse/ClickHouse/issues/32819). [#33917](https://github.com/ClickHouse/ClickHouse/pull/33917) ([usurai](https://github.com/usurai)).
* It is now possible to use non-constant IN for scalars (queries like `val1 NOT IN if(cond, val2, val3)`). [#93495](https://github.com/ClickHouse/ClickHouse/pull/93495) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Prevent `x-amz-server-side-encryption` headers from being propagated to `HeadObject`, `UploadPart` & `CompleteMultipartUpload` S3 requests as they're not supported. [#64577](https://github.com/ClickHouse/ClickHouse/pull/64577) ([Francisco J. Jurado Moreno](https://github.com/Beetelbrox)).
* Tracking hive partitioning for ordered mode in S3Queue. Resolves [#71161](https://github.com/ClickHouse/ClickHouse/issues/71161). [#81040](https://github.com/ClickHouse/ClickHouse/pull/81040) ([Anton Ivashkin](https://github.com/ianton-ru)).
* Optimize space reservation in filesystem cache. `FileCache::collectCandidatesForEviction` will be executed without unique lock. [#82764](https://github.com/ClickHouse/ClickHouse/pull/82764) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Support composite rotation strategy (size + time) for server log. [#87620](https://github.com/ClickHouse/ClickHouse/pull/87620) ([Jianmei Zhang](https://github.com/zhangjmruc)).
* CLI client can now specify `<warnings>false</warnings>` instead of the command line `--no-warnings`. [#87783](https://github.com/ClickHouse/ClickHouse/pull/87783) ([Larry Snizek](https://github.com/larry-cdn77)).
* Add support for the `avg` aggregate function with Date, DateTime and Time values as arguments. Closes [#82267](https://github.com/ClickHouse/ClickHouse/issues/82267). [#87845](https://github.com/ClickHouse/ClickHouse/pull/87845) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* The optimization `use_join_disjunctions_push_down` is enabled by default. [#89313](https://github.com/ClickHouse/ClickHouse/pull/89313) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support more table engines and data source kinds in the correlated subqueries. Closes [#80775](https://github.com/ClickHouse/ClickHouse/issues/80775). [#90175](https://github.com/ClickHouse/ClickHouse/pull/90175) ([Dmitry Novik](https://github.com/novikd)).
* If the schema of parameterized view is specified explicitly, it is shown. Close [#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)).
* Correctly handle the gap in Keeper log entries if logs are before the last committed index. [#90403](https://github.com/ClickHouse/ClickHouse/pull/90403) ([Antonio Andelic](https://github.com/antonio2368)).
* Improve `min_free_disk_bytes_to_perform_insert` setting to work correctly with JBOD volumes. [#90878](https://github.com/ClickHouse/ClickHouse/pull/90878) ([Aleksandr Musorin](https://github.com/AVMusorin)).
* Make it possible to specify `storage_class_name` setting in named collections for `S3` table engine and `s3` table function. [#91926](https://github.com/ClickHouse/ClickHouse/pull/91926) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Support inserting auxiliary zookeeper by `system.zookeeper`. [#92092](https://github.com/ClickHouse/ClickHouse/pull/92092) ([RinChanNOW](https://github.com/RinChanNOWWW)).
* Add new metrics for the keeper: `KeeperChangelogWrittenBytes`, `KeeperChangelogFileSyncMicroseconds`, `KeeperSnapshotWrittenBytes` and `KeeperSnapshotFileSyncMicroseconds` profile events as well as `KeeperBatchSizeElements` and `KeeperBatchSizeBytes` histogram metrics. [#92149](https://github.com/ClickHouse/ClickHouse/pull/92149) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Add a new setting, `trace_profile_events_list`, which limits tracing with `trace_profile_event` to the specified list of event names. This allows more precise data collection on large workloads. [#92298](https://github.com/ClickHouse/ClickHouse/pull/92298) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Support SYSTEM NOTIFY FAILPOINT for pausable failpoints. - Support SYSTEM WAIT FAILPOINT fp PAUSE/RESUME. [#92368](https://github.com/ClickHouse/ClickHouse/pull/92368) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Add `creation` (implicit/explicit) column to `system.data_skipping_indices`. [#92378](https://github.com/ClickHouse/ClickHouse/pull/92378) ([Raúl Marín](https://github.com/Algunenano)).
* Allow passing the description of columns for YTsaurus dyn tables to the dictionary source. [#92391](https://github.com/ClickHouse/ClickHouse/pull/92391) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* In [#63985](https://github.com/ClickHouse/ClickHouse/pull/63985), we made it possible to specify all the parameters needed for TLS configuration on a per-port basis (see [composable protocols](/concepts/features/configuration/server-config/composable-protocols)), so we don't have to rely on global TLS config. However, the implementation still implicitly requires a global `openSSL.server` config section to exist, which conflicts with setups where different TLS configurations are needed for different ports. For example, in keeper-in-server deployments, we need separate TLS configs for inter-keeper communication and clickhouse client connections. [#92457](https://github.com/ClickHouse/ClickHouse/pull/92457) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Introduce a new setting `input_format_binary_max_type_complexity` that limits the total number of type nodes that can be decoded in binary format to prevent malicious payloads. [#92519](https://github.com/ClickHouse/ClickHouse/pull/92519) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Reflect running tasks in `system.background_schedule_pool{,_log}`. Add documentation. [#92587](https://github.com/ClickHouse/ClickHouse/pull/92587) ([Azat Khuzhin](https://github.com/azat)).
* Execute current query in Ctrl+R search in client if no history match found. [#92749](https://github.com/ClickHouse/ClickHouse/pull/92749) ([Azat Khuzhin](https://github.com/azat)).
* Support `EXPLAIN indices = 1` as an alias for `EXPLAIN indexes = 1`. Closes [#92483](https://github.com/ClickHouse/ClickHouse/issues/92483). [#92774](https://github.com/ClickHouse/ClickHouse/pull/92774) ([Pranav Tiwari](https://github.com/pranavt84)).
* Parquet reader now allows reading Tuple or Map columns as JSON: `select x from file(f.parquet, auto, 'x JSON')` works even if the type of column `x` in `f.parquet` is tuple or map. [#92864](https://github.com/ClickHouse/ClickHouse/pull/92864) ([Michael Kolupaev](https://github.com/al13n321)).
* Support empty tuples in parquet reader. [#92868](https://github.com/ClickHouse/ClickHouse/pull/92868) ([Michael Kolupaev](https://github.com/al13n321)).
* Fallback to read-write copy for Azure Blob Storage when native copy fails with BadRequest (e.g. invalid block list). Previously this was only done for Unauthorized error which was seen while copying blob to different storage accounts. But we also sometimes see "The specified block list is invalid" error. So now updated the condition to fallback to read & write for all native copy fails. [#92888](https://github.com/ClickHouse/ClickHouse/pull/92888) ([Smita Kulkarni](https://github.com/SmitaRKulkarni)).
* Fix EC2 metadata endpoint throttling when running many concurrent S3 queries with EC2 instance profile credentials. Previously, each query created its own `AWSInstanceProfileCredentialsProvider`, causing concurrent requests to the EC2 metadata service which could result in timeouts and `HTTP response code: 403` errors. Now the credentials provider is cached and shared across all queries. [#92891](https://github.com/ClickHouse/ClickHouse/pull/92891) ([Sav](https://github.com/sberss)).
* Rework `insert_select_deduplicate` setting to add an ability to keep backward compatibility. [#92951](https://github.com/ClickHouse/ClickHouse/pull/92951) ([Sema Checherinda](https://github.com/CheSema)).
* Log background tasks that are slower than average (`background_schedule_pool_log.duration_threshold_milliseconds=30`) to avoid excessive tasks logging. [#92965](https://github.com/ClickHouse/ClickHouse/pull/92965) ([Azat Khuzhin](https://github.com/azat)).
* In previous versions, some of C++ function names were displayed incorrectly ("mangled") in the `system.trace_log` and `system.symbols`, and the `demangle` function didn't process them well. Closes [#93074](https://github.com/ClickHouse/ClickHouse/issues/93074). [#93075](https://github.com/ClickHouse/ClickHouse/pull/93075) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Introduced the `backup_data_from_refreshable_materialized_view_targets` backup setting to skip back up of refreshable materialized views. RMVs with APPEND refresh strategy which are always backed up. [#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))
* Use minimal debug info instead of no debug info for heavy translation units, such as functions. [#93079](https://github.com/ClickHouse/ClickHouse/pull/93079) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Added MinIO compatibility support to AWS S3 C++ SDK by implementing error code mapping for MinIO-specific errors. This change allows ClickHouse to properly handle and retry MinIO server errors when using MinIO deployments instead of AWS S3, improving reliability for users running object storage on self-hosted MinIO clusters. [#93082](https://github.com/ClickHouse/ClickHouse/pull/93082) ([XiaoBinMu](https://github.com/Binnn-MX)).
* Write symbolized jemalloc profiles (eliminating the need for a binary during heap profile generation). [#93099](https://github.com/ClickHouse/ClickHouse/pull/93099) ([Azat Khuzhin](https://github.com/azat)).
* Resurrect `clickhouse git-import` tool - it was broken on large and invalid commits. See [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)).
* Don't show passwords from URL storage in query log. [#93245](https://github.com/ClickHouse/ClickHouse/pull/93245) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Support `Geometry` type for `flipCoordinates`. [#93303](https://github.com/ClickHouse/ClickHouse/pull/93303) ([Bharat Nallan](https://github.com/bharatnc)).
* Improve the UX of SYSTEM INSTRUMENT ADD/REMOVE: use String literals for function names, patch all functions that match and allow using function\_name in `REMOVE`. [#93345](https://github.com/ClickHouse/ClickHouse/pull/93345) ([Pablo Marcos](https://github.com/pamarcos)).
* Add a new setting `materialize_statistics_on_merge` which enables/disables materializing statistics during merge. The default value is `1`. [#93379](https://github.com/ClickHouse/ClickHouse/pull/93379) ([Han Fei](https://github.com/hanfei1991)).
* ClickHouse can now parse `SELECT` without parentheses around `DESCRIBE SELECT` queries. Closes [#58382](https://github.com/ClickHouse/ClickHouse/issues/58382). [#93429](https://github.com/ClickHouse/ClickHouse/pull/93429) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Add randomization of cache correctness checks under probability. [#93439](https://github.com/ClickHouse/ClickHouse/pull/93439) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Add setting `type_json_allow_duplicated_key_with_literal_and_nested_object` to allow duplicated paths in JSON where one is a literal and another is a nested object, e.g. `{"a" : 42, "a" : {"b" : 42}}`. Some data could be created before this restriction on duplicated paths was added in [https://github.com/ClickHouse/ClickHouse/pull/79317](https://github.com/ClickHouse/ClickHouse/pull/79317) and further manipulation with this data can lead to errors now. With this setting, such old data cane still be used with no errors. [#93604](https://github.com/ClickHouse/ClickHouse/pull/93604) ([Pavel Kruglov](https://github.com/Avogar)).
* Don't print values of simple types on separate lines in Pretty JSON. [#93836](https://github.com/ClickHouse/ClickHouse/pull/93836) ([Pavel Kruglov](https://github.com/Avogar)).
* When there are many `alter table ... modify setting ...` statements, it's possible not to acquire lock for 5 seconds. Better to return `timeout` than `logical error`. [#93856](https://github.com/ClickHouse/ClickHouse/pull/93856) ([Han Fei](https://github.com/hanfei1991)).
* Prevent excessive output on a syntax error. Before this change, it output the whole SQL script, which could contain a lot of queries. [#93876](https://github.com/ClickHouse/ClickHouse/pull/93876) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Do proper byte size calculation of the `check` request with stats in Keeper. [#93907](https://github.com/ClickHouse/ClickHouse/pull/93907) ([Mikhail Artemenko](https://github.com/Michicosun)).
* Added `use_hash_table_stats_for_join_reordering` setting to control whether runtime hash table size statistics are used for join reordering. This setting is enabled by default, preserving the existing behavior of `collect_hash_table_stats_during_joins`. [#93912](https://github.com/ClickHouse/ClickHouse/pull/93912) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Users can now partially view nested global server settings in the `system.server_settings` table (e.g. `logger.level`). This only covers settings with a fixed structure (no lists, enumerations, repetitions etc.). [#94001](https://github.com/ClickHouse/ClickHouse/pull/94001) ([Hechem Selmi](https://github.com/m-selmi)).
* `QBit` can now be compared for equality. [#94078](https://github.com/ClickHouse/ClickHouse/pull/94078) ([Raufs Dunamalijevs](https://github.com/rienath)).
* When Keeper detects broken snapshot or inconsistent changelogs, throw exception instead of manually aborting or cleaning up files automatically. This should lead to a safer behaviour of Keeper relying on manual intervention. [#94168](https://github.com/ClickHouse/ClickHouse/pull/94168) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix leaving possible leftovers in case of `CREATE TABLE` fails. [#94174](https://github.com/ClickHouse/ClickHouse/pull/94174) ([Azat Khuzhin](https://github.com/azat)).
* Fix uninitialized memory access (a bug in OpenSSL) when password protected TLS key is used. [#94182](https://github.com/ClickHouse/ClickHouse/pull/94182) ([Konstantin Bogdanov](https://github.com/thevar1able)).
* Bump chdig to [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)).
* Support more generic partitioning for S3Queue ordered mode. [#94321](https://github.com/ClickHouse/ClickHouse/pull/94321) ([Bharat Nallan](https://github.com/bharatnc)).
* Added alias `use_statistics` for setting `allow_statistics_optimize`. This is more consistent with existing settings `use_primary_key` and `use_skip_indexes`. [#94366](https://github.com/ClickHouse/ClickHouse/pull/94366) ([Robert Schulze](https://github.com/rschu1ze)).
* Enabled setting `input_format_numbers_enum_on_conversion_error` for conversion from Numbers to Enums to check whether the element exists. [#94384](https://github.com/ClickHouse/ClickHouse/pull/94384) ([Elmi Ahmadov](https://github.com/ahmadov)).
* In S3(Azure)Queue ordered mode clean up failed nodes by tracking limits (before that was done only in Unordered mode for both failed and processed, so now this will also be done for Ordered but only for failed nodes). [#94412](https://github.com/ClickHouse/ClickHouse/pull/94412) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Enable access management for `default` user in clickhouse-local. The default user in `clickhouse-local` was missing the access\_management privilege, which caused operations like `DROP ROW POLICY IF EXISTS` to fail with `ACCESS_DENIED` error, even though the user should be unrestricted. [#94501](https://github.com/ClickHouse/ClickHouse/pull/94501) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Enable named collection for YTsaurus dictionaries and tables. [#94582](https://github.com/ClickHouse/ClickHouse/pull/94582) ([MikhailBurdukov](https://github.com/MikhailBurdukov)).
* Add support for SQL-defined named collections in BACKUP/RESTORE for S3 and Azure Blob Storage. Closes [#94604](https://github.com/ClickHouse/ClickHouse/issues/94604). [#94605](https://github.com/ClickHouse/ClickHouse/pull/94605) ([Pablo Marcos](https://github.com/pamarcos)).
* Support bucketing based on partition key for S3Queue in ordered mode. [#94698](https://github.com/ClickHouse/ClickHouse/pull/94698) ([Bharat Nallan](https://github.com/bharatnc)).
* Add an asynchronous metric with the longest running merge elapsed time. [#94825](https://github.com/ClickHouse/ClickHouse/pull/94825) ([Raúl Marín](https://github.com/Algunenano)).
* Add belonging file check before apply position delete using IcebergBitmapPositionDeleteTransform. [#94897](https://github.com/ClickHouse/ClickHouse/pull/94897) ([Yang Jiang](https://github.com/Ted-Jiang)).
* Now `view_duration_ms` shows the time when group was active, not the sum of the threads duration in it. [#94966](https://github.com/ClickHouse/ClickHouse/pull/94966) ([Sema Checherinda](https://github.com/CheSema)).
* Remove limit of the max number of search tokens in `hasAnyTokens` and `hasAllTokens` functions which was limited to 64. Example: `SELECT count() FROM table WHERE hasAllTokens(text, ['token_1', 'token_2', [...], 'token_65']]);` The query would result in a `BAD_ARGUMENTS` error because there are 65 search tokens. With this PR, the limit has been removed completely and the same query would run without an error. [#95152](https://github.com/ClickHouse/ClickHouse/pull/95152) ([Elmi Ahmadov](https://github.com/ahmadov)).
* Add a setting `input_format_numbers_enum_on_conversion_error` for conversion from Numbers to Enums to check whether the element exists. Closes: [#56144](https://github.com/ClickHouse/ClickHouse/issues/56144). [#56240](https://github.com/ClickHouse/ClickHouse/pull/56240) ([Nikolay Degterinsky](https://github.com/evillique)).
* Share format parser resources between data file and position delete file reading in Iceberg tables to reduce memory allocations. [#94701](https://github.com/ClickHouse/ClickHouse/pull/94701) ([Yang Jiang](https://github.com/Ted-Jiang)).

#### Bug Fix (user-visible misbehavior in an official stable release)

* Fixes a bug where predefined query handlers would have trailing whitespace interpreted as data during inserts. [#83604](https://github.com/ClickHouse/ClickHouse/pull/83604) ([Fabian Ponce](https://github.com/FabianPonce)).
* Fix INCOMPATIBLE\_TYPE\_OF\_JOIN error for Join storage and outer to inner join optimization applied. Resolves [#80794](https://github.com/ClickHouse/ClickHouse/issues/80794). [#84292](https://github.com/ClickHouse/ClickHouse/pull/84292) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix exception "Invalid number of rows in Chunk" when using hash join with `allow_experimental_join_right_table_sorting` enabled. [#86440](https://github.com/ClickHouse/ClickHouse/pull/86440) ([yanglongwei](https://github.com/ylw510)).
* Always replace file names to hash in MergeTree if filesystem is case insensitive. Previously on systems with case insensitive filesystem (like MacOS) it could lead to data corruption when several column/subcolumn names differs only in the case. [#86559](https://github.com/ClickHouse/ClickHouse/pull/86559) ([Pavel Kruglov](https://github.com/Avogar)).
* Add a full permissions check on the create stage for the underlying query inside a materialized view. [#89180](https://github.com/ClickHouse/ClickHouse/pull/89180) ([pufit](https://github.com/pufit)).
* Fixed crash in `icebergHash` function on constant argument. [#90335](https://github.com/ClickHouse/ClickHouse/pull/90335) ([Michael Kolupaev](https://github.com/al13n321)).
* Fix logical error when mutation without transaction mutates parts in an active transaction, which is rolled back finally. [#90469](https://github.com/ClickHouse/ClickHouse/pull/90469) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Update `system.warnings` correctly after an ordinary database was converted to an atomic database. [#90473](https://github.com/ClickHouse/ClickHouse/pull/90473) ([sdk2](https://github.com/sdk2)).
* Fixes an assertion when reading from Parquet file, and part of a **prewhere** expression is used elsewhere in the query. [#90635](https://github.com/ClickHouse/ClickHouse/pull/90635) ([Max Kainov](https://github.com/maxknv)).
* Fix crash in a single-node cluster when reading from Iceberg in split-by-buckets mode. This closes [#90913](https://github.com/ClickHouse/ClickHouse/issues/90913#issue-3668583963). [#91553](https://github.com/ClickHouse/ClickHouse/pull/91553) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix possible logical error in Log engine during subcolumns reading. Closes [#91710](https://github.com/ClickHouse/ClickHouse/issues/91710). [#91711](https://github.com/ClickHouse/ClickHouse/pull/91711) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix Logical error: 'Storage does not support transaction' during ATTACH AS REPLICATED. [#91772](https://github.com/ClickHouse/ClickHouse/pull/91772) ([Shaohua Wang](https://github.com/tiandiwonder)).
* Fix for runtime filters working incorrectly when LEFT ANTI JOIN has extra post-condition. [#91824](https://github.com/ClickHouse/ClickHouse/pull/91824) ([Alexander Gololobov](https://github.com/davenger)).
* Fixes an error where we have a null-safe comparison involving the Nothing type. Closes [#91834](https://github.com/ClickHouse/ClickHouse/issues/91834). Closes [#84870](https://github.com/ClickHouse/ClickHouse/issues/84870). Closes [#91821](https://github.com/ClickHouse/ClickHouse/issues/91821). [#91884](https://github.com/ClickHouse/ClickHouse/pull/91884) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix DELTA\_BYTE\_ARRAY decoding bugs in native Parquet reader affecting highly repetitive string data. [#91929](https://github.com/ClickHouse/ClickHouse/pull/91929) ([Daniel Muino](https://github.com/dmuino)).
* Cache schema only for the file it was inferred from in globs instead of all files during schema inference. Closes [#91745](https://github.com/ClickHouse/ClickHouse/issues/91745). [#92006](https://github.com/ClickHouse/ClickHouse/pull/92006) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix the `Couldn't pack tar archive: Failed to write all bytes` error caused by an incorrect archive entry size header. Fixes [#89075](https://github.com/ClickHouse/ClickHouse/issues/89075). [#92122](https://github.com/ClickHouse/ClickHouse/pull/92122) ([Julia Kartseva](https://github.com/jkartseva)).
* Release request stream in insert select to prevent closing http connection. [#92175](https://github.com/ClickHouse/ClickHouse/pull/92175) ([Sema Checherinda](https://github.com/CheSema)).
* Fix logical error for queries with multiple JOINs with `USING` clause and `join_use_nulls`. [#92251](https://github.com/ClickHouse/ClickHouse/pull/92251) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix logical error while join reordering with join\_use\_nulls, close [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)).
* Fix inconsistent AST formatting of arrayElement with negate literal. Closes [#92288](https://github.com/ClickHouse/ClickHouse/issues/92288) Closes [#92212](https://github.com/ClickHouse/ClickHouse/issues/92212) Closes [#91832](https://github.com/ClickHouse/ClickHouse/issues/91832) Closes [#91789](https://github.com/ClickHouse/ClickHouse/issues/91789) Closes [#91735](https://github.com/ClickHouse/ClickHouse/issues/91735) Closes [#88495](https://github.com/ClickHouse/ClickHouse/issues/88495) Closes [#92386](https://github.com/ClickHouse/ClickHouse/issues/92386). [#92293](https://github.com/ClickHouse/ClickHouse/pull/92293) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix a possible crash with `join_on_disk_max_files_to_merge` setting. [#92335](https://github.com/ClickHouse/ClickHouse/pull/92335) ([Bharat Nallan](https://github.com/bharatnc)).
* Related issue #[https://github.com/ClickHouse/support-escalation/issues/6365](https://github.com/ClickHouse/support-escalation/issues/6365). [#92339](https://github.com/ClickHouse/ClickHouse/pull/92339) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fix missing access check in `SYSTEM SYNC FILE CACHE`. Closes [#92101](https://github.com/ClickHouse/ClickHouse/issues/92101). [#92372](https://github.com/ClickHouse/ClickHouse/pull/92372) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix `count_distinct_optimization` pass over window functions and over multiple arguments. [#92376](https://github.com/ClickHouse/ClickHouse/pull/92376) ([Raúl Marín](https://github.com/Algunenano)).
* Fix "Cannot write to finalized buffer" error when using certain aggregate functions with window functions. Closes [#91415](https://github.com/ClickHouse/ClickHouse/issues/91415). [#92395](https://github.com/ClickHouse/ClickHouse/pull/92395) ([Jimmy Aguilar Mena](https://github.com/Ergus)).
* Fix logical error with `CREATE TABLE ... AS urlCluster()` and database engine `Replicated`. Closes [#92216](https://github.com/ClickHouse/ClickHouse/issues/92216). [#92418](https://github.com/ClickHouse/ClickHouse/pull/92418) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Inherit source part serialization info settings during mutation in MergeTree. It fixes possible incorrect result of the query over mutated part after changes in data types serialization. [#92419](https://github.com/ClickHouse/ClickHouse/pull/92419) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix possible conflict in column and subcolumn with the same name leading in using wrong serialization and query failures. Closes [#90219](https://github.com/ClickHouse/ClickHouse/issues/90219). Closes [#85161](https://github.com/ClickHouse/ClickHouse/issues/85161). [#92453](https://github.com/ClickHouse/ClickHouse/pull/92453) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix a `LOGICAL_ERROR`s that caused by not wanted modification of query plan when converting outer join to inner join. Also relax the requirements of optimization to be able to apply it in cases when injective functions are applied to the aggregating keys during joins. [#92503](https://github.com/ClickHouse/ClickHouse/pull/92503) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fix possible error `SIZES_OF_COLUMNS_DOESNT_MATCH` during sorting of emty tuple column. Closes [#92422](https://github.com/ClickHouse/ClickHouse/issues/92422). [#92520](https://github.com/ClickHouse/ClickHouse/pull/92520) ([Pavel Kruglov](https://github.com/Avogar)).
* Check for incompatible typed paths in JSON type. Closes [#91577](https://github.com/ClickHouse/ClickHouse/issues/91577). [#92539](https://github.com/ClickHouse/ClickHouse/pull/92539) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix deadlock for SHOW CREATE DATABASE for Backup database. [#92541](https://github.com/ClickHouse/ClickHouse/pull/92541) ([Azat Khuzhin](https://github.com/azat)).
* Use proper error code when validating hypothesis index. [#92559](https://github.com/ClickHouse/ClickHouse/pull/92559) ([Raúl Marín](https://github.com/Algunenano)).
* Fix dynamic subcolumns resolution in column aliases in analyzer. Previously dynamic subcolumn in column alias was wrapped in `getSubcolumn` and in some cases could be not resolved at all. Closes [#91434](https://github.com/ClickHouse/ClickHouse/issues/91434). [#92583](https://github.com/ClickHouse/ClickHouse/pull/92583) ([Pavel Kruglov](https://github.com/Avogar)).
* Prevent crash in tokens() with null second argument. [#92586](https://github.com/ClickHouse/ClickHouse/pull/92586) ([Raúl Marín](https://github.com/Algunenano)).
* Fix potential crash caused by in place mutation of underlying const PREWHERE columns. This could've happened at column shrinking (`IColumn::shrinkToFit`) or filtering (`IColumn::filter`), which could've triggered concurrently from several threads. [#92588](https://github.com/ClickHouse/ClickHouse/pull/92588) ([Arsen Muk](https://github.com/arsenmuk)).
* Creating and materializing text indexes on tables containing large parts (over 4,294,967,295 rows) is temporarily disabled. This limitation prevents incorrect query results, as the current index implementation does not yet support such large parts. [#92644](https://github.com/ClickHouse/ClickHouse/pull/92644) ([Anton Popov](https://github.com/CurtizJ)).
* Fixes a logical error `Too large size (A) passed to allocator` while executing JOINs. Closes [#92043](https://github.com/ClickHouse/ClickHouse/issues/92043). [#92667](https://github.com/ClickHouse/ClickHouse/pull/92667) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Remove a bug that `ngrambf_v1` indexes with ngram length (1st parameter) > 8 would throw an exception. [#92672](https://github.com/ClickHouse/ClickHouse/pull/92672) ([Robert Schulze](https://github.com/rschu1ze)).
* Fix uncaught exception during background named collections reload when zookeeper storage is used. Closes [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)).
* Reworks incorrect logic in access grant checks for wildcard grants. The previous attempt [https://github.com/ClickHouse/ClickHouse/pull/90928](https://github.com/ClickHouse/ClickHouse/pull/90928) addressed a critical vulnerability but ended up being too restrictive, resulting in some wildcard `GRANT` statements failing due to unrelated revokes. [#92725](https://github.com/ClickHouse/ClickHouse/pull/92725) ([pufit](https://github.com/pufit)).
* Fix bug in data skipping logic when `not match(...)` is used in `WHERE` causing incorrect results. Closes [#92492](https://github.com/ClickHouse/ClickHouse/issues/92492). [#92726](https://github.com/ClickHouse/ClickHouse/pull/92726) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Do not attempt to delete temporary directories at startup if a MergeTree table is created over a read-only disk. [#92748](https://github.com/ClickHouse/ClickHouse/pull/92748) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix "Cannot add action to empty ExpressionActionsChain" for ALTER TABLE REWRITE PARTS (v2). [#92754](https://github.com/ClickHouse/ClickHouse/pull/92754) ([Azat Khuzhin](https://github.com/azat)).
* Avoid crash due to reading from a disconnected `Connection`. [#92807](https://github.com/ClickHouse/ClickHouse/pull/92807) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix logical error ` Failed to set file processing within 100 retries` in storgae `S3Queue` in `Ordered` mode. It is now replaced with a warning. This error could happen before 25.10 version if keeper session expired, however it will still be a warning in 25.10+ versions, as it is still theoretically possible to get this error in case of high processing concurrency in `Ordered` mode. [#92814](https://github.com/ClickHouse/ClickHouse/pull/92814) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Previously, some queries that used PK sharding with a false condition were failing. Now they're not. Needed for [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)).
* Fixed calculation of uncompressed sizes of text indexes in the `system.parts` table. [#92832](https://github.com/ClickHouse/ClickHouse/pull/92832) ([Anton Popov](https://github.com/CurtizJ)).
* Fixed usage of primary index in lightweight updates that have an `IN` clause with subqueries in the predicate of the `WHERE` clause. [#92838](https://github.com/ClickHouse/ClickHouse/pull/92838) ([Anton Popov](https://github.com/CurtizJ)).
* Fix creating type hint for path 'skip' in JSON. Closes [#92731](https://github.com/ClickHouse/ClickHouse/issues/92731). [#92842](https://github.com/ClickHouse/ClickHouse/pull/92842) ([Pavel Kruglov](https://github.com/Avogar)).
* In the S3 table engine, we should avoid caching the partition key if there are non-deterministic functions. [#92844](https://github.com/ClickHouse/ClickHouse/pull/92844) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix possible error `FILE_DOESNT_EXIST` after mutation of a sparse column with `ratio_of_defaults_for_sparse_serialization=0.0`. Closes [#92633](https://github.com/ClickHouse/ClickHouse/issues/92633). [#92860](https://github.com/ClickHouse/ClickHouse/pull/92860) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix parquet schema inference in the old parquet reader (not used by default) when a JSON column comes after a Tupe column. Fix the old parquet reader (not used by default) failing on empty tuples. [#92867](https://github.com/ClickHouse/ClickHouse/pull/92867) ([Michael Kolupaev](https://github.com/al13n321)).
* Fix logical error with multiple joins on constant condition and `join_use_nulls`, close [#92640](https://github.com/ClickHouse/ClickHouse/issues/92640). [#92892](https://github.com/ClickHouse/ClickHouse/pull/92892) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix possible error `NOT_FOUND_COLUMN_IN_BLOCK` during insert into a table with subcolumn in partition expression. Closes [#93210](https://github.com/ClickHouse/ClickHouse/issues/93210). Closes [#83406](https://github.com/ClickHouse/ClickHouse/issues/83406). [#92905](https://github.com/ClickHouse/ClickHouse/pull/92905) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix error `NO_SUCH_COLUMN_IN_TABLE` in Merge engine over tables with aliases. Closes [#88665](https://github.com/ClickHouse/ClickHouse/issues/88665). [#92910](https://github.com/ClickHouse/ClickHouse/pull/92910) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix NULL != NULL case for full\_sorting\_join on LowCardinality(Nullable(T)) column. [#92924](https://github.com/ClickHouse/ClickHouse/pull/92924) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fixed several crashes during merges of text indexes in `MergeTree` tables. [#92925](https://github.com/ClickHouse/ClickHouse/pull/92925) ([Anton Popov](https://github.com/CurtizJ)).
* Restore LowCardinality wrappers on SET expression results if needed during TTL aggregation to prevent exceptions during table optimization. [#92971](https://github.com/ClickHouse/ClickHouse/pull/92971) ([Seva Potapov](https://github.com/seva-potapov)).
* Fix logical error during index analysis when empty array is used in `has` function. Closes [#92906](https://github.com/ClickHouse/ClickHouse/issues/92906). [#92995](https://github.com/ClickHouse/ClickHouse/pull/92995) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix possible hung on terminating background schedule pool (may lead to server hungs on shutdown). [#93008](https://github.com/ClickHouse/ClickHouse/pull/93008) ([Azat Khuzhin](https://github.com/azat)).
* Fix possible error FILE\_DOESNT\_EXIST after sparse column mutation when setting `ratio_of_defaults_for_sparse_serialization` was changed to `1.0` via alter. [#93016](https://github.com/ClickHouse/ClickHouse/pull/93016) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix bug in data skipping logic when `not materialize(...)` or `not CAST(...)` is used in WHERE causing incorrect results. Closes [#88536](https://github.com/ClickHouse/ClickHouse/issues/88536). [#93017](https://github.com/ClickHouse/ClickHouse/pull/93017) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix possible usage of outdated parts due to TOCTOU race for shared parts. [#93022](https://github.com/ClickHouse/ClickHouse/pull/93022) ([Azat Khuzhin](https://github.com/azat)).
* Fix crash when deserialising malformed `groupConcat` aggregate state with out-of-bounds offsets. [#93028](https://github.com/ClickHouse/ClickHouse/pull/93028) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fix leaving connection in a broken state after preliminary cancellation distributed queries. [#93029](https://github.com/ClickHouse/ClickHouse/pull/93029) ([Azat Khuzhin](https://github.com/azat)).
* Fix join results when the right-side join key is a sparse column. This closes [#92920](https://github.com/ClickHouse/ClickHouse/issues/92920). I can only reproduce the bug with `set compatibility='23.3'`. Not sure if it should be backported. [#93038](https://github.com/ClickHouse/ClickHouse/pull/93038) ([Amos Bird](https://github.com/amosbird)).
* Fix possible `Cannot finalize buffer after cancellation` in `estimateCompressionRatio()`. Fixes: [#87380](https://github.com/ClickHouse/ClickHouse/issues/87380). [#93068](https://github.com/ClickHouse/ClickHouse/pull/93068) ([Azat Khuzhin](https://github.com/azat)).
* Fixed merges of text indexes built on top of the complex expressions (such as `concat(col1, col2)`). [#93073](https://github.com/ClickHouse/ClickHouse/pull/93073) ([Anton Popov](https://github.com/CurtizJ)).
* Fix applying projection when filter contains subcolumns. Closes [#92882](https://github.com/ClickHouse/ClickHouse/issues/92882). [#93141](https://github.com/ClickHouse/ClickHouse/pull/93141) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix logical error in some cases triggered when join runtime filters are added to query plan. It was caused by incorrectly returning duplicated const columns from one of join sides. [#93144](https://github.com/ClickHouse/ClickHouse/pull/93144) ([Alexander Gololobov](https://github.com/davenger)).
* Special function `__applyFilter` used by join runtime filters was returning ILLEGAL\_TYPE\_OF\_ARGUMENT in some valid cases. [#93187](https://github.com/ClickHouse/ClickHouse/pull/93187) ([Alexander Gololobov](https://github.com/davenger)).
* Prevent different interpolated columns from collapse into the same column in a block when interpolated columns are effectively aliases of the same column. [#93197](https://github.com/ClickHouse/ClickHouse/pull/93197) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
* Do not add runtime filter when joining with already filled right table. [#93211](https://github.com/ClickHouse/ClickHouse/pull/93211) ([Alexander Gololobov](https://github.com/davenger)).
* Fix keeper persistent watches cleanup after dead session. This closes [#92480](https://github.com/ClickHouse/ClickHouse/issues/92480). [#93213](https://github.com/ClickHouse/ClickHouse/pull/93213) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix order by tuple in iceberg. This closes [#92977](https://github.com/ClickHouse/ClickHouse/issues/92977). [#93225](https://github.com/ClickHouse/ClickHouse/pull/93225) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix bug with S3Queue setting `s3queue_migrate_old_metadata_to_buckets`. Closes [#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)).
* Remove unused columns when the projection is rebuilt during the merge. It reduces memory usage and creates fewer temporary parts. [#93233](https://github.com/ClickHouse/ClickHouse/pull/93233) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Fix unused columns removal from subqueries in the presence of a scalar correlated subquery. Before the fix column could have been removed if it was used only in the correlated subquery, and the query would fail with `NOT_FOUND_COLUMN_IN_BLOCK` error. [#93273](https://github.com/ClickHouse/ClickHouse/pull/93273) ([Dmitry Novik](https://github.com/novikd)).
* Fix possible missing subcolumn in MV during alter of source table. Closes [#93231](https://github.com/ClickHouse/ClickHouse/issues/93231). [#93276](https://github.com/ClickHouse/ClickHouse/pull/93276) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix the `Merge` table engine query planning with the analyzer that could throw ILLEGAL\_COLUMN for `hostName()` when merging local and remote/Distributed tables. Closes [#92059](https://github.com/ClickHouse/ClickHouse/issues/92059). [#93286](https://github.com/ClickHouse/ClickHouse/pull/93286) ([Jinlin](https://github.com/withlin)).
* Fixes a case where NOT IN with non-constant array arguments was returning the wrong value + Support for non-constant Array functions. Closes [#14980](https://github.com/ClickHouse/ClickHouse/issues/14980). [#93314](https://github.com/ClickHouse/ClickHouse/pull/93314) ([Yarik Briukhovetskyi](https://github.com/yariks5s)).
* Fix `Not found column` for `use_top_k_dynamic_filtering` optimization. Fixes [#93186](https://github.com/ClickHouse/ClickHouse/issues/93186). [#93316](https://github.com/ClickHouse/ClickHouse/pull/93316) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
* Fixed rebuilding of text indexes created on top of subcolumns. [#93326](https://github.com/ClickHouse/ClickHouse/pull/93326) ([Anton Popov](https://github.com/CurtizJ)).
* Fixed handling of empty array as a second argument in `hasAllTokens` and `hasAnyTokens` functions. [#93328](https://github.com/ClickHouse/ClickHouse/pull/93328) ([Anton Popov](https://github.com/CurtizJ)).
* Fix logical error when runtime filters are used in a query with totals for right side table. [#93330](https://github.com/ClickHouse/ClickHouse/pull/93330) ([Alexander Gololobov](https://github.com/davenger)).
* The server no longer crashes if function `tokens` is called with non-const tokenizer parameters (the 2th, 3rd, 4th parameter), e.g., `SELECT tokens(NULL, 1, materialize(1))`. [#93383](https://github.com/ClickHouse/ClickHouse/pull/93383) ([Robert Schulze](https://github.com/rschu1ze)).
* Fixed integer overflow vulnerability in `groupConcat` state deserialisation that could cause memory safety issues with crafted aggregate states. [#93426](https://github.com/ClickHouse/ClickHouse/pull/93426) ([Raufs Dunamalijevs](https://github.com/rienath)).
* Fixed text index analysis on array columns when the index contains no tokens (all arrays are empty or all tokens are skipped by the tokenizer). [#93457](https://github.com/ClickHouse/ClickHouse/pull/93457) ([Anton Popov](https://github.com/CurtizJ)).
* Avoids oauth login in ClickHouse Client when username/password are within the connection string. [#93459](https://github.com/ClickHouse/ClickHouse/pull/93459) ([Krishna Mannem](https://github.com/kcmannem)).
* Fix Azure ADLS Gen2 vended credentials support in DataLakeCatalog - parse `adls.sas-token.*` keys from Iceberg REST catalogs and fix ABFSS URL parsing. [#93477](https://github.com/ClickHouse/ClickHouse/pull/93477) ([Karun Anantharaman](https://github.com/karunmotorq)).
* Fix GLOBAL IN support with analyzer (previously set was created on the remote node again). [#93507](https://github.com/ClickHouse/ClickHouse/pull/93507) ([Azat Khuzhin](https://github.com/azat)).
* Fix extracting subcolumn during deserialization directly into Sparse columns. [#93512](https://github.com/ClickHouse/ClickHouse/pull/93512) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed direct reading from text index with duplicate search queries. [#93516](https://github.com/ClickHouse/ClickHouse/pull/93516) ([Anton Popov](https://github.com/CurtizJ)).
* Fix for NOT\_FOUND\_COLUMN\_IN\_BLOCK error when runtime filter is enabled and joined tables have the same column returned multiple times (e.g. SELECT a, a, a FROM t). [#93526](https://github.com/ClickHouse/ClickHouse/pull/93526) ([Alexander Gololobov](https://github.com/davenger)).
* Fix a bug where clickhouse-client would ask for password twice when connecting using ssh. [#93547](https://github.com/ClickHouse/ClickHouse/pull/93547) ([Isak Ellmer](https://github.com/spinojara)).
* Make sure that zookeeper is finalized on shutdown (fix possible hung on shutdown in very unlikely cases). [#93602](https://github.com/ClickHouse/ClickHouse/pull/93602) ([Azat Khuzhin](https://github.com/azat)).
* Fix LOGICAL\_ERROR when restoring ReplicatedMergeTree with deduplication race. [#93612](https://github.com/ClickHouse/ClickHouse/pull/93612) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix using Sparse column for TTL update during direct deserialization into Sparse columns in some input formats. It fixes possible logical error `Unexpected type of result TTL column`. [#93619](https://github.com/ClickHouse/ClickHouse/pull/93619) ([Pavel Kruglov](https://github.com/Avogar)).
* Fixed h3 index functions sometimes crashing or getting stuck when called on invalid inputs. [#93657](https://github.com/ClickHouse/ClickHouse/pull/93657) ([Michael Kolupaev](https://github.com/al13n321)).
* The usage of `ngram_bf` index on a non-UTF-8 data led to an uninitialized memory read, with values that could reside in the resulting index structure. Closes [#92576](https://github.com/ClickHouse/ClickHouse/issues/92576). [#93663](https://github.com/ClickHouse/ClickHouse/pull/93663) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Validate that the decompressed buffer size is as expected. [#93690](https://github.com/ClickHouse/ClickHouse/pull/93690) ([Raúl Marín](https://github.com/Algunenano)).
* Prevent users to get the list of columns from a table without checking `SHOW COLUMNS` permission using the `merge` table engine. [#93695](https://github.com/ClickHouse/ClickHouse/pull/93695) ([János Benjamin Antal](https://github.com/antaljanosbenjamin)).
* Fixed materialization of skip indexes created on top of subcolumns. [#93708](https://github.com/ClickHouse/ClickHouse/pull/93708) ([Anton Popov](https://github.com/CurtizJ)).
* We store storages' shared pointers in `QueryPipeline::resources::storage_holders` to make sure that the `IStorage` objects are not destroyed while `PipelineExecutor` is alive. [#93746](https://github.com/ClickHouse/ClickHouse/pull/93746) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix attaching Replicated DBs when the interserver host changed after restarting. [#93779](https://github.com/ClickHouse/ClickHouse/pull/93779) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fix assert `!read_until_position` in `ReadBufferFromS3` which happened when cache is enabled. [#93809](https://github.com/ClickHouse/ClickHouse/pull/93809) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix logical error in a rare case when empty tuple is used with `Map` column. Closes [#93784](https://github.com/ClickHouse/ClickHouse/issues/93784). [#93814](https://github.com/ClickHouse/ClickHouse/pull/93814) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fixed `_part_offset` corruption when projections are rebuilt during merges, and optimized projection processing by avoiding unnecessary reads of the `_part_offset` column and skipping unneeded columns in projection calculations. This continues the optimizations introduced in [#93233](https://github.com/ClickHouse/ClickHouse/issues/93233). [#93827](https://github.com/ClickHouse/ClickHouse/pull/93827) ([Amos Bird](https://github.com/amosbird)).
* Remove 'Bad version' handling. [#93843](https://github.com/ClickHouse/ClickHouse/pull/93843) ([Anton Ivashkin](https://github.com/ianton-ru)).
* Fix `optimize_inverse_dictionary_lookup` not working with distributed query when key is signed integral type. Closes [#93259](https://github.com/ClickHouse/ClickHouse/issues/93259). [#93848](https://github.com/ClickHouse/ClickHouse/pull/93848) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix `lag`/`lead` not working with distributed `remote()` query. Closes [#90014](https://github.com/ClickHouse/ClickHouse/issues/90014). [#93858](https://github.com/ClickHouse/ClickHouse/pull/93858) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix system instrument dispatch bug. [#93937](https://github.com/ClickHouse/ClickHouse/pull/93937) ([Pablo Marcos](https://github.com/pamarcos)).
* In [https://github.com/ClickHouse/ClickHouse/pull/89173](https://github.com/ClickHouse/ClickHouse/pull/89173), we added an extra field to the structure that `TraceSender` sends through an internal pipe. However, the buffer size was not updated ([here](https://github.com/ClickHouse/ClickHouse/pull/89173/changes#diff-36ecfac5cde34c92c031652d8a77f0d12782cd5d43e68d6ef159e6d46a54224fL44)), therefore we are writing more data to buffer than `buffer_size` which results in multiple flushes. And because `TraceSender::send` is called from different threads, different threads' flushes may interleave which breaks the invariant that the receiving end (`TraceCollector`) relies on. [#93966](https://github.com/ClickHouse/ClickHouse/pull/93966) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix type conversion to super type during the join operation of the storage `Join` with `USING` clause. Fixes [#91672](https://github.com/ClickHouse/ClickHouse/issues/91672). Fixes [#78572](https://github.com/ClickHouse/ClickHouse/issues/78572). [#94000](https://github.com/ClickHouse/ClickHouse/pull/94000) ([Dmitry Novik](https://github.com/novikd)).
* Fix for FilterStep not properly added when join runtime filter is applied over Merge table. [#94021](https://github.com/ClickHouse/ClickHouse/pull/94021) ([Alexander Gololobov](https://github.com/davenger)).
* A `SELECT` query containing a predicate on multiple columns with bloom filter skip indexes and both `OR` and `NOT` conditions are present could return inconsistent results. That is fixed now. [#94026](https://github.com/ClickHouse/ClickHouse/pull/94026) ([Shankar Iyer](https://github.com/shankar-iyer)).
* Fix CLEAR column with dependent indices. [#94057](https://github.com/ClickHouse/ClickHouse/pull/94057) ([Raúl Marín](https://github.com/Algunenano)).
* Fix use-of-uninitialized-value in `ReadWriteBufferFromHTTP`. [#94058](https://github.com/ClickHouse/ClickHouse/pull/94058) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix bad check for typed paths in JSON. The check was introduced in [https://github.com/ClickHouse/ClickHouse/pull/92842](https://github.com/ClickHouse/ClickHouse/pull/92842) and can lead to an error during existing tables startup. [#94070](https://github.com/ClickHouse/ClickHouse/pull/94070) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix the crash during filter analysis in the presence of OUTER JOIN. Fixes [#90979](https://github.com/ClickHouse/ClickHouse/issues/90979). [#94080](https://github.com/ClickHouse/ClickHouse/pull/94080) ([Dmitry Novik](https://github.com/novikd)).
* Fix accuracy of `uniqTheta` when using UInt8 aggregation keys in parallel (`max_threads` > 1 - default). [#94095](https://github.com/ClickHouse/ClickHouse/pull/94095) ([Azat Khuzhin](https://github.com/azat)).
* Fix crash caused by exception thrown from a `socket.setBlocking(true)` call inside `SCOPE_EXIT`. [#94100](https://github.com/ClickHouse/ClickHouse/pull/94100) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix data loss when `DROP PARTITION` removes parts created by later log entries in ReplicatedMergeTree. [#94123](https://github.com/ClickHouse/ClickHouse/pull/94123) ([Tuan Pham Anh](https://github.com/tuanpach)).
* Fixed parquet reader v3 incorrectly handling arrays that cross page boundaries. This happens e.g. for files written by Arrow without enabling page statistics or page index. Affects only columns of Array data type. Likely symptom is that one array every \~1 MB of data gets truncated. Before this fix, use this setting as workaround: `input_format_parquet_use_native_reader_v3 = 0`. [#94125](https://github.com/ClickHouse/ClickHouse/pull/94125) ([Michael Kolupaev](https://github.com/al13n321)).
* Fix too many watches in ReplicatedMergeTree while waiting for log entry. [#94133](https://github.com/ClickHouse/ClickHouse/pull/94133) ([Azat Khuzhin](https://github.com/azat)).
* Functions `arrayShuffle`, `arrayPartialShuffle` and `arrayRandomSample` to materialize const columns - so that different rows get different results. [#94134](https://github.com/ClickHouse/ClickHouse/pull/94134) ([Joanna Hulboj](https://github.com/jh0x)).
* Fix data race in evaluating table functions in materialized views. [#94171](https://github.com/ClickHouse/ClickHouse/pull/94171) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix nullptr dereference in `PostgreSQL` database engines (when the query is incorrect). Closes [#92887](https://github.com/ClickHouse/ClickHouse/issues/92887). [#94180](https://github.com/ClickHouse/ClickHouse/pull/94180) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix memory leak in refreshable materialized views using `SELECT` queries with multiple subqueries. [#94200](https://github.com/ClickHouse/ClickHouse/pull/94200) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix data race in `DataPartStorageOnDiskBase::remove` vs `system.parts`. Closes [#49076](https://github.com/ClickHouse/ClickHouse/issues/49076). [#94262](https://github.com/ClickHouse/ClickHouse/pull/94262) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Remove the wrong `noexcept` specifier at HashTable copy assignment that may lead to crash (`std::terminate`) on memory exceptions. [#94275](https://github.com/ClickHouse/ClickHouse/pull/94275) ([Nikita Taranov](https://github.com/nickitat)).
* Previously, creating a projection with duplicate columns in GROUP BY (e.g., `GROUP BY c0, c0`) and inserting data caused a `std::length_error` if `optimize_row_order` is enabled. Closes [#94065](https://github.com/ClickHouse/ClickHouse/issues/94065). [#94277](https://github.com/ClickHouse/ClickHouse/pull/94277) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix obscure bug in ZooKeeper client on connect which leads to hungs and crashes. [#94320](https://github.com/ClickHouse/ClickHouse/pull/94320) ([Azat Khuzhin](https://github.com/azat)).
* Fix function to subcolumns optimization not applied to subcolumns. [#94323](https://github.com/ClickHouse/ClickHouse/pull/94323) ([Pavel Kruglov](https://github.com/Avogar)).
* Fix possibly incorrect result in nested RIGHT JOINs when `enable_lazy_columns_replication` is enabled. The bug caused all rows in replicated columns to incorrectly return the same value instead of their distinct values. Close [#93891](https://github.com/ClickHouse/ClickHouse/issues/93891). [#94339](https://github.com/ClickHouse/ClickHouse/pull/94339) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Fix filter pushdown for SEMI JOIN using equivalence sets. Do not push the filter down if argument types have changed. Fixes [#93264](https://github.com/ClickHouse/ClickHouse/issues/93264). [#94340](https://github.com/ClickHouse/ClickHouse/pull/94340) ([Dmitry Novik](https://github.com/novikd)).
* Fix usage of DeltaLake CDF with database DataLake database engine (delta lake catalogs integration). Closes [#94122](https://github.com/ClickHouse/ClickHouse/issues/94122). [#94342](https://github.com/ClickHouse/ClickHouse/pull/94342) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Fix incorrect value of current metric `FilesystemCacheSizeLimit` in case `SLRU` cache policy was used. [#94363](https://github.com/ClickHouse/ClickHouse/pull/94363) ([Kseniia Sumarokova](https://github.com/kssenii)).
* Creating a Backup database engine with less than two arguments now returns a more descriptive error message (`Wrong number of arguments` instead of `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)).
* Ignores impossible revokes of global grants on the database level for grants with grant option. [#94386](https://github.com/ClickHouse/ClickHouse/pull/94386) ([pufit](https://github.com/pufit)).
* Fix reading sparse offsets from compact parts. Closes [#94385](https://github.com/ClickHouse/ClickHouse/issues/94385). [#94399](https://github.com/ClickHouse/ClickHouse/pull/94399) ([Pavel Kruglov](https://github.com/Avogar)).
* Don't prevent ALTER of columns using implicit indexes, even if `alter_column_secondary_index_mode`'s `throw` mode is used. [#94425](https://github.com/ClickHouse/ClickHouse/pull/94425) ([Raúl Marín](https://github.com/Algunenano)).
* Fix crash in `TCPHandler` when multiple `receivePacketsExpectQuery` calls read `Protocol::Client::IgnoredPartUUIDs`. [#94434](https://github.com/ClickHouse/ClickHouse/pull/94434) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fix masking sensitive data in `system.functions`. [#94436](https://github.com/ClickHouse/ClickHouse/pull/94436) ([Vitaly Baranov](https://github.com/vitlibar)).
* Fix nullptr dereference with disabled `send_profile_events`. This feature was introduced recently for the ClickHouse Python driver. Closes [#92488](https://github.com/ClickHouse/ClickHouse/issues/92488). [#94466](https://github.com/ClickHouse/ClickHouse/pull/94466) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix text index .mrk incompatibility during merges. [#94494](https://github.com/ClickHouse/ClickHouse/pull/94494) ([Peng Jian](https://github.com/fastio)).
* When `read_in_order_use_virtual_row` is enabled, the code was accessing index columns based on the full primary key size without checking if the index was truncated, leading to use-after-free / uninitialized memory. Closes [#85596](https://github.com/ClickHouse/ClickHouse/issues/85596). [#94500](https://github.com/ClickHouse/ClickHouse/pull/94500) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix an error due to a type mismatch when sending external tables for subqueries with GLOBAL IN if the types are Nullable. Closes [#94097](https://github.com/ClickHouse/ClickHouse/issues/94097). [#94511](https://github.com/ClickHouse/ClickHouse/pull/94511) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* In previous versions, queries with multiple index conditions over the same expression may erroneously throw an exception `Not found column`. Closes [#60660](https://github.com/ClickHouse/ClickHouse/issues/60660). [#94515](https://github.com/ClickHouse/ClickHouse/pull/94515) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix incorrect handling of Nullable join column in runtime filters. [#94555](https://github.com/ClickHouse/ClickHouse/pull/94555) ([Alexander Gololobov](https://github.com/davenger)).
* Creating a workload in another workload that is currently in use no longer causes a crash. [#94599](https://github.com/ClickHouse/ClickHouse/pull/94599) ([Sergei Trifonov](https://github.com/serxa)).
* Fix a crash during ANY LEFT JOIN optimization when `isNotNull` is evaluated on a missing column. [#94600](https://github.com/ClickHouse/ClickHouse/pull/94600) ([Molly](https://github.com/ggmolly)).
* Fix default expression evaluation when referencing other columns with computed defaults. [#94615](https://github.com/ClickHouse/ClickHouse/pull/94615) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix permission issues in BACKUP/RESTORE operations. [#94617](https://github.com/ClickHouse/ClickHouse/pull/94617) ([Pablo Marcos](https://github.com/pamarcos)).
* Fix crash due to incorrect type cast when the data type is `Nullable(DateTime64)`. [#94627](https://github.com/ClickHouse/ClickHouse/pull/94627) ([Miсhael Stetsyuk](https://github.com/mstetsyuk)).
* Fixes a bug where certain distributed queries with `ORDER BY` could return `ALIAS` columns with swapped values (i.e., column `a` showing column `b`’s data and vice versa). [#94644](https://github.com/ClickHouse/ClickHouse/pull/94644) ([filimonov](https://github.com/filimonov)).
* Fix storing results of keeper-bench to file. [#94654](https://github.com/ClickHouse/ClickHouse/pull/94654) ([Antonio Andelic](https://github.com/antonio2368)).
* Fix incorrect estimations with MinMax-type statistics when the column contains negative floating-point values. [#94665](https://github.com/ClickHouse/ClickHouse/pull/94665) ([zoomxi](https://github.com/zoomxi)).
* Fix reading Parquet files when a map's key is a struct. [#94670](https://github.com/ClickHouse/ClickHouse/pull/94670) ([Konstantin Vedernikov](https://github.com/scanhex12)).
* Fix possibly incorrect RIGHT join result when using complex ON conditions. Close [#92913](https://github.com/ClickHouse/ClickHouse/issues/92913). [#94680](https://github.com/ClickHouse/ClickHouse/pull/94680) ([Vladimir Cherkasov](https://github.com/vdimir)).
* Preserve constant index granularity (use\_const\_adaptive\_granularity) after Vertical merges. [#94725](https://github.com/ClickHouse/ClickHouse/pull/94725) ([Azat Khuzhin](https://github.com/azat)).
* Fix mutation bug with scalar subqueries and table dependencies. If a table had dependencies (index or projections) over a column, scalar subqueries might be evaluated and cached without data and lead to incorrect changes. [#94731](https://github.com/ClickHouse/ClickHouse/pull/94731) ([Raúl Marín](https://github.com/Algunenano)).
* Fix AsynchronousMetrics cpu\_pressure fallback on error. [#94827](https://github.com/ClickHouse/ClickHouse/pull/94827) ([Raúl Marín](https://github.com/Algunenano)).
* The `getURLHostRFC` function was missing bounds checks before dereferencing pointers. When an empty string was passed to `domainRFC`, it would read uninitialized memory, triggering MSan errors. [#94851](https://github.com/ClickHouse/ClickHouse/pull/94851) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix readonlyness of encrypted disks. [#94852](https://github.com/ClickHouse/ClickHouse/pull/94852) ([Azat Khuzhin](https://github.com/azat)).
* Fix logical error in fractional `LIMIT/OFFSET` when using the old analyzer with Distributed tables. Closes [#94712](https://github.com/ClickHouse/ClickHouse/issues/94712). [#94999](https://github.com/ClickHouse/ClickHouse/pull/94999) ([Ahmed Gouda](https://github.com/0xgouda)).
* Fix crash under some conditions when join runtime filters are enabled by default. [#95000](https://github.com/ClickHouse/ClickHouse/pull/95000) ([Alexander Gololobov](https://github.com/davenger)).
* Improve masking passwords in url used in table engine `URL()` and table function `url()`. [#95006](https://github.com/ClickHouse/ClickHouse/pull/95006) ([Vitaly Baranov](https://github.com/vitlibar)).
* Function `toStartOfInterval` now works in the same way as `toStartOfX`, where `X` is `Day, Week, Month, Quarter, Year` when the `enable_extended_results_for_datetime_functions` is on. [#95011](https://github.com/ClickHouse/ClickHouse/pull/95011) ([Kirill Kopnev](https://github.com/Fgrtue)).
* Fix constant string comparisons not respecting the settings `cast_string_to_date_time_mode`, `bool_true_representation`, `bool_false_representation`, and `input_format_null_as_default`. Closes [#91681](https://github.com/ClickHouse/ClickHouse/issues/91681). [#95040](https://github.com/ClickHouse/ClickHouse/pull/95040) ([Nihal Z. Miaji](https://github.com/nihalzp)).
* Fix data race in the filesystem cache. [#95064](https://github.com/ClickHouse/ClickHouse/pull/95064) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix a rare race condition in the Parquet reader. [#95068](https://github.com/ClickHouse/ClickHouse/pull/95068) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Fix crash in the top K optimization when `LIMIT` is zero. Closes [#93893](https://github.com/ClickHouse/ClickHouse/issues/93893). [#95072](https://github.com/ClickHouse/ClickHouse/pull/95072) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Converting from DateTime/integers to Time64 extracts the time-of-day component using `toTime`, which is not monotonic. The `ToDateTimeMonotonicity` template incorrectly claimed this conversion was monotonic, causing "Invalid binary search result in MergeTreeSetIndex" exception in debug builds. [#95125](https://github.com/ClickHouse/ClickHouse/pull/95125) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
* Recreated list of manifest file entries only if necessary (previously it was done on each iteration). [#95162](https://github.com/ClickHouse/ClickHouse/pull/95162) ([Daniil Ivanik](https://github.com/divanik)).

#### Build/Testing/Packaging Improvement

* Add a set of tools for profiling memory allocations in the ClickHouse SQL parser using jemalloc's heap profiling capabilities. [#94072](https://github.com/ClickHouse/ClickHouse/pull/94072) ([Ilya Yatsishin](https://github.com/qoega)).
* Added a tool that simplifies debugging of memory allocations in parser. It uses jemalloc `stats.allocated` metric before and after we parse query to AST representation to show what is allocated. Also it supports memory profiling mode that dumps profile before and after to build reports where allocations occurred. [#93523](https://github.com/ClickHouse/ClickHouse/pull/93523) ([Ilya Yatsishin](https://github.com/qoega)).
* Remove transitive libc++ includes. [#92523](https://github.com/ClickHouse/ClickHouse/pull/92523) ([Raúl Marín](https://github.com/Algunenano)).
* Make some sequential tests parallel: [https://github.com/ClickHouse/ClickHouse/pull/93030/changes#diff-c3a73510dae653c9bbfa24300b32f5d6ec663fd4e72cc4a3d5daa6e4342915df](https://github.com/ClickHouse/ClickHouse/pull/93030/changes#diff-c3a73510dae653c9bbfa24300b32f5d6ec663fd4e72cc4a3d5daa6e4342915df). [#93030](https://github.com/ClickHouse/ClickHouse/pull/93030) ([Nikita Fomichev](https://github.com/fm4v)).
* Cleanup some build flags. [#93679](https://github.com/ClickHouse/ClickHouse/pull/93679) ([Raúl Marín](https://github.com/Algunenano)).
* Bump c-ares from v1.34.5 to v1.34.6. This addresses c-ares' `CVE-2025-62408`, which is not relevant for ClickHouse. [#94129](https://github.com/ClickHouse/ClickHouse/pull/94129) ([Govind R Nair](https://github.com/Revertionist)).
* Use `curl` 8.18.0. [#94742](https://github.com/ClickHouse/ClickHouse/pull/94742) ([Konstantin Bogdanov](https://github.com/thevar1able)).
