_Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment._ _This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense._ Adds test coverage for 1 untested code path, found during automated review of [PR #109744](htt
importance 5@clickgapaiopenpr-not-for-changelogcan be testedOriginal evidence ↗
### Changelog category (leave one): - CI Fix or improvement (changelog entry is not required) -- Adds a `ci_links.py` pre-hook to the `PR` workflow that, on upstream `ClickHouse/ClickHouse` pull request runs, appends a `:ci_links:` block to the PR description with: - a link to the workflow report, and - a link to a GitHub search for the corresponding sync PR
Related: https://github.com/ClickHouse/ClickHouse/pull/114415 Related: https://github.com/ClickHouse/ClickHouse/pull/113610 ### Changelog category (leave one): - CI Fix or Improvement (changelog entry is not required) ### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.
importance 5@groeneaiclosedcan be testedpr-synced-to-cloudpr-ciOriginal evidence ↗
Related: https://github.com/ClickHouse/ClickHouse/pull/108091 ### 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_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Fixe
Closes: https://github.com/ClickHouse/ClickHouse/issues/85029 ### 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_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Fix
Closes: https://github.com/ClickHouse/ClickHouse/issues/114406 ### 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_entry_guidelines.md) of the changes that goes into CHANGELOG.md): A l
Related: https://github.com/ClickHouse/ClickHouse/pull/73510 Related: https://github.com/ClickHouse/ClickHouse/issues/72968 Fibers are used for asynchronous communication with remote replicas, and a stack is the only thing a fiber consists of, so allocating the stack is the whole cost of creating a fiber. Nothing observed it: neither the number of allocation
<!-- 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/issues/113763 Related: https://github.com/ClickHouse/ClickHouse/pull/113868 Related: https://github.com/ClickHouse/ClickHouse/pull/112280 --> ### Changelog category (leave one): - New Featur
_Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels._ Test name: Logical error: Shard number is greater than shard count: shard_num=A shard_count=B cluster=C (STID: 5066-564d) CI report: [Stress test (arm_tsan)](https://s3.amazonaws.com/clickhouse-test-reports/json.h
### Company or project name _No response_ ### Use case [TurboQuant, a quantization method](https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/) that perhaps could be applied to ClickHouse to improve Approximate Nearest Neighbor (ANN) searches. technical details are somewhat beyond my expertise ### Describe the solution
_Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment._ _Retrospective finding from a historical scan of [PR #82286](https://github.com/ClickHouse/ClickHouse/pull/82286) (merged 2025-10-17). Confirmed on current codebase — close with a note if already fixed._ ### Describe what's wrong Both `h3GetDestinationInd
### Company or project name _No response_ ### Use case The current AI functions are all value-producing and row-wise. There is no way to express an LLM decision as a native SQL predicate. Users who want to filter rows by a natural-language condition must wrap `aiClassify` in a comparison, which is awkward and does not compose in joins. ### Describe the solut
### Describe what's wrong Enabling `fsync_part_directory = 1` on a `MergeTree` table stored on an `encrypted` disk (with a non-empty `path`, as in the documented configuration) makes **every `INSERT` fail** with `FILE_DOESNT_EXIST` (Code 107). The durability hardening setting is therefore unusable on encrypted disks — users who want crash-safe part commits o
`serialize_query_plan = 1` sends the shard-side fragment as a serialized query plan. Three query-plan steps have no `serialize` implementation, and there is no fallback to the text path — any query whose shipped fragment contains one of them fails with `NOT_IMPLEMENTED` at execution time, while the same query succeeds with `serialize_query_plan = 0`: - `Roll
`FULL JOIN ... USING` where the **left** table is read through `Distributed`: selecting the qualified join column `t1.a` is wrong for right-only rows — and at pure defaults the same query throws an exception. **How to reproduce** (26.8.1.561, any single-shard cluster whose replica is the server itself, e.g. `test_shard_localhost` from the standard test confi
## Describe the problem A valid query with a correlated `EXISTS` subquery fails with exception 48 (`NOT_IMPLEMENTED`) at pure default settings when the subquery's `WHERE` contains a `dictGet(...) >= <const>` comparison. `optimize_inverse_dictionary_lookup` (default `1`) rewrites the `dictGet('d', 'attr', key) >= c` predicate into `key IN __set_...`. When the
## Describe the problem With `enable_materialized_cte = 1`, a twice-referenced materialized CTE reading a `Distributed` table, filtered by `IN (SELECT ... FROM <another materialized CTE>)`, fails with exception 49 (`LOGICAL_ERROR`): ``` Code: 49. DB::Exception: Reading from materialized CTE 'ct' before its materialization completed - DelayedPortsProcessor ga
**Describe what's wrong** With a `text` index on column `c`, a query that filters on `c` in both `PREWHERE` and `WHERE` fails with `Code: 10. NOT_FOUND_COLUMN_IN_BLOCK` on a perfectly valid query, when `c` itself is not in the SELECT list. The direct-read optimization (`query_plan_direct_read_from_text_index`, default `1`) rewrites one of the two text-search
🕵 Reading a `Merge` table (or the `merge` table function) with custom-key parallel replicas (`parallel_replicas_mode = 'custom_key_sampling'` or `'custom_key_range'`) fails with an exception when the common processing stage of the children is `WithMergeableState` — for example, when one of the underlying tables is a `Distributed` table. ```sql CREATE TABLE t
**Describe what's wrong** With `rewrite_in_to_join = 1`, any non-constant `IN (subquery)` predicate placed in `PREWHERE` makes the query fail with `Code: 46. DB::Exception: Unknown function exists. (UNKNOWN_FUNCTION)`. The same predicate in `WHERE` works and returns the correct result. `NOT IN`, tuple `IN`, and the same query with an explicit `JOIN` fail the
_Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment._ ### Describe what's wrong Every query that builds arrays row-by-row gets measurably slower. ClickHouse's own Performance Comparison job reports `tests/performance/array_join.xml` queries #0-#5 as `slower` on all three of this PR's benchmarked commits, by
### Company or project name _No response_ ### Use case `generateSerialID(series_identifier)` (introduced in 25.x) creates a named auto-increment counter whose state is persisted as a znode in [Zoo]Keeper under series_keeper_path. There is currently no SQL-level way to reset or delete a series once it has been created — the state is effectively permanent for
### Company or project name ClickHouse ### Use case Selectivity estimation for range predicates (`<`, `<=`, `>`, `>=`, `BETWEEN`, and range decompositions from `PlainRanges`) on columns with non-uniform value distributions. Today these are estimated with `tdigest` (if declared), linear interpolation over `[min, max]` from `basic`/`minmax`, or a magic default
### Describe the situation When `query_plan_optimize_lazy_final` and `optimize_aggregation_in_order` are both on, the aggregation that the lazy `FINAL` replacement builds is merged **one group at a time**: `Aggregator::mergeBlocks` is called once per distinct key, and each call writes two log lines (a `Trace` "Merging partially aggregated blocks" and a `Debu
**Describe what's wrong** An `IN (SELECT ...)` predicate inside a higher-order-function lambda (`arrayExists`, `arrayFilter`, `arrayMap`, ...) always evaluates to `0` when the enclosing SELECT is used as a derived table (or when the lambda sits in an outer `WHERE`). The identical expression at the top level returns the correct result. **Does it reproduce on
### Company or project name ClickHouse QA (durability testing) ### Describe what's wrong A failed `INSERT INTO FUNCTION s3(...) PARTITION BY <key>` (and the equivalent object-storage table engines) is **not atomic and leaves a durable, read-visible prefix of the partitions it had already written**, while the statement reports failure. `PartitionedSink` final
### Describe what's wrong **`arrayIntersect` on `Nullable` integer arrays of different widths silently matches values that do not survive the narrowing cast to the common element type. `arrayIntersect([toNullable(1)], [toNullable(257)])` returns `[1]`; the non-Nullable form `arrayIntersect([1], [257])` correctly returns `[]`. Pre-existing — not introduced by
**Describe what's wrong** After `ALTER TABLE ... ADD COLUMN` adds a column whose name collides with a generated array subcolumn (e.g. a column named `a.size0` next to an `Array` column `a`), reads of that column from parts created **before** the ALTER silently return the **subcolumn's computed value** (the array size) instead of the added column's DEFAULT. P
### Company or project name ClickHouse QA (internal durability testing) ### Describe what's wrong A multi-partition lightweight `UPDATE` is neither atomic on failure nor idempotent on retry. `UPDATE t SET c = ... WHERE ...` over a table with N partitions creates one patch part per partition and commits them sequentially (`MergeTreeSinkPatch::finishDelayedChu
### Company or project name ClickHouse QA (internal durability testing) ### Describe what's wrong An I/O error partway through `RESTORE` leaves already-attached parts Active and read-visible, with no rollback, while `RESTORE` reports failure — and the server's own error message then steers the operator into silently duplicating that residue. `StorageReplicat
### Company or project name ClickHouse QA (internal durability testing) ### Describe what's wrong In a multi-server `S3Queue`/`ObjectStorageQueue` setup with `enable_hash_ring_filtering = 1`, a per-server in-memory "Processed" cache silently skips a re-appeared object after that object's tracked-file record has been aged out of Keeper by a different server.
_Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels._ Test name: Logical error: Unexpected token for lazy mode: A. Multi-block postings must be compressed (STID: 4250-5377) CI report: [AST fuzzer (amd_debug)](https://s3.amazonaws.com/clickhouse-test-reports/json.html
🕵 Found by the AST fuzzer in the stress test of a CI run ([Stress test (arm_debug) report](https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112930&sha=1c5bf0b613146bd6666b6d2bd2be55f539f6c0d8&name_0=PR&name_1=Stress%20test%20%28arm_debug%29), `Hung check failed, possible deadlock found`): the fuzzed query hung for 1338 s with `is_cancelled: 1` a
_Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels._ Test name: Logical error: Invalid number of columns in chunk pushed to OutputPort. Expected A, found B (STID: 2270-3258) CI report: [AST fuzzer (amd_debug)](https://s3.amazonaws.com/clickhouse-test-reports/json.ht
🕵 Found while working on https://github.com/ClickHouse/ClickHouse/pull/114262 (lazy materialization for local Parquet files); the behavior is identical with that PR's optimization on or off, and reproduces on current master without it. **Describe what's wrong** When a table over a data file (`File(Parquet)`, and by code inspection the same applies to the obj
**Describe what's wrong** A query whose `WHERE` clause contains a constant expression producing an out-of-precision `Decimal` value — e.g. `toDecimal64(1000000000000000000, 0)`, a 19-digit value in `Decimal(18, 0)` — executes fine against a local table, but the same query through a `Distributed` table throws `Code: 69. DB::Exception: Too many digits (19 > 18
### 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): Added experimental `DROP DETACHED TABLE` support, gated by `allow_experimental_drop_detached_table`, to remove
importance 4@UberDeveropenmanual approvecan be testedpr-experimentalOriginal evidence ↗
### 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_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Allows to constant-fold filters through materialize wrappers. Clos
### Changelog category (leave one): - Bug Fix (user-visible misbehavior in an official stable release) ### Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): `JSONExtract` now honours `cast_string_to_date_time_mode` when converting string JSON values to `DateTime`/`DateTime64`, consistently with `CAST`. Closes #1091
Implements a new application mode in the `clickhouse` binary, named `proxy`. The proxy accepts connections over end-user ClickHouse protocols, finds the upstream backend based on configurable rules (hostname from TLS SNI or HTTP header, user name, database name, and — for HTTP — query type), and forwards the traffic to it. It is built on the `silk` fiber fra
Closes: [https://github.com/ClickHouse/ClickHouse/issues/110281](<https://github.com/ClickHouse/ClickHouse/issues/110281>) ### 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_entry_gu
Fixes a server abort with the logical error `Cannot write to finalized buffer` that was hit by the stress test. `MergeTreeDeduplicationLog::rotate` finalized the current log writer and only afterwards created the writer for the new log file. If creating the new writer threw — a transient I/O error, or, in the CI failure, a memory-tracker fault injection hitt
<!-- 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/110862 --> ### Changelog category (leave one): - Bug Fix (user-visible misbehavior in an official stable release) ### Changelog entry (a [user-readable short description](https://githu
importance 4@groeneaiopenpr-bugfixcan be testedv26.4-must-backportOriginal evidence ↗
This PR contains https://github.com/ClickHouse/ClickHouse/pull/109454 minus `materialize_statistics_on_insert_max_table_size` (which I'm happy to introduce in a second step). Made a separate PR to speed up the integration of the feature (the new behavior has high demand and the original PR is stuck since three weeks). If the original PR gets merged first, we
### 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_entry_guidelines.md) of the changes that goes into CHANGELOG.md): Fix AsynchronousBoundedReadBuffer's readBigAt data race. Closes ht
Splits the silk runtime integration out of https://github.com/ClickHouse/ClickHouse/pull/111275, so that it can be reviewed on its own. This adds the plumbing that lets ClickHouse run work on [silk](https://github.com/ClickHouse/silk) fibers, without yet putting any subsystem on them. - `Silk::initializeFiberScheduler` / `Silk::destroyFiberScheduler`, called
Related: https://github.com/ClickHouse/ClickHouse/pull/113376 The original design used `JSONAllValues` as the input to a Bloom filter. `JSONAllValues` serializes each value as text. It does not preserve the runtime type. This loss of type information is important for `Dynamic` values. ClickHouse can compare JSON values with different runtime types. Some type
Related: https://github.com/ClickHouse/ClickHouse/pull/110188 With `inject_random_order_for_select_without_order_by = 1`, `InjectRandomOrderIfNoOrderByPass` wrapped every top-level query into `SELECT * FROM (...) ORDER BY rand()`, including queries that are planned only up to an intermediate stage. For a `Merge` table with a `Distributed` child, the other ch
<!-- 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/101747 --> Closes: https://github.com/ClickHouse/ClickHouse/issues/101747 ### Changelog category (leave one): - Bug Fix (user-visible misbehavior in an official stable release) ### Cha
importance 4@groeneaiclosedpr-bugfixcan be testedpr-synced-to-cloudOriginal evidence ↗