Skip to content

Fix conv reading a Bool or a float argument by its text - #132662

Merged
PedroTadim merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-conv-bool-argument
Nov 19, 2026
Merged

PedroTadim merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-conv-bool-argument

Conversation

@groeneai

@groeneai groeneai commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Closes: #132562

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 into CHANGELOG.md):

Fix conv returning wrong results for a Bool or a float first argument. A Bool was converted from the text true/false instead of its value 1/0. A float was converted from its text, so a value printed in exponent form gave a wrong number (conv(1e21, 16, 10) returned 7713, conv(1e-7, 16, 10) returned 30); it now converts as the same number written as a string, and nan and inf throw BAD_ARGUMENTS instead of returning a number.

Description

On 26.10 (measured on the official 26.10.3.7 build at play.clickhouse.com; 26.3 and 26.8 LTS have the same code), SELECT conv(true, 10, 2) returns 0 instead of 1, and conv(false, 16, 10) returns 250 instead of 0. Failing reproduction: fiddle from the issue.

conv turns a non-String first argument into its digit string with castColumn(..., String) and parses that text, so any argument whose text is not its digits converts wrongly:

  • Bool, and SimpleAggregateFunction(f, Bool), which keeps its serialization, print as true/false. When the argument is stored as UInt8 and its type has a custom serialization, conv now casts it as plain UInt8, so it converts the stored value, as toUInt8, hex and bin do (and MySQL CONV(TRUE, 10, 2)). One edge: a Bool that stores a raw value other than 0/1 (inserted from UInt8 2) now converts as 2, like toUInt8(b).
  • A Float32 or Float64 prints in exponent form (1e21, 1e-07) or as nan/inf, and those letters are digits in the higher bases: conv(1e21, 10, 10) returned 1, conv(1e21, 16, 10) 7713, conv(1e-7, 16, 10) 30 and conv(nan, 36, 10) 30191. A float now converts as the digits of its integer part, the same as that number written as a string: conv(1e21, 10, 10) overflows to 18446744073709551615 like conv('1000000000000000000000', 10, 10), conv(1e-7, 16, 10) is 0. nan and inf have no digits and throw BAD_ARGUMENTS, as an empty number already does. A float printed without an exponent (15.9, -2.5, -0.0, 123.75) converts as before. A nan or inf masked by NULL (nullIf(x, inf)), or on a row with a NULL base, still gives NULL.

All other argument types take the unchanged path. BFloat16 is not accepted by conv.

Validation: 05829_conv_bool_argument (constant, column, Nullable(Bool), SimpleAggregateFunction(any, Bool) and (sumWithOverflow, Bool)) fails on master and passes with the fix, 50/50 with random settings. 05830_conv_float_argument covers exponent forms, overflow, negative and tiny values, Float32, a non-constant column, the unchanged non-exponent cases, the non-finite errors and NULL-masked non-finite values; its expected values are what master returns for the same numbers written as strings. The existing conv tests pass unchanged with the Bool change; none of them passes a float argument, so the float change does not reach them.

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/132662]

Version info

  • Merged into: 26.11.1.2858-master (included in 26.11 and later)

`conv` turns a non-String first argument into its digit string with
`castColumn(..., String)` using the argument's own type. `FunctionCast`
sends any type with a custom serialization to the generic text route
(`FunctionsConversion.cpp`, `from_type->getCustomSerialization()`), so a
`Bool` became 'true'/'false' and `parseFromBase` read those letters as
digits: `conv(true, 10, 2)` returned '0', `conv(false, 16, 10)` '250'.
`SimpleAggregateFunction(f, Bool)` keeps `Bool`'s serialization (its
custom desc carries only a name), so it had the same defect, including
the `sumWithOverflow`/`groupBitOr` variants whose result is UInt8.

When the argument is stored as UInt8 and its type has a custom
serialization, cast it as plain `UInt8`, so `conv` converts the stored
value like `toUInt8`, `hex` and `bin` do (and MySQL `CONV(TRUE, 10, 2)`).
Among `NativeNumber` types only Bool storage has a custom serialization,
so every other type keeps the unchanged path. `Nullable`,
`LowCardinality`, `Dynamic` and `Variant` reach the same code through
the default implementations.

Closes ClickHouse#132562

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (1 nit).

# Sev Finding Verdict Evidence / action
1 💡 LowCardinality(Bool), Dynamic and Variant holding a Bool are not in the test DISAGREE They reach executeImpl through the default implementations with type Bool, the path the test covers; each was checked by hand, master vs fix: 0 -> 1

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are terminal per finding.

Session id: cron:clickhouse-review-slot-8:20261118-132600

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @PedroTadim, could you review this? conv now converts a Bool first argument by its stored value 1/0 instead of the text true/false

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. SELECT conv(true, 10, 2) returns 0 on every run of an unpatched build (master 1d0af83cdc7 and the PR base); no settings involved.
b Root cause explained? conv stringifies a non-String first argument with castColumn(..., String) using its own type. FunctionCast sends a type with a custom serialization to the text route, so Bool (and SimpleAggregateFunction(f, Bool), which keeps that serialization) becomes true/false, and parseFromBase reads the letters as digits.
c Fix matches root cause? Yes. For UInt8 storage with a custom serialization, the existing cast gets DataTypeUInt8 as the source type, so the stored value is printed. No guard, no new mechanism.
d Test intent preserved / new tests added? New test 05829_conv_bool_argument: constant, column, Nullable(Bool), SimpleAggregateFunction(any, Bool), SimpleAggregateFunction(sumWithOverflow, Bool). No existing test changed.
e Both directions demonstrated? Yes. The test fails on the unpatched binary (every line but the NULL row differs) and passes with the fix, under clickhouse local and under tests/clickhouse-test; 50/50 with random settings. Build IDs differ.
f Fix is general across code paths? Yes. conv is the only function in src/Functions that stringifies a number to re-parse its digits; the other castColumn(..., String) callers compare or concatenate text, where true is correct.
g Fix generalizes across inputs (params/datatypes/wrappers)? Yes. Checked constant, column, Nullable(Bool), LowCardinality(Bool), Dynamic, Variant, SimpleAggregateFunction over any/sumWithOverflow/groupBitOr, and a Bool storing 2. UInt8, Float32/64, FixedString and String give identical output before and after.
h Backward compatible? (maintainer-approved exception only) Yes. No setting or format change; the old output was wrong. A Bool storing a raw value other than 0/1 now converts as that value, like toUInt8; stated in the description.
i Invariants and contracts preserved? Yes. The retype only applies to UInt8 storage, so the column is a ColumnUInt8 (or a constant of one) matching DataTypeUInt8; the result type and row count are unchanged.

