Addresses issues in #88088 Support the `RowBinary` family of input formats for `aggregate_function_input_format = 'value'` and `aggregate_function_input_format = 'array'`, and unify the value/array deserialization across all input formats (text and binary) behind a single implementation that deserializes into a temporary column of the argument type (or `Arra
Closes: https://github.com/ClickHouse/ClickHouse/issues/22426 Related: https://github.com/ClickHouse/ClickHouse/pull/106430 Related: https://github.com/ClickHouse/ClickHouse/pull/107845 Related: https://github.com/ClickHouse/ClickHouse/pull/107828 ### Description This re-lands #106430 ("Make Ctrl+C terminate the output of a result set in the client promptly"
Closes: https://github.com/ClickHouse/ClickHouse/issues/46770 For a non-replicated `MergeTree` table, `OPTIMIZE TABLE ... FINAL` without an explicit partition used to process partitions one by one: it selected and ran the merge for one partition, waited for it to finish, and only then moved on to the next one. On a table with many partitions this serialized
Currently, the text index direct read optimization deserialize the sparse index, dictionary block and postings when there is token that exists in the index. Once the postings is read from disk, it fills the newly created boolean virtual column with postings data. With this optimization, we aim to reduce reading postings from disk and creating a virtual colum
> **Series**: #112871 -> **#112876** (this), #112872, #112873, #112874, #112875 **Problem.** A ranged Azure copy corrupts the destination — native `CopyFromUri` copies the whole source blob (ignoring offset/size) and the single-part read+write fallback reads from byte 0 — and a transient 403/auth after the server-side copy starts spawns a second writer to th
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Closes: https://github.com/ClickHouse/ClickHouse/issues/113037 (auto-closes the issue when this PR is merged into the default branch) --> ### Changelog category (leave one): - Performance Improvement ### Changelog entry (a [user-readable sh
importance 15@groeneaiclosedpr-performancecan be testedpr-synced-to-cloudOriginal evidence ↗
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Closes: https://github.com/ClickHouse/ClickHouse/issues/NNNNN (auto-closes the issue when this PR is merged into the default branch) Related: https://github.com/ClickHouse/ClickHouse/pull/NNNNN --> <details> <summary>Claude</summary> ## Mot
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Closes: https://github.com/ClickHouse/ClickHouse/issues/NNNNN (auto-closes the issue when this PR is merged into the default branch) Related: https://github.com/ClickHouse/ClickHouse/pull/NNNNN --> ### Changelog category (leave one): - Crit
Related: https://github.com/ClickHouse/ClickHouse/pull/110970 Follow-up to the lazy materialization for object storage (#110970), as discussed in https://github.com/ClickHouse/ClickHouse/pull/110970#issuecomment-5247858385: implement it for plain local Parquet files read through `StorageFile` — the `file` table function and the `File` table engine. For `ORDE
Closes: https://github.com/ClickHouse/ClickHouse/issues/58035 Related: https://github.com/ClickHouse/ClickHouse/pull/58361 Related: https://github.com/ClickHouse/ClickHouse/pull/111609 When a query with `FINAL` sorts in reverse order of the sorting key, for example `ORDER BY key DESC LIMIT n`, the read-in-order optimization was disabled and the query read th
### Changelog category (leave one): - Performance Improvement ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Improved performance of merges of text indexes. ### Additional context A few optimizations: - The main one:
Related: https://github.com/ClickHouse/ClickHouse/pull/111492 Related: https://github.com/ClickHouse/ClickHouse/pull/104478 Related: https://github.com/ClickHouse/ClickHouse/pull/110507 `use_query_condition_cache_for_top_k` was introduced by #111492 and defaulted to `false` as a precaution while the soundness of the query condition cache entries written by a
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Closes: https://github.com/ClickHouse/ClickHouse/issues/NNNNN (auto-closes the issue when this PR is merged into the default branch) Related: https://github.com/ClickHouse/ClickHouse/pull/NNNNN --> `Alias` table now requires `SHOW COLUMNS`
importance 15@nauuopenpr-must-backportcan be testedpr-critical-bugfixOriginal evidence ↗
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Closes: https://github.com/ClickHouse/ClickHouse/issues/NNNNN (auto-closes the issue when this PR is merged into the default branch) Related: https://github.com/ClickHouse/ClickHouse/pull/NNNNN --> Related: https://github.com/ClickHouse/Cli
### Company or project name Arenadata ### Use case Support of JWT auth in ClickHouse (non Clould version) in native and HTTP protocols. ### Describe the solution you'd like We found an attempt to implement it in [PR](https://github.com/ClickHouse/ClickHouse/pull/68634) with `Closed` status. After analysis it seems more like a draft PR: * payload validation -
Fixes `date_time_overflow_behavior` being silently ignored when casting integer and `Float32`/`Float64` values to `DateTime64` and `Time64`. Previously, overflowing values could skip the `VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE` exception in `throw` mode and skip clamping to the target boundary in `saturate` mode. The fix routes native and wide integer sources (`
The parallel replicas coordinator deduplicated parts purely by `MergeTreePartInfo` (name + version), so when two replicas announced a same-named part holding genuinely different data the second announcement was silently merged into the first. The coordinator then dispatched ranges from the first replica's snapshot to the second replica, whose local part was
`AvroForIcebergDeserializer::getContent(row_index)` was passed as an argument to `insertRowToLogTable` and serialized a manifest entry to JSON on every call, even when `iceberg_metadata_log_level` (default `none`) discarded the result. Hoist the level check above the five call sites so the payload is only built when the log will consume it. CPU profile of a
importance 14@starpactclosedpr-performancemanual approvecan be testedOriginal evidence ↗
### Changelog category (leave one): - Experimental Feature ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Add an experimental query plan cache supporting complex `SELECT` queries: views (including nested views), join
<!-- Closes: https://github.com/ClickHouse/ClickHouse/issues/NNNNN (auto-closes the issue when this PR is merged into the default branch) --> ### Changelog category (leave one): - Performance Improvement ### Changelog entry (a [user-readable short description] Queries on Iceberg tables with many delete files now start faster. ClickHouse reads and decodes the
<!--- A technical comment, you are free to remove or leave it as it is when PR is created The following categories are used in the next scripts, update them accordingly utils/changelog/changelog.py tests/ci/cancel_and_rerun_workflow_lambda/app.py --> ### Changelog category (leave one): - Experimental Feature ### Changelog entry (a user-readable short descrip
Adds two ways to run MongoDB queries against ClickHouse: - a **wire protocol endpoint** (`mongo_port`), so MongoDB drivers and tools such as `pymongo` and `mongosh` can connect to ClickHouse as if it were a MongoDB server; - a **query dialect** (`SET dialect = 'mongo'`), so MongoDB shell syntax can be sent over the usual ClickHouse interfaces. A Mongo databa
Fix `IN` and `NOT IN` expressions with non-constant right-hand side operands that reference columns from the current row. # old analyzer Previously, the old analyzer tried to build a standalone `Set` for expressions such as `number % 2 IN (number % 3, number % 5)`, which made the right-hand side unable to resolve `number` and produced an `UNKNOWN_IDENTIFIER`
importance 13@niyueclosedpr-bugfixcan be testedpr-synced-to-cloudOriginal evidence ↗
Add [Google ScaNN](https://github.com/google-research/google-research/tree/master/scann) as a new approximate nearest neighbor (ANN) backend for the `vector_similarity` skip index in `MergeTree` tables, accessible via `TYPE vector_similarity('scann', ...)` syntax. ScaNN uses an IVF-based index with asymmetric hashing (LUT16) and exact reranking, complementin
importance 13@lvzhipin03opensubmodule changedmanual approvecan be testedpr-experimentalOriginal evidence ↗
`joined_subquery_requires_alias = 1` (the default) rejected every unaliased subquery, table function or union used in a multi-table join, even when the missing alias could not cause any ambiguity. That is stricter than necessary: an alias only serves to qualify a column, so it is only needed when the unaliased table expression exposes a column whose name als
Related: https://github.com/ClickHouse/ClickHouse/issues/104634 Related: https://github.com/ClickHouse/ClickHouse/issues/49149 Related: https://github.com/ClickHouse/ClickHouse/issues/39753 The `pread_threadpool` read method hands every read off to a thread pool, unless the data is already in the page cache, which it checks with the `preadv2` system call and
Closes: https://github.com/ClickHouse/ClickHouse/issues/114407 Related: https://github.com/ClickHouse/ClickHouse/issues/79977 Related: https://github.com/ClickHouse/ClickHouse/pull/101814 For a `MergeTree` table with `ORDER BY toUnixTimestamp(ts)` where `ts` is `DateTime64`, a plain range filter on `ts` (e.g. `WHERE ts >= '2026-06-15'`) stopped using the pri
Experimental support for storing the Keeper changelog directly on object storage (S3) instead of (or in addition to) a local disk, gated behind the coordination setting `s3_experimental_changelog`. Enables running Keeper without a local data volume. Configuration: - `keeper_server.coordination_settings.s3_experimental_changelog` — enable the experimental pat
importance 13@trololo23can be testedcomp-keeperpr-experimentalOriginal evidence ↗
### Changelog category (leave one): - New Feature ### Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): Add an opt-in Redis wire-protocol server backed by `Join` tables: a configured `redis.port` serves `GET`/`MGET` and `HGET`/`HMGET` point lookups (plus `AUTH`, `SELECT`, `PING`, `ECHO`) against ClickHouse tables m
importance 13@m4ttheuxopenpr-featurecomp-protocolsmanual approvecan be testedOriginal evidence ↗
This PR addresses https://github.com/ClickHouse/ClickHouse/issues/93831 ### Changelog category (leave one): - Improvement ### Changelog entry Support dynamic table routing for Prometheus `remote-write` based on the request URL, allowing a single handler to ingest data into multiple TimeSeries tables while preserving backward compatibility with fixed-table co
importance 13@niyueopenpr-improvementmanual approvecan be testedcomp-promqlOriginal evidence ↗
The server-side AST fuzzer (`executeASTFuzzerQueries`, active only when `ast_fuzzer_runs > 0`) used to clear the transaction on the caller's query and session `Context` with no lock held: ```cpp context->getQueryContext()->getSessionContext()->setCurrentTransaction(NO_TRANSACTION_PTR); context->setCurrentTransaction(NO_TRANSACTION_PTR); ``` `Context::setCurr
importance 12@groeneaiclosedcan be testedpr-synced-to-cloudpr-ciOriginal evidence ↗
Reject `max_replication_lag_to_enqueue = 0` at parse time everywhere it can be supplied. `0` was never useful: it asks the post-recovery unsynced check `max_log_ptr + max_replication_lag_to_enqueue <= new_max_log_ptr` to be trivially true (the ZooKeeper counter is monotonically non-decreasing), which mis-flags a caught-up replica as unsynced and then trips `
importance 12@groeneaiopenpr-bugfixmanual approvecan be testedOriginal evidence ↗
### Changelog category (leave one): - Backward Incompatible Change ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Aggregate functions that do not handle the `Variant` type natively (`sum`, `avg`, `min`, `max`, `argMi
Closes: https://github.com/ClickHouse/ClickHouse/issues/109432 Introduce a new `ALTER TABLE ... RECOMPRESS COLUMN col` statement that re-compresses the existing data of a column with the column's current compression codec. Changing a column's codec with `MODIFY COLUMN col CODEC(...)` is metadata-only: the new codec applies to newly written data, while data a
Improves the error message shown when parsing the data of an `INSERT` fails. Previously, inserting data whose structure does not match the destination produced a confusing low-level parse error (for example `Cannot parse input: expected '\t' before ...`) with no hint about the real cause. In the linked issue, the destination's inferred schema had integer col
Related: found by the `arm_tsan` and `azure, amd_tsan` Stress tests (STID 3977-4818, ThreadSanitizer data race). No existing issue. ### Changelog category (leave one): - Bug Fix (user-visible misbehavior in an official stable release) ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_
Adds support for the [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) format, a self-describing binary format for multidimensional arrays that is the standard way climate, weather, oceanographic and other scientific data is distributed. There is a lot of public data in it (ERA5, CMIP, NOAA, Copernicus), and until now the only way to query it with Clic
`Aggregator::estimateSizeOfCompressedState` estimates how many bytes the aggregate states would take when a replica sends them to the initiator, which is how automatic parallel replicas decides whether distributing a query pays off. It builds a `CompressedWriteBuffer` over a `NullWriteBuffer`, but serializes the sampled states into the `NullWriteBuffer` dire
Original pull-request https://github.com/ClickHouse/ClickHouse/pull/113654 ## Do not merge this PR manually This pull-request is a first step of an automated backporting. It contains changes similar to calling `git cherry-pick` locally. If you intend to continue backporting the changes, then resolve all conflicts if any. Otherwise, if you do not want to back
importance 12@robot-clickhouse-ci-1opendo not testpr-cherrypickpr-critical-bugfixOriginal evidence ↗
Original pull-request https://github.com/ClickHouse/ClickHouse/pull/113654 ## Do not merge this PR manually This pull-request is a first step of an automated backporting. It contains changes similar to calling `git cherry-pick` locally. If you intend to continue backporting the changes, then resolve all conflicts if any. Otherwise, if you do not want to back
importance 12@robot-clickhouse-ci-1opendo not testpr-cherrypickpr-critical-bugfixOriginal evidence ↗
Original pull-request https://github.com/ClickHouse/ClickHouse/pull/113654 ## Do not merge this PR manually This pull-request is a first step of an automated backporting. It contains changes similar to calling `git cherry-pick` locally. If you intend to continue backporting the changes, then resolve all conflicts if any. Otherwise, if you do not want to back
importance 12@robot-clickhouse-ci-1opendo not testpr-cherrypickpr-critical-bugfixOriginal evidence ↗
Original pull-request https://github.com/ClickHouse/ClickHouse/pull/113563 This pull-request is a last step of an automated backporting. Treat it as a standard pull-request: look at the checks and resolve conflicts. Merge it only if you intend to backport changes to the target branch, otherwise just close it. ### The PR source The PR is created in the [CI jo
The final `DISTINCT` merged all of its input streams into one and deduplicated them on a single thread, so `SELECT DISTINCT` did not scale with `max_threads` while the equivalent `GROUP BY` did - aggregation parallelizes its merge over two-level hash tables, `DISTINCT` had nothing of the sort. This repartitions the input streams by the hash of the `DISTINCT`
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. --> ### Changelog category (leave one): - Performance Improvement ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes int
<!--- A technical comment, you are free to remove or leave it as it is when PR is created The following categories are used in the next scripts, update them accordingly utils/changelog/changelog.py tests/ci/cancel_and_rerun_workflow_lambda/app.py --> ### Changelog category (leave one): - Performance Improvement ### Changelog entry (a user-readable short desc
<!--- Disable AI PR formatting assistant: true --> ### Changelog category (leave one): - Not for changelog (changelog entry is not required) ### Details The setting enables code execution, which can trigger hidden bugs, in particular in GLOBAL JOINs with parallel replicas. Discovered one while doing https://github.com/ClickHouse/ClickHouse/pull/70658 within
Related: https://github.com/ClickHouse/ClickHouse/issues/2797 `DEFAULT` expressions are now supported for named elements of `Tuple` data types, e.g.: ```sql CREATE TABLE t (id UInt8, c Tuple(a UInt8, s String DEFAULT 'Hello')) ENGINE = MergeTree ORDER BY id; ``` Such defaults exist only at the syntax level: they are pulled up to the column level (for `CREATE
<!-- Linked issues and pull requests. Use full GitHub URLs, one relationship per line; delete the lines you don't need. Related: https://github.com/ClickHouse/ClickHouse/pull/109428 --> ### Changelog category (leave one): - Bug Fix (user-visible misbehavior in an official stable release) ### Changelog entry (a [user-readable short description](https://github