Session id: cron:clickhouse-impl-slot-40:20261118-130900

@clickhouse-gh

clickhouse-gh Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cb83031]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) FAIL
05829_autopr_skip_index_on_read_in_subquery FAIL cidb IGNORED
05829_autopr_skip_index_on_read_in_subquery FAIL cidb IGNORED
05628_autopr_transplant_repeated_table_occurrences FAIL cidb IGNORED
05829_autopr_skip_index_on_read_in_subquery FAIL cidb IGNORED
05034_lazy_materialization_column_function_set_capture NOT_FAILED cidb IGNORED
04353_text_index_explicit_tokenizer_argument NOT_FAILED cidb IGNORED

AI Review

Summary

conv now converts Bool arguments by their stored values and finite Float32/Float64 arguments by the digits of their integer parts, rejecting non-finite values while preserving NULL propagation. Reviewed the current code, full diff, and all prior discussion for head cb830319232ff2db0f93500d9b272e9b7062b474. The previous NULL propagation blocker is fixed; no remaining findings. Both new regression tests and the existing conv tests pass in the current-head Fast test report.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default can be tested Allows running workflows for external contributors comp-regular-function Regular scalar functions: string processing, data conversion, arithmetic, math, comparison, condi... labels Nov 18, 2026
clickhouse-gh[bot]
clickhouse-gh Bot previously approved these changes Nov 18, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit cb830319232ff2db0f93500d9b272e9b7062b474 was not compared: the CI logs cluster did not answer (the endpoint never became ready: the readiness probe timed out: HTTPSConnectionPool(host='t6h0zvqlg…).

See the job log for details.

@PedroTadim PedroTadim self-assigned this Nov 18, 2026
A float is printed in exponent form or as `nan`/`inf`, and `conv` read that text: `conv(1e21, 10, 10)`
returned 1, `conv(1e21, 16, 10)` 7713, `conv(1e-7, 16, 10)` 30 and `conv(nan, 36, 10)` 30191. Now a
`Float32` or `Float64` argument converts as the digits of its integer part, the same as that number written
as a string (`1e21` overflows like '1000000000000000000000'), and a non-finite one throws `BAD_ARGUMENTS`.
A float printed without an exponent converts as before.

PR: ClickHouse#132662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PedroTadim
PedroTadim enabled auto-merge November 18, 2026 19:55
@PedroTadim PedroTadim changed the title Fix conv reading a Bool argument as the text true/false Fix conv reading a Bool or a float argument by its text Nov 18, 2026
Comment thread src/Functions/conv.cpp Resolved
@clickhouse-gh
clickhouse-gh Bot dismissed their stale review November 18, 2026 20:13

AI review of a later commit does not approve the PR, see the AI Review comment.

`FunctionConv` inherited `canBeExecutedOnDefaultArguments = true`, so the default implementation for
`Nullable` arguments passed the nested values of NULL rows to `executeImpl`. Since a non-finite float now
throws, `conv(nullIf(x, inf), 10, 10)` and `conv(if(isNaN(x), NULL, x), 10, 10)` failed with
`BAD_ARGUMENTS` instead of returning NULL for those rows, as did a non-finite number on a row with a NULL
base. Rows with a NULL argument are now skipped before execution. Non-NULL `nan` and `inf` still throw.

The override is byte-identical to the one ClickHouse#122356 added on master, so the two merge cleanly.

PR: ClickHouse#132662

Co-Authored-By: Claude Opus 5.5 <[email protected]>
auto-merge was automatically disabled November 19, 2026 08:53

Head branch was pushed to by a user without write access

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai, please investigate the CI failures in this PR (commit cb83031) and fix them, or link existing fixes.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=132662&sha=cb830319232ff2db0f93500d9b272e9b7062b474&name_0=PR

Failures without a known issue:

  • 05829_autopr_skip_index_on_read_in_subquery in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)
  • 05829_autopr_skip_index_on_read_in_subquery in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)
  • 05628_autopr_transplant_repeated_table_occurrences in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)
  • 05829_autopr_skip_index_on_read_in_subquery in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)
  • 05034_lazy_materialization_column_function_set_capture in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)
  • 04353_text_index_explicit_tokenizer_argument in Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) (history)

@PedroTadim
PedroTadim added this pull request to the merge queue Nov 19, 2026
@PedroTadim

Copy link
Copy Markdown
Member

The CI failure is unrelated

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - cb83031

Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
whose fixing-PR link will be posted here when it opens. Only CH Inc sync is exempt.

Check / test Reason Owner / fixing PR
Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) / 05628_autopr_transplant_repeated_table_occurrences not from this PR (it changes only conv and its tests): the randomizer drew query_plan_merge_filters = 0 (the runner's own diagnosis on this run), so automatic parallel replicas cannot match the plan-based replicas plan to the single-node plan (#131450). Same red on master (master report) and on 5 other PRs #132876 (mine, open)
Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel) / 05829_autopr_skip_index_on_read_in_subquery not from this PR (its own new test is 05829_conv_bool_argument, a different file): a deterministic red of this test under the plan-based parallel replicas job: automatic parallel replicas collects no statistics for its queries there (#131450). Same red on 14 master commits since 2026-11-19 00:41Z (master report) and on 87 other PRs. The fix merged at 11:58Z, after this run started #132867 (mine, merged)
PR praktika rollup of the rows above #132876 (mine, open), #132867 (mine, merged)

CH Inc sync is green.

Session id: cron:our-pr-ci-monitor:20261119-120019

Merged via the queue into ClickHouse:master with commit c662982 Nov 19, 2026
381 of 384 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 19, 2026
AbinMadathil07 added a commit to AbinMadathil07/ClickHouse that referenced this pull request Nov 20, 2026
* Keep the dictionary and bloom filter cases of five more Parquet tests live

These tests compare values only, so they kept passing when a random
setting removed the encoding or the index their case is about:

- 05406: a random `output_format_parquet_max_dictionary_size` of 0, 1
  or 1024 writes the dictionary round trip without a dictionary, and
  `output_format_parquet_use_alp_encoding = 1` writes float columns
  without one at any size, so the case that the dictionary keeps zero,
  negative zero and NaNs with different payloads apart tested nothing.
  Bound the dictionary size to at least 1 MiB and pin ALP off.
- 04646: the two cases of the exact dictionary filter need a
  dictionary page and the dictionary pruning pass, which a high
  watermark of 1 byte or 1 MiB skips. Bound both, as in 05055.
- 02735: 1M distinct values must grow the dictionary past its 1 MiB
  limit. With 0 no dictionary is tried, and with 1 or 1024 the writer
  drops it within the first two batches, so bound it to at least 1 MiB.
- 04097: the bloom filter prefetch regression needs a bloom filter
  written with the default bits per value and read with push-down.
- 04545: it also covers the page index path, which needs a page index.

The other Parquet tests either set these settings on their writes and
reads, assert the encodings, the bloom filters or the pruning, or do
not depend on them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address review: release only own bucket locks, detect empty batches independently of commit limits

With `parallel_inserts` each streaming task has its own processor and commits independently,
but `FileIterator::releaseFinishedBuckets` released the finished bucket holders of all processors.
A holder is finished when its source reaches the end, before the insert of that source completes,
so a commit of one task could release the bucket lock of another task whose insert was still running,
letting another replica take the bucket and process later files before the first insert failed.
Now `releaseFinishedBuckets` takes the processors of the batch which has just been committed.

`ProcessingProgress::processed_files` is counted only when `max_processed_files_before_commit` is set,
so with that limit disabled and a row or byte limit enabled, a batch which processed files looked empty:
the consumption cycle ended after every batch and the backlog was drained one batch per poll.
Now a separate `acquired_files` counter, maintained regardless of the commit limits, is used to detect
empty batches, to guard the reset of the batch size override, and as the size of a failed batch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Document the musl Rust target in the build guide

The default Linux x86_64 and aarch64 build links against musl now, and
`contrib/corrosion-cmake` selects the matching `*-unknown-linux-musl`
Rust target. `rustup` installs only the `*-unknown-linux-gnu` target, so
following the guide made `cmake` fail with
`Target x86_64-unknown-linux-musl is not installed for toolchain`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* GPU aggregation: remove `GPUAggregatingStep`, one `canAggregateOnDevice`, fixes of the AI review

- No `GPUAggregatingStep` in `src/Processors/QueryPlan` in this pull request.
- `canAggregateOnDevice` replaces `canReduceOnDevice`, `canGroupByOnDevice`, `canGroupByReduceOnDevice` and their `OrThrow` variants.
- `streaming_groupby` is closed into parts before a group could count past a `cudf::size_type`.
- No `avg` of `Float32`, which cuDF sums in `Float32`; no `min` or `max` of floats, as cuDF does not skip a `NaN` like ClickHouse.
- Exceptions of cuDF, rmm and libstdc++ are never destroyed (`keepCurrentException`): their base destructors bind to those of libc++.
- `ColumnUploadPipe::takeDeviceColumn` makes the next buffer in place, as the buffers have no assignment.

Related: ClickHouse#132443

* GPU aggregation: no gtest in this pull request

Related: ClickHouse#132443

* Bump `musl` to fix `AI_ADDRCONFIG` lookups on loopback-only hosts

Fork commits `f255b5c8` and `ff1ab367` gave `getaddrinfo` glibc's
`AI_ADDRCONFIG` semantics. On a host with no non-loopback address, they
dropped both address families and returned `EAI_NODATA` for every name.
`DNSResolver` always passes `AI_ADDRCONFIG`, so `clickhouse-client`
could not resolve `localhost` under `docker run --network none`,
`unshare -n` or systemd `PrivateNetwork=yes`. As in glibc, an
`AF_UNSPEC` lookup is now not narrowed when neither family is
configured.

The bump also brings in ClickHouse/musl#20 (symbol sizes for asm
functions).

ClickHouse/musl#21

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fix the `contrib/llvm-project` pin to the real tip of `ClickHouse/release-23.x`

The merge of master pinned `55541575edec5a8d4bb94faf4a66e30d8b4e7a66`, which
does not exist: only the 12-character prefix matches the real merge commit of
ClickHouse/llvm-project#161. `Config Workflow` failed
to fetch it:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=132795&sha=b50187317c6de5b87b22060d147f749bc4b35535&name_0=PR&name_1=Config%20Workflow

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Docs: list adbcBridge under Go, Rust, Java and C# in the third-party client libraries

* GPU aggregation: far fewer comments, one `catch` in `guarded`, no slices in `streaming_groupby`

- `guarded` catches once and keeps the exception of the device libraries from being destroyed in one line; the messages are read by `messageOfDeviceException`.
- `StreamingPartials` takes a batch as it is, and closes before `streaming_groupby` could count past a `cudf::size_type`.

Related: ClickHouse#132443

* Look up the `geoDistance` tables once per block

`distance` is called for every row, and since the tables are built on first use, every access to them went through the initialization guard of the local static in `impl`. `run` now takes the reference once and passes it to `distance`.

Address review: ClickHouse#126791 (comment) (thread on `src/Functions/greatCircleDistance.cpp`)

Co-Authored-By: Claude <[email protected]>

* Docs: describe the Protobuf framing ClickPipes expects with AWS Glue

* Use `VectorWithMemoryTracking` for the lazy Arrow type table

The style check that came with the merge of `master` forbids plain `std::vector` in `src/Processors/Formats`.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126791&sha=46136c021aceb2c4ed4368a0a1a9f3ba214be6a8&name_0=PR&name_1=Style%20check
PR: ClickHouse#126791

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Mark the `geoDistance` table lookups `[[nodiscard]]`

`clang-tidy` asks for it (`modernize-use-nodiscard`) since they became `const` members.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126791&sha=384918398089744c9929f936ac283fbf88622246&name_0=PR&name_1=Build%20%28arm_tidy%2C%202%2F4%29
PR: ClickHouse#126791

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Let gdb pass the `system.stack_trace` signal of the musl server in fuzzer jobs

The gdb script took the number of `SIGRTMIN` from the shell of the fuzzer
image, which is linked with glibc: 34. The server is a static musl binary since
ClickHouse#109239, and its `SIGRTMIN` is 35,
so gdb stopped the server on the first read of `system.stack_trace`, dumped
all threads and detached. Handle both numbers.

Co-Authored-By: Claude <[email protected]>

* Pin 05829 to query-based parallel replicas

`Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel)`
sets `parallel_replicas_plan_based = 1` in the server profile. The test pins every
other parallel-replicas setting, so in that job only its implementation changes:
plan-based parallel replicas cannot match the shipped plan to the single-node plan
(`Cannot find step with matching hash ... in single-node plan`; the local plan has
one `Expression` under `Aggregating` where the single-node plan has two), so the
first run collects no statistics and the second never switches to the plan with
parallel replicas: `05829_apply 0` in every master run of the job.

Pin query-based parallel replicas, as 91d6019 did for 05175 (same class,
ClickHouse#131450), so the test keeps
checking the set transplant of ClickHouse#132659 in that job too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Update PGO+BOLT toolchain to 51fdb0b

* Adapt new code from `master` to the removed `CPUFlagsCache` and the `STACK_TRACE_SERVICE_SIGNAL` macro

`gtest_memchr_strlen_page_boundary.cpp` used `CPUFlagsCache`, which this branch removed; it calls the `have*` functions instead, which is all `CPUFlagsCache` did (once, in a static initializer).

`clickhouse_fuzzer.cpp` qualified `STACK_TRACE_SERVICE_SIGNAL` with `DB::`, which does not work now that it is a macro.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126791&sha=876eaabafb0dc84ddaae5134998fb9d140634297&name_0=PR&name_1=Build%20%28amd_debug%29
PR: ClickHouse#126791

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Run the EXPLAIN checks of 05137_join_fixed_string_zero_bytes_runtime_filter without parallel replicas

Under plan-based parallel replicas, ReadFromParallelReplicasStep sets its
step description to a multi-line dump of the shipped plan fragment
(header and description, no actions), truncated at
query_plan_max_step_description_length = 500, and EXPLAIN prints every
line of it as a row. The fragment contains the build side's
BuildRuntimeFilter step. With enable_parallel_blocks_marshalling = 1 the
fragment's top BlocksMarshalling step pushes that line past the cut; with
0, which the runner draws in about 5% of runs, it fits, and the test's
LIKE filter matches one row more than the reference.

The EXPLAIN checks assert the single-node plan shape, so run only them
with enable_parallel_replicas = 0 in their own SETTINGS, as ClickHouse#128527 does.
The result queries keep whatever the job sets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin the Top-K limit in 05100_autopr_gate_lazy_read

`clickhouse-test` randomizes `query_plan_max_limit_for_top_k_optimization`
over [0, 1, 10, 100, 1000, 100000]. At 0 (no limit) or 100000, Top-K takes
the test's `ORDER BY ord LIMIT 10000` and adds `__topKFilter(ord)` to the
read's PREWHERE. Plan-based parallel replicas keeps such a read local
(`mergeTreeReadCanBeShipped`), so automatic parallel replicas finds no read
on the other replicas, skips the query and collects no statistics, and the
`05100_lazy_large_scan` row turns from 1 to 0 in
`Stateless tests (arm_binary, ParallelReplicas, plan-based, s3 storage, parallel)`.

Pin the limit to its default, as 801dfec did for 05055. The product
limitation is ClickHouse#131858.

Locally, with `parallel_replicas_plan_based=1` and the limit at 0 or 100000:
5/5 FAIL before, 5/5 OK after, 5/5 FAIL again with only the new `SET`
removed. Fully randomized plan-based runs: 6/50 FAIL before, 50/50 OK after.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin 05628 and 05043 to query-based parallel replicas

Both tests failed in `Stateless tests (arm_binary, ParallelReplicas, plan-based,
s3 storage, parallel)`, the job ClickHouse#128413 added, whenever the randomizer drew
`query_plan_merge_filters = 0` (05628) or `query_plan_remove_unused_columns = 0`
(05043), each about 5% of runs. With `parallel_replicas_plan_based = 1`,
automatic parallel replicas then cannot match the probe plan to the single-node
plan (`Cannot find step with matching hash ... in single-node plan`,
`AutoParallelReplicasPlansNotComparable = 1`) and returns before the cost model
and before collecting statistics, so 05628's "declined after the cost model"
check and 05043's "still a candidate" check read 0. That is the open
plan-based gap ClickHouse#131450.

The tests are about query-based automatic parallel replicas, so pin that
implementation, the same way 91d6019 pinned 05175 for ClickHouse#131450. The pin is
a no-op in every job where plan-based parallel replicas is already off.

Related: ClickHouse#131450

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Retry a failed notary submission request and wait longer in Sign macOS binary

`notarize` ran `rcodesign notary-submit --wait --max-wait-seconds 1800` once.
rcodesign does not retry the create-submission POST, so one Apple gateway 502
on it failed the job, and its wait gave up at 1800 s although the job has a
3600 s timeout and the other steps take at most 39 s. Both leave the release
commit without a signed `clickhouse-macos.zip` until the job is re-run by hand.

Retry the command up to 5 times, but only when stderr carries the
`POST https://appstoreconnect.apple.com/notary/v2/submissions` line. rcodesign
prints it only in the error of a failed create-submission request (the request
log line is debug-level), i.e. before the upload and before any wait, so a retry
costs about 30 s at most and never starts a second wait. A failed poll, a failed
upload, the wait limit and an Invalid verdict print no such line and stay
single-attempt. Matching on the 5xx text instead would also catch a 5xx on a
poll late in the wait and resubmit, which does not fit the job timeout.

Raise the wait limit to 3000 s: 39 s of earlier steps + 30 s of retries + 3000 s
+ upload and one poll is about 3115 s, under the 3600 s timeout, so the
`finally` that removes the notary key from the reused workspace still runs.

Failures:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=26.10&sha=8f7ca0110849149ecd80a33dc2691ad0e0bb36c1&name_0=ReleaseBranchCI&name_1=Sign%20macOS%20binary%20%28amd_darwin%29
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=26.10&sha=c2ea85cb077899bcc31505a53bb11b9dc34e803d&name_0=ReleaseBranchCI&name_1=Sign%20macOS%20binary%20%28amd_darwin%29
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=26.10&sha=53e154ba93c524095e4cfb9957fa35e206086684&name_0=ReleaseBranchCI&name_1=Sign%20macOS%20binary%20%28amd_darwin%29

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Docs: sync Cloud API reference from the OpenAPI spec

* Docs: regenerate reference documentation from source

* Fix the number of read streams in test `05830_distributed_plan_squashing_before_exchange`

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* Return NULL from `conv` for a non-finite float masked by NULL

`FunctionConv` inherited `canBeExecutedOnDefaultArguments = true`, so the default implementation for
`Nullable` arguments passed the nested values of NULL rows to `executeImpl`. Since a non-finite float now
throws, `conv(nullIf(x, inf), 10, 10)` and `conv(if(isNaN(x), NULL, x), 10, 10)` failed with
`BAD_ARGUMENTS` instead of returning NULL for those rows, as did a non-finite number on a row with a NULL
base. Rows with a NULL argument are now skipped before execution. Non-NULL `nan` and `inf` still throw.

The override is byte-identical to the one ClickHouse#122356 added on master, so the two merge cleanly.

PR: ClickHouse#132662

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fix the HTTP interface link in the `Protobuf` format documentation

ClickHouse#122644 moved the HTTP interface page from `/concepts/features/interfaces/http`
to `/concepts/features/connect-to-clickhouse/protocols/http` and updated the
`#insert-protobuf` link in the generated `docs/reference/formats/Protobuf/Protobuf.mdx`,
but not in its source, the `Protobuf` format documentation here. The nightly
docs regeneration (ClickHouse#132899) therefore restores the old path, and the offline
link check (`lychee_check.py --mode links`) cannot resolve the fragment through
the redirect, because the redirect's destination is a directory `index.mdx`:

    [./reference/formats/Protobuf/Protobuf.mdx]:
    [ERROR] concepts/features/interfaces/http#insert-protobuf (at 347:27) | Cannot find fragment

Make the same change in the source, as ClickHouse#122644 did for the Prometheus links in
`StorageTimeSeries.cpp`. The regenerated `Protobuf.mdx` is then identical to the
one on master. Validated by regenerating the docs with `autogenerate_docs.py
--write` from a master binary with and without the change and running the
link check: 1 error (the one above) without, 0 with.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* GPU aggregation: the `avg` of unsigned integers divides a `UInt64` sum; `absorbPart` keeps the originals until the copies are done on an exception too

Related: ClickHouse#132443

* GPU aggregation: `CudfGroupBy.cu` rewritten to be readable

The same algorithm: `Partials`, `PartitionedPartials`, `StreamingPartials`, `GroupBy` with a `Strategy` chosen by the first
batch, the filter in `applyFilter`. No checks that `viewOf` and the lane already make, no branch for keys with nulls of an
undecided batch, which are compacted.

Related: ClickHouse#132443

* GPU aggregation: `waitFor` in `GPUTypes.cuh`, next to `checkCuda`, as it is not of `CudfGroupBy`

Related: ClickHouse#132443

* GPU aggregation: every entry point of `CudfGroupBy` and `CudfReduction` is `guarded`

What rmm, cuDF and libstdc++ throw outside of the calls to cuDF, as the growth of a buffer or a copy of a column, does not leave
the island either: an exception of libstdc++ is not safe to format by ClickHouse.

Related: ClickHouse#132443

* GPU aggregation: `CudfGroupBy` is a class, not an interface of one implementation; masks are `DeviceBitmask`

- `CudfGroupBy` holds a `cudf_group_by::GroupBy` as `CudfReduction` holds its state, and its methods are `guarded` calls of it;
  no `createCudfGroupBy`, no `dynamic_cast` in `absorbPart`.
- The masks of the rows a filter keeps are a `DeviceBitmask` of their words and rows, not a pointer.

Related: ClickHouse#132443

* Inline the liveness check of window aggregate states

`checkCreated` was not inlined, so every row paid for a call with a full frame. Inline the test and keep only the throw out of line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Docs: update Cloud API rate limits and describe 429 responses

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* GPU aggregation: the stream of a `HAVING` is drained on an exception too, as the caller holds its kernel only for the call

Related: ClickHouse#132443

* Remove the files left behind by `02366_cancel_write_into_file`

The test inserts into 20 files in `user_files` and kills the inserts, but
never removes the files. The targeted check of this PR repeats the test 33
times with a new database each time: its killed inserts wrote 58 GiB of files
that stayed on disk, and the runner ran out of space (`errno: 28`), failing
unrelated tests.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131078&sha=latest&name_0=PR
ClickHouse#131078

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Randomise adaptive compression in stateless/stress tests

* AI review: require an exact verdict line and parse it leniently

The review prompt now asks for an exact `Status: <verdict>` line. `_review_approves` falls back to the whole `Final Verdict` section when that line is missing, so a bare `✅ Approve` no longer dismisses the approval.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin two UNIQUE KEY tests to query-based parallel replicas

With `parallel_replicas_plan_based = 1`, a read of a `UNIQUE KEY` table is
shipped and `ReadFromMergeTree::serialize` throws `SUPPORT_IS_DISABLED`
(ClickHouse#128534). `04161_unique_key_insert_duplicate` and
`05493_unique_key_disk_without_append` read such a table only through
`count()`, so in the plan-based job they fail only when the runner draws
`optimize_trivial_count_query = 0` (5% of runs) and pass otherwise.

The plan-based blacklist is checked strictly (the job does not run with
`--autopr`), so listing them would report `NOT_FAILED` on most runs, as it
did for 04161 on ClickHouse#128413. Pin them to query-based parallel replicas
instead, the way 91d6019 did for 05175. ClickHouse#128534 stays open for
plan-based support of `UNIQUE KEY` reads.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=6ade2c8d6b94ea04a0c7b0259825529aceac0fd8&name_0=MasterCI&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20plan-based%2C%20s3%20storage%2C%20parallel%29

Related: ClickHouse#128534

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Drop unneeded no-parallel tags from seven stateless tests

* Update version_date.tsv and changelogs after v26.10.7.24-stable

* Disable Keeper fault injection in `05770_streaming_queries_replicated_cursors`

An injected Keeper fault after a block number is allocated makes the insert
retry with a new block number, so the block numbers and the cursors in the
test become nondeterministic.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131817&sha=latest&name_0=PR&name_1=Fast%20test
ClickHouse#131817

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Disable adaptive codecs where they're not needed

* Docs: restore `Language clients` navigation

Remove the duplicate `integrations/language-clients/index` entry from the Concepts navigation. Mintlify then selects the dedicated `Language clients` navigation for the page.

Related: ClickHouse#124471

* Pack tuples of fixed-size values into the keys of the radix partitioned `uniqExact`

A tuple whose elements have a fixed size of 1, 2, 4, 8 or 16 bytes and fit into 16 bytes, `Nullable` ones
included, is packed into one key as `packFixedBatch` packs the keys of `GROUP BY`, instead of being hashed
with `SipHash` per row. A `Nullable` element is its null flag, normalized to 0 or 1, and its value, zero for
NULL. Values of 16 bytes are routed by `routeValues`, without branches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Hash the other values of the radix partitioned `uniqExact` several rows at a time

The values that are hashed with `updateHashWithValue` (tuples of strings, `Nullable` and wider values) get
the same `hash128` from `HashedJoinKey`, which hashes many rows at once with the vectorized `SipHash`. The
rows that repeat the previous one are skipped before they are hashed (`HashedJoinKey::markRepeatedRows`),
and the types it cannot hash in batches keep the per-row path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Update version_date.tsv and changelogs after v26.8.41.14-lts

* Keep each `-iquote` paired with its directory when building musl

CMake de-duplicates compile options, so only the first "-iquote" was kept
and the other two directories became stray input files. Use `SHELL:` to
keep each flag and path together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Add PromQL tests flaky with plan-based parallel replicas to the plan-based blacklist

A plan-based parallel replica cannot find the tags collected by
`timeSeriesStoreTags`, so `timeSeriesIdToGroup` throws `Unknown identifier`
when a remote replica reads part of the table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Push `empty` and `notEmpty` of a `String` column down into the Vortex scan

`optimize_empty_string_comparisons` rewrites `s = ''` and `s != ''` into
`empty(s)` and `notEmpty(s)` before the filter reaches `ReadFromFile`, and
`VortexExpressionConverter` had no handler for them, so the conjunct was dropped:
the scan decoded and converted every row of the column, and only ClickHouse
filtered it. Now they become `s = ''` and `s != ''` in the scan, which is exact in
any position; arrays, maps and UUIDs stay with ClickHouse.

ClickBench on one `hits.vortex`, 36 cores, hot run: Q10 228 -> 123 ms,
Q12 331 -> 242 ms, Q24 368 -> 212 ms, Q31 499 -> 393 ms.

https://benchmark.clickhouse.com/#system=-&type=-&machine=-ca4e|6t|ae-|ca2|6ax|cgle|6ale|3al&cluster_size=-&opensource=-&hardware=+c&tuned=+n&storage=+vr&category=-&metric=combined&best=no&queries=-

* Sync `src/Core/ServerSettings.cpp` from private repository

* Do not pack the `LowCardinality` elements of a tuple in the radix partitioned `uniqExact`

A `LowCardinality` type forwards the size of its values, but its column holds indexes into a dictionary,
so packing it read the indexes as values and counted wrong. Such tuples are hashed. The test also covers
runs of equal rows longer than a batch of hashing, with NULLs and floats.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Allocate the buffers for the rows to skip exactly

`resize_fill` rounds the allocation up to a power of two, which doubles a buffer of 65536 rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Add tuples to the performance test of the radix partitioned `uniqExact`

Packed fixed-size tuples, `Nullable` or not, and tuples hashed several rows at a time, with strings or wider
than 16 bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fix `HTTPResponseParser.MatchesPocoForEverySplit` for `MalformedMessageException`

The test compared the class of the exception with the one of the legacy
`HTTPResponse::read`, which throws `MessageException` where the parser now
throws its subclass `MalformedMessageException`. Compare them as the same
class, and check the distinction between a malformed and a truncated response
in a new test `MalformedIsNotTruncated`.

Also update the comments after the merge of master, where a header that exceeds
a limit throws `HTTPHeaderLimitException` and is reported as `LIMIT_EXCEEDED`.

Address review: ClickHouse#132117 (comment)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Update version_date.tsv and changelogs after v26.9.33.10-stable

* Address review: skip all fresh-`CREATE` validations of `DataLakeCatalog` when replaying stored metadata

The `auth_header` check, the `allow_database_*` gates, and the strict
settings parsing in `loadFromQuery` ran before the recovery predicate, so a
previously valid definition replayed as `CREATE` with
`isRecoveryFromStoredMetadata` could still throw and block startup. Compute
the predicate first and treat such a replay like `ATTACH` everywhere.
A forbidden header is still never sent: `RestCatalog::validateAuthHeaders`
rejects it before the first request.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Add a test for obsolete access types and their group membership

`REVOKE SYSTEM` and `REVOKE ALL` must also remove a grant of the obsolete
`SYSTEM RELOAD MODEL` privilege.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin blocks marshalling for the EXPLAIN checks of 05137, blacklist it for plan-based

The checks pass with query-based parallel replicas, so keep parallel replicas on.

ClickHouse#132869 (comment)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Docs: update clickhousectl pages for clickhousectl 0.6.0

Use the new `cloud clickhouse` and `local clickhouse` command names, fix
statements that changed in 0.6.0 (project-root discovery, Query API keys,
Postgres no longer Beta, organization errors, exit codes) and cover the
new commands and flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Address review: reject repeated grouping-set keys and the memory-bound grouping-sets merge

A deserialized `MergingAggregated` step with grouping sets now refuses an input in which a key occurs more
than once (the output header and `makeCreatingMissingKeysForGroupingSetDAG` take keys by name), and the
memory-bound merge with grouping sets, which threw a `LOGICAL_ERROR` in `transformPipeline`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Revert "Detect MemorySanitizer and UndefinedBehaviorSanitizer reports in integration tests"

* Fix nightly changelog job hanging in `changelog.py`'s `git fetch --tags`

The `Prepare changelog` job of the `Nightly` workflow has failed every night
since 2026-11-03, so ClickHouse#126190
stopped receiving updates after 2026-11-02. The generation step is killed by
`GENERATE_TIMEOUT_SEC` (40 minutes) while `changelog.py` sits in
`Fetching all tags`.

That fetch runs in the `clickhouse/style-test` container. `actions/checkout`
keeps the credentials in a separate file included via
`includeIf.gitdir:<host path>/.git`, which does not match `/wd/.git` in the
container, so the fetch is unauthenticated and uses the default refspec. It
was already 16 minutes on 2026-11-02 and is redundant: `prepare_repo` has
fetched the master history and the tags just before.

Add `--no-fetch` to `changelog.py` (it refuses a shallow repository instead of
fetching) and use it in the nightly job.

https://github.com/ClickHouse/ClickHouse/actions/runs/44444590723
https://github.com/ClickHouse/ClickHouse/actions/runs/41566219634

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin `enable_adaptive_codec_selection = 0` in `05293_autopr_statistics_plan_based`

The cost model works off estimated compressed bytes, and adaptive codec selection,
now randomized in stateless tests, changes them, so the second run stops adopting
parallel replicas. The sibling `05262` was already pinned the same way.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129544&sha=10b2b5fe60611b692e06c8babb025f3cc4dbebca&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29
PR: ClickHouse#129544

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 52da073)

* Up-sync critical files from ClickHouse-private master 5dfd845349c2b0a11b24b335ea1a0ac0006b6eed

* Docs: regenerate `Protobuf` HTTP interface link

Regenerate the `Protobuf` format page after the source documentation update in ClickHouse#132918.

ClickHouse#132899

* Pin `parallel_replicas_plan_based = 0` for the reads without the privilege in `02346`

ClickHouse#133090
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=115581&sha=2b81f2df5a513b9465dd994ca03e16aea6db2158&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20plan-based%2C%20s3%20storage%2C%20parallel%29
ClickHouse#115581

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin the dictionary size in 05829_parquet_array_over_many_pages

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Up-sync critical files from ClickHouse-private master d5e43de9252801cefdbd7fbc02460438c2815b66

* Update autogenerated version to 26.12.1.1 and contributors

* Sync MergeTreeSettings.h from private: declare isSystemDatabaseForDisks

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Document the PARTITION BY clause of INSERT INTO FUNCTION

The parser accepts an optional `PARTITION BY expr` after the table function of
`INSERT INTO [TABLE] FUNCTION`, before the column list, and the file and object
storage table functions use it for partitioned writes, but the `INSERT INTO`
reference page never mentioned it.

Add the clause to the syntax of the "Inserting using a Table Function" and
`RETURNING` sections and to the structured syntax, and add a short
"Partitioned writes" subsection with a runnable `file()` example that links to
the per-function partitioned-write sections.

The page docs/reference/statements/insert-into.mdx is generated from
ParserInsertQuery::getDocumentation() by the nightly docs regeneration, so only
the source registration changes here.

Closes: ClickHouse#132930

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Mark `JoinStep::clone` `[[nodiscard]]` to satisfy `clang-tidy`

The `arm_tidy` build failed with `modernize-use-nodiscard`:
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=130374&sha=317ff1c910b87d28e30b261588ee6636cceb871a&name_0=PR&name_1=Build%20%28arm_tidy%2C%201%2F4%29
PR: ClickHouse#130374

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin the randomized Parquet settings in 05833_parquet_prewhere_edge_cases

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Pin the randomized Parquet settings in 05835_parquet_nullable_tuple_read_memory

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Make test_status_counts fail with the reload's own error

`metrics_during_load` ran `SYSTEM RELOAD DICTIONARY d_slow` in a
`threading.Thread` and only joined it. A thread's exception reaches only
`threading.excepthook`, so a failed reload before the poll saw the
in-progress status was retried as a timing miss (ending in the misleading
"the metrics were never computed while d_slow was LOADING"), and in the
LOADED_AND_RELOADING check a failed reload kept the dictionary LOADED, so
its sample was accepted and the test passed with only a thread warning.

Run the reload through `ThreadPoolExecutor.submit` and call
`future.result()` on both exits of the helper, the early return and after
the sample, so a failed reload raises its own error before a sample is
retried or accepted. `result()` waits like `join()`, and the executor's
`shutdown(wait=True)` still waits for the reload when the main thread
raises. Retries, assertions and the `d_fail` part are unchanged.

Follow-up to ClickHouse#132816, as suggested in
ClickHouse#132816 (comment)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Parse JSON documents in place in JSON functions instead of copying each row

* Use a per-database user name in `05836_obsolete_access_type_grants`

The test used a fixed user name, so concurrent runs in the flaky check
created, granted to, and dropped the same user, failing with `UNKNOWN_ROLE`.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123854&sha=6f09c63c7c931c9e0e02bedc03c8675a14f27dee&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29
ClickHouse#123854

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* WIP: support Array(Int8) and Array(UInt8) in the Quantized codec

Temporary commit, not built or tested yet.

- `ColumnsDescription`: accept `Int8`/`UInt8` elements, reject methods
  `int8` and `prefix` with format `int8` for them.
- `SerializationQuantizedVector`: read `Int8`/`UInt8` vectors; for
  `rabitq`/`turboquant`, `UInt8` elements are shifted by -128.
- Planner: accept integer reference literals and shift the reference
  vector the same way for `UInt8` columns.
- Docs updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Use the `rabitq`/`turboquant` codes for `L2Distance`, add tests for byte vectors

`rabitq` and `turboquant` estimate only the cosine distance. For an
`L2Distance` query, the shortlist is now ranked by the cosine estimate and
the result is rescored by the exact `L2Distance`, instead of falling back to
the exact scan. The returned distances are exact; the recall depends on how
much the vector norms vary.

Measured on 300k vectors of Dino10B (1024-d, `UInt8`, L2), 300 queries,
recall@10 against exact L2 at fetch multiplier 1/5/10/50:
`rabitq` 0.69/0.98/0.99/1.00, `turboquant` 0.74/0.99/1.00/1.00
(with the `UInt8` shift; without it `rabitq` gets 0.11/0.27/0.35/0.59).

Also fix a `-Wdouble-promotion` error in the `UInt8` shift of the reference
vector, and add test `02354_vector_search_quantize_codec_int8_uint8`.

Dataset: https://swannbessa.github.io/blog/dino10b/

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Shorten the comment on `QUANTIZED_CODEC_UINT8_SHIFT`

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fix `clang-tidy` in `gtest_join_step_clone`: do not ignore the `[[nodiscard]]` result of `clone`

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=130374&sha=8388bd749944f4f99fc8324968cb38dc32f2a462&name_0=PR&name_1=Build%20%28arm_tidy%2C%201%2F4%29
ClickHouse#130374

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Docs: regenerate reference documentation from source

* docs: sync upstream clickhouse-operator docs updates (v1alpha2 deprecations)

---------

Co-authored-by: Nikita Fomichev <[email protected]>
Co-authored-by: Groene AI <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Alexey Milovidov <[email protected]>
Co-authored-by: Nikolai Kochetov <[email protected]>
Co-authored-by: Konstantin Bogdanov <[email protected]>
Co-authored-by: Konstantin Vedernikov <[email protected]>
Co-authored-by: singhpratech <[email protected]>
Co-authored-by: Julia Kartseva <[email protected]>
Co-authored-by: Mark Dawson <[email protected]>
Co-authored-by: Konstantin Bogdanov <[email protected]>
Co-authored-by: Nihal Z. Miaji <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: robot-clickhouse <[email protected]>
Co-authored-by: Pedro Ferreira <[email protected]>
Co-authored-by: Alexander Gololobov <[email protected]>
Co-authored-by: Nikolai Ovchinnikov <[email protected]>
Co-authored-by: Matheus Nerone <[email protected]>
Co-authored-by: Igor Nikonov <[email protected]>
Co-authored-by: Raúl Marín <[email protected]>
Co-authored-by: Shaun Struwig <[email protected]>
Co-authored-by: Raúl Marín <[email protected]>
Co-authored-by: Murphy <[email protected]>
Co-authored-by: Alex Kalmakov <[email protected]>
Co-authored-by: Nikita Taranov <[email protected]>
Co-authored-by: rienath <[email protected]>
Co-authored-by: Kirill Kopienko <[email protected]>
Co-authored-by: Nikita Taranov <[email protected]>
Co-authored-by: Konstantin Vedernikov <[email protected]>
Co-authored-by: Antonio Andelic <[email protected]>
Co-authored-by: Yaroslav Briukhovetskyi <[email protected]>
Co-authored-by: Azat Khuzhin <[email protected]>
Co-authored-by: Pavel Kruglov <[email protected]>
Co-authored-by: Maksim Dergousov <[email protected]>
Co-authored-by: Nikolay Degterinsky <[email protected]>
Co-authored-by: Anton Popov <[email protected]>
Co-authored-by: Alexei Fedotov <[email protected]>
Co-authored-by: János Benjamin Antal <[email protected]>
Co-authored-by: AlexF <[email protected]>
Co-authored-by: Igor Nikonov <[email protected]>
Co-authored-by: Alasdair Brown <[email protected]>
Co-authored-by: Dominic Tran <[email protected]>
Co-authored-by: clickhouse-cloud-ci[bot] <333021140+clickhouse-cloud-ci[bot]@users.noreply.github.com>
Co-authored-by: Shaohua Wang <[email protected]>
Co-authored-by: Daniel Lemire <[email protected]>
Co-authored-by: Shankar Iyer <[email protected]>
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-regular-function Regular scalar functions: string processing, data conversion, arithmetic, math, comparison, condi... pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conv stringifies Bool to 'true'/'false' giving wrong results

3 participants