Skip to content

Explain why url rejects a pattern that s3 accepts - #115581

Merged
alexey-milovidov merged 66 commits into
masterfrom
fix-url-glob-too-many-addresses
Nov 22, 2026
Merged

alexey-milovidov merged 66 commits into
masterfrom
fix-url-glob-too-many-addresses

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

s3('https://clickhouse-public-datasets.s3.amazonaws.com/wikistat/original/pageviews-20200101-{0..10000}{0..10000}00.gz', LineAsString) works, while the very same pattern passed to url fails with

Code: 36. DB::Exception: Table function 'remote': first argument generates too many result addresses. (BAD_ARGUMENTS)

which names a table function the user did not call, does not say how many addresses were generated, does not say what the limit is, and does not say which setting controls it.

The behaviour itself is not a bug. Object storage compiles a pattern into a regular expression and matches it against the bucket listing, so an enormous key space costs nothing. HTTP has no listing at all, so for url a pattern is a generator of addresses rather than a filter over the files that exist, and every address a query reads has to be generated and requested - a query reading the whole direct product of two ranges of ten thousand elements cannot be served (since #115680 the addresses are generated lazily, so a query that stops early, e.g. under a LIMIT, is fine). What was wrong is that nothing in the error said so.

The message now reports the table function that was actually called, the number of addresses the pattern generates, the limit, the setting that raises it, and - for url - why s3 accepts the same pattern:

Code: 36. DB::Exception: Table function 'url': first argument generates too many result addresses: 100020001,
while at most 1000 are allowed (see the 'glob_expansion_max_elements' setting). Note that every address
generated by the pattern has to be read, because HTTP provides no way to list the existing files. Use 's3'
(or another object storage table function) if the pattern is meant to be matched against the list of
existing objects instead. (BAD_ARGUMENTS)

The name is the one the user actually typed: the same parser also serves ENGINE = URL, urlCluster, remoteSecure, the Remote / RemoteSecure table and database engines, the mysql / postgresql table functions, the MySQL / PostgreSQL / MaterializedPostgreSQL table and database engines and the MySQL dictionary source, and each of them now reports itself (Table engine 'URL', Table function 'urlCluster', Database engine 'MySQL', ...) instead of borrowing the name of whichever table function happens to share the code.

The recommended replacement is of the same kind as the surface that was invoked, so ENGINE = URL is pointed at S3 and urlCluster at s3Cluster rather than at the plain s3 table function.

The reported number is the cardinality of the whole first argument, not of the part that hit the limit: a separate cardinality pass multiplies the sizes of the factors and sums the alternatives without materializing anything, so {0..10000}{0..10000} reports 100020001. It runs only after a limit check has already failed, so accepted patterns are unaffected. When the product does not fit into size_t the count-free form of the message is used. The lazy RemoteDescriptionGenerator reports the same message when a reader asks past the limit.

A pattern may generate shards (,) and replicas (|) at the same time, e.g. example01-0{1,2}-{1|2}, and the two are expanded in separate stages. The limit used to be applied to each stage on its own, so this pattern passed with a limit of 3 although it generates 4 addresses, and the reported number covered one stage only. The limit now applies to the total, as the documentation of the settings has always said, on every surface that expands both stages (remote, the Remote database engine, url, ENGINE = URL and the HTTP index pages path), and the reported number is the cardinality of both stages together. For url, ENGINE = URL and urlCluster, which generate the shards lazily, the replicas of each shard are counted as it is generated, before the _path / _file filter (so shards the filter rejects count too), and the lazy expansion is kept. A mixed pattern that generated more addresses than the limit is therefore rejected now; the message says which setting to raise.

remote keeps its own setting name (table_function_remote_max_addresses) and does not get the object storage hint. The Cartesian product check is also made overflow-safe, and the documentation of url gained a section describing the difference from the object storage table functions (in the FunctionDocumentation of url, which is the source of the generated page).

Closes: #49234

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

When a glob pattern in the url table function expands to more addresses than allowed, the error message now names the url table function instead of remote, reports how many addresses the pattern generates and what the limit is, names the glob_expansion_max_elements setting that controls it, and explains that unlike s3, url cannot match a pattern against a listing.


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

Version info

  • Merged into: 26.12.1.216-master (included in 26.12 and later)

`s3('.../pageviews-20200101-{0..10000}{0..10000}00.gz')` works, while the very
same pattern passed to `url` fails with

    Table function 'remote': first argument generates too many result addresses

which names a table function the user did not call, does not say how many
addresses were generated, does not say what the limit is, and does not say
which setting controls it.

The behaviour itself is not a bug: object storage compiles a pattern into a
regular expression and matches it against the bucket listing, while HTTP has no
listing at all, so for `url` a pattern is a generator of addresses rather than a
filter over the files that exist. Every generated address is materialized, so a
direct product of two ranges of ten thousand elements cannot be served. What was
wrong is that nothing in the error said so.

Now the message reports the table function that was actually called, the number
of addresses the pattern generates, the limit, the setting that raises it, and -
for `url` - why `s3` accepts the same pattern:

    Table function 'url': first argument generates too many result addresses:
    10001, while at most 1000 are allowed (see the 'glob_expansion_max_elements'
    setting). Note that 'url' has to read every address generated by the
    pattern, because HTTP provides no way to list the existing files. Use 's3'
    (or another object storage table function) if the pattern is meant to be
    matched against the list of existing objects instead.

The Cartesian product check is also made overflow-safe, and the documentation of
`url` now describes the difference from the object storage table functions.

Closes: #49234
@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [41ff13d]

Summary: ✅


AI Review

Summary

Reviewed PR head 41ff13d6f773921a018e8200bd97c968626c6bae. The change improves address-expansion diagnostics across url, remote, and external database surfaces, applies combined shard/replica limits, and preserves loading of stored definitions. Prior findings are addressed, and no new actionable findings remain. Focused Fast test regressions pass on this head.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Aug 20, 2026
Comment thread src/Storages/StorageURL.cpp Resolved
Comment thread src/Common/parseRemoteDescription.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit 41ff13d6f773921a018e8200bd97c968626c6bae 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.

The over-limit message used to be attributed to whichever table function
happened to share `parseRemoteDescription`, which is how `url` came to report
`Table function 'remote'` in the first place. Fixing that for `url` alone left
the same defect for the other surfaces built on the same parser: `ENGINE = URL`
and `urlCluster` reported `Table function 'url'`, and the `MySQL` / `PostgreSQL`
table and database engines and the `MySQL` dictionary source still reported
`Table function 'remote'`.

`func_name` is therefore replaced by a `RemoteDescriptionCaller` carrying the
full descriptor of the surface (`Table function 'url'`, `Table engine 'URL'`,
`Database engine 'MySQL'`, ...), the setting that raises the limit, and whether
the object storage hint applies. The default reproduces the previous `remote`
wording exactly, and the descriptor is threaded through `StorageURL`,
`StorageURLCluster` and the external-database callers.

The cumulative failover-options check in the web object storage configuration
built its own, shorter message and so dropped the explanation of why `url`
rejects a pattern that `s3` accepts; it now goes through the same
`throwTooManyAddresses` helper as every other overflow path.

The documentation section is moved from the generated
`docs/reference/functions/table-functions/url.mdx` - which is inside an
`AUTOGENERATED` region, so the docs check rejected the direct edit - to its
source of truth, the `FunctionDocumentation` of `url` in
`src/TableFunctions/TableFunctionURL.cpp`.

The test covers the `URL` engine and `urlCluster` in addition to `url` and
`remote`.
Comment thread preprocessed_configs/config.xml Resolved
…eds the limit

The wildcard branch of `StorageWebConfiguration` hardcoded the `url` table function
caller, so an over-limit root expansion on `ENGINE = URL(...)` reported
`Table function 'url'`. Thread the caller descriptor through the configuration the
same way it is threaded through `StorageURL` and `StorageURLCluster`.
… asserted

Under the ParallelReplicas CI configuration the `url` table function is rewritten
into its cluster counterpart, which legitimately changes the surface named in the
`too many result addresses` message, so the first two queries of
`05023_url_glob_too_many_addresses` failed with `result differs with reference`:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115581&sha=9d5f222bdf68994074d13d5a1b09fa47669010c4&name_0=PR&name_1=Stateless%20tests%20%28amd_llvm_coverage%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
#115581
Comment thread src/Common/parseRemoteDescription.h Resolved
Comment thread src/Databases/DatabaseRemote.cpp Resolved
…o-many-addresses error

The `remote` family shares `parseRemoteFunctionArguments`, so an over-limit
addresses expression passed to `remoteSecure`, `ENGINE = Remote`,
`ENGINE = RemoteSecure` or the `RemoteSecure` database engine still reported
`Table function 'remote'`. Thread a `RemoteDescriptionCaller` through
`parseRemoteFunctionArguments` and derive the description from the invoked
surface (`remoteSecure` is registered with the internal name `remote`, so the
name alone cannot serve), and derive the `Database engine` description from
`secure` in `buildClusters`.

Addresses the review comments on #115581

Co-Authored-By: Claude Fable 5 <[email protected]>
Comment thread src/Storages/StorageURLCluster.cpp Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 32 queries analysed

no significant changes detected. K_source=6 K_base=30 flagged=0/65

clickbench

🟢 No significant changes

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: 5b7181ea-6e82-4daa-badb-4388d788e9e4
  • MIRAI run: a31ebf2c-67c2-4eed-b172-6ffca1f8a8cc
  • PR check IDs:
    • clickbench_446104_1791499837
    • clickbench_446110_1791499837
    • clickbench_446116_1791499838
    • tpch_adapted_1_official_446127_1791499837
    • tpch_adapted_1_official_446139_1791499837
    • tpch_adapted_1_official_446175_1791499837

…erence

The `urlCluster` caller label was only threaded through the initiator-side
disclosure paths. An explicit `urlCluster` query whose pattern overflows only
on the `|` failover split reached the `StorageURL` constructed for the
secondary query on a worker with the default caller and reported
`Table function 'url'` again, and the omitted-structure / omitted-format
schema-inference paths in `TableFunctionURL::getActualTableStructure` had the
same fallback.

`TableFunctionURL` now exposes a virtual `globCaller` that `urlCluster`
overrides, and both the secondary-query `StorageURL` construction and the
schema-inference calls pass it through. The new test
05030_url_cluster_glob_too_many_addresses covers the worker-side failover
split (which survives the initiator intact because tasks are only split by
`|` on the worker) and both schema-inference branches.
Comment thread src/Storages/StorageMySQL.cpp Resolved
Comment thread src/Storages/StoragePostgreSQL.cpp Resolved
The shared `StorageMySQL::getConfiguration` / `processNamedCollectionResult` and their
PostgreSQL counterparts hardcoded an argument label, so an over-limit address pattern reported
`MySQL address expression` / `PostgreSQL address expression` instead of the table function,
table engine or database engine the user actually invoked. Thread a `RemoteDescriptionCaller`
through these helpers from every entry point and cover the real surfaces with a test.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 @groeneai, investigate the failure: https://github.com/ClickHouse/ClickHouse/actions/runs/33239137447/job/99068591353 (Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6) on 3a6a1c096b6b) and provide a fix in a separate PR if it is reproducible. The job failed on Fail [OOM in dmesg] together with test_crash_log/test.py::test_crash_log_extra_fields[terminate_with_exception-trace_full], which is unrelated to this PR — it only changes the wording of the "too many result addresses" error. If a fix is already in progress, please link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

Fail [OOM in dmesg] is not a test. ci/jobs/integration_test_job.py emits that row (OOM_IN_DMESG_TEST_NAME) when the runner's dmesg records a kernel OOM kill in a buffer that was cleared for the run, so it names an infrastructure kill rather than a reproduction.

The proximate event is a SIGKILL of the test command, after 13.5 minutes with no test progress on any of the three xdist workers:

[2026-08-29 08:05:43] [gw0] [ 70%] PASSED test_crash_log/test.py::test_crash_log_extra_fields[terminate_with_std_exception-current_exception_trace_full]
[2026-08-29 08:19:11] test_crash_log/test.py::test_crash_log_extra_fields[terminate_with_exception-trace_full] ERROR: command failed after 1/1 attempt(s), exit code: -9
[2026-08-29 08:19:16] Dumping dmesg
[2026-08-29 08:19:16] NOTE: Failed 1 tests - do not block pipeline, exit with 0

So test_crash_log_extra_fields[terminate_with_exception-trace_full] is the test that was in flight when the process died, not a failing test. It never reported a verdict, the three parametrizations that ran before it on gw0 all passed, and Failed 1 tests is that single in-flight row. Nothing from the job was ingested either: the shard is a bare ERROR with duration: null and links: [] in result_pr.json. On this shard the test is 191 OK / 0 FAIL on 08-29, 308 / 0 on 08-30 and 237 / 0 on 08-31. Its one real defect was the __functional symbolization you fixed in #112152.

Not reproducible. OOM in dmesg on Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6) is confined to a single window on 2026-08-29, 00:26Z to 12:05Z: 7 rows, against 0 in the 2723 job runs of 08-21..08-28 and 0 in the 642 job runs of 08-30..08-31. Control that this zero is a measured zero and not lost reporting: the same row fired 9 times on 08-30 across six other checks, including Integration tests (amd_asan_ubsan, db disk, 1/4) on master.

Fixes are already in, so I am not opening a PR:

The only open item left on this shard is the session-timeout capacity choice still waiting on you at #115963 (comment).

…ines

The `ENGINE = URL` case in `05023_url_glob_too_many_addresses.sh` has no `*` in
the path, so `urlPathHasListableGlobs` stays false and the query never reaches
`StorageWebConfiguration`. Add a `url` table function case and an `ENGINE = URL`
case with `allow_experimental_url_wildcard_from_index_pages = 1` and a
`http://localhost{1..2000}/**/part.tsv` pattern: the host template overflows in
`StorageWebConfiguration::setNamespaceFromURL`, before any index page is fetched.

`05054_external_database_glob_too_many_addresses.sh` stopped at the table
functions and the table engines, leaving the caller plumbing in
`DatabaseMySQL`, `DatabasePostgreSQL` and `DatabaseMaterializedPostgreSQL`
untested. Add the matching `CREATE DATABASE` checks; `MaterializedPostgreSQL`
accepts an address expression only through a named collection, because its
positional syntax parses a single `host:port` with `parseAddress`.

All five new cases verified locally against a freshly built binary.
Comment thread src/Common/parseRemoteDescription.cpp Resolved
Comment thread src/Common/parseRemoteDescription.cpp Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-table-functions Table functions for temporary read/write to external systems (FROM ... tableFunction()). label Sep 4, 2026
…ny-addresses

# Conflicts:
#	src/Storages/StorageURL.cpp
#	src/Storages/StorageURL.h
#	src/Storages/StorageURLCluster.cpp
…a path filter

Without a `_path` / `_file` filter `sizeForStreams` returned the upper bound
of the URL count, which ignores failover options (`|`). With a predicate on a
physical column the query is not reduced to one stream by its `LIMIT`, so a
second stream asked the generator past the limit while the first one already
read the URLs that fit, failing the query with "too many result addresses".

Now the upper bound is used only when the whole pattern is known to fit into
the limit; otherwise the streams are sized from the buffered URLs, prefetching
as for the filtered case.

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

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do? It goes a long way to correctly forward the name and the specific of a concrete table function, so the error messages are correct. And also to keep attaching already existing tables successfully. There is no rocket science in this PR. The code is straightforward.

@alexey-milovidov alexey-milovidov self-assigned this Nov 11, 2026
…ny-addresses

Resolve conflicts: keep both URLs in `broken_links_ignore.txt`; in `StorageURLCluster::getTaskIteratorExtension` keep the comment about counting failover options and capture `context` for the credentials check from master. Drop the duplicate `Common/parseRemoteDescription.h` include.

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

Copy link
Copy Markdown
Member Author

🕵 CH Inc sync failed because the sync branch conflicted with private master in src/Storages/StorageURLCluster.cpp (private master captures context in the urlCluster task callback, this PR adds a comment above it) and in ci/jobs/scripts/check_style/broken_links_ignore.txt (both sides added a URL). I kept both sides in each file, merged private master and then this PR's head 7d3929691c0f into sync-upstream/pr/115581, and pushed it. The sync PR is MERGEABLE again. All other CI checks on this PR pass, and no review threads are unresolved.

Comment thread src/Storages/StorageURL.cpp Resolved
alexey-milovidov and others added 3 commits November 16, 2026 05:59
…lover options alone exceed it

`URLReadBufferIterator::produceMoreURLs` materialized the failover options of each
URL with `parseReplicasOfShard`, which throws when a single URL has more of them
than `glob_expansion_max_elements`, so schema inference failed before trying the
earlier buffered URLs. Count them first with `countReplicasOfShard`, as the read
iterator does, and report the limit only when inference needs to go past the
buffered URLs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Master added `InterpreterCreateQuery::getSourceEngineOfTableFunction`, which parses the
table function of `CREATE TABLE ... AS f(...)` for the `TABLE ENGINE` grant check. It parsed
it as a fresh definition, so a short `ATTACH TABLE` of a stored `remote` definition that
exceeds the new total limit of `table_function_remote_max_addresses` was rejected again
(test `05442_remote_glob_mixed_shards_replicas_attach_stored_definition`). Pass
`isReplayedTableDefinition` from `getTablePropertiesAndNormalizeCreateQuery`; the other two
callers check fresh queries only.

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

Master removed the `ON CLUSTER` preflight block of `CREATE TABLE ... AS` in
`InterpreterCreateQuery::execute`; the PR only changed the
`getSourceEngineOfTableFunction` call there, so the block is dropped as on master.

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

Copy link
Copy Markdown
Member Author

🕵 CH Inc sync failed because the sync branch conflicted with private master in src/Databases/DatabaseRemote.cpp (private master has a validate parameter of buildClusters for shared-catalog replay; this PR changed password to std::string_view and kept limit_total_addresses). Re-synced by overlaying the current PR files onto private master and keeping both parameters, as in the previous sync; the sync PR is MERGEABLE again. No change to this PR was needed.

@stresshouse

stresshouse Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 29 queries analysed

no significant changes detected. K_source=4 K_base=30 flagged=0/65

clickbench

🟢 No significant changes

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: 0394fb66-7395-4c50-8bba-ffdc44b7fae0
  • MIRAI run: 20fe5be1-3c0a-4629-bfc5-8e8719391e12
  • PR check IDs:
    • clickbench_885355_1795393149
    • clickbench_885467_1795393174
    • tpch_adapted_1_official_885591_1795393250
    • tpch_adapted_1_official_885795_1795393266

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>
…ny-addresses

Conflicts:
- `src/Interpreters/InterpreterCreateQuery.cpp`, `src/Interpreters/InterpreterCreateQuery.h`: master renamed
  `getSourceEngineOfTableFunction` to `getRequiredAccessOfTableFunction` and made it return an
  `AccessRightsElement`; this branch added the `is_replayed_definition` parameter. Both are kept.
- `src/Storages/StorageURLCluster.cpp`: master added the cancellation flag to the task callback; this branch
  added a comment above it. Both are kept.

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

alexey-milovidov commented Nov 22, 2026 •

Copy link
Copy Markdown
Member Author

🕵 Merged master (41ff13d6f773) to resolve the conflicts:

  • src/Interpreters/InterpreterCreateQuery.cpp, src/Interpreters/InterpreterCreateQuery.h: master renamed getSourceEngineOfTableFunction to getRequiredAccessOfTableFunction and made it return an AccessRightsElement, while this PR added the is_replayed_definition parameter to it. Both are kept.
  • src/Storages/StorageURLCluster.cpp: master added the cancellation flag to the task callback, and this PR added a comment above it. Both are kept.

The diff of the PR against master is unchanged (68 files). The merged tree builds, and the 16 stateless tests added here pass on it locally. remote('example01-0{1,2}-{1|2}', ...) with a limit of 3 still reports generates too many result addresses: 4, while at most 3 are allowed, and CREATE TABLE ... AS url(...) without the grant is still refused with TABLE ENGINE ON URL. CI on the previous head 2029a354e4af was all green, and there are no unresolved review threads.

CH Inc sync failed on the new head ("Needs manual intervention") because the sync branch conflicted with private master. I merged private master and 41ff13d6f773 into sync-upstream/pr/115581. The only conflict, src/Databases/DatabaseRemote.cpp, is resolved as in the previous sync, keeping both the validate and the limit_total_addresses parameters of buildClusters. The sync PR is MERGEABLE again.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 22, 2026
Merged via the queue into master with commit 13f003b Nov 22, 2026
195 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-url-glob-too-many-addresses branch November 22, 2026 23:13
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 22, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Nov 23, 2026
Conflicts with the replayed-definition flag of ClickHouse#115581 and the
`DataLakeCatalog` replay rules of ClickHouse#132097:
- `TableFunctionFactory::get` and `getRequiredAccessOfTableFunction` take
  both `is_replayed_definition` and the loading `mode`; the data lake
  argument check of a table function keys on the mode, like the engine
  path, so a stored `CREATE TABLE ... AS <data lake function>` still loads
  wherever master now parses the function for the access check.
- `DatabaseDataLake::table_definition_mode` treats a replay marked with
  `isRecoveryFromStoredMetadata` as `ATTACH`, as ClickHouse#132097 does for the other
  fresh-`CREATE` validations.
- Glue catalog: `SecretString` engine definition from master, plus the mode.
- Docs and `.syntax` strings: master's workload identity forms of
  `deltaLakeAzure`, `deltaLakeAzureCluster` and `DeltaLakeAzure` without
  the `compression` slot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Nov 23, 2026
…-named-collection-unknown-override-keys

Master ClickHouse#115581 added the same replayed-definition plumbing this branch carries from ClickHouse#132354
(`TableFunctionFactory::get(..., is_replayed_definition)` and `ITableFunction::setReplayedDefinition`),
storing the flag in `arguments_from_stored_definition`. Take master's version of `ITableFunction.h`,
`TableFunctionFactory.h`, `InterpreterCreateQuery.h` and `DatabaseOnDisk.cpp`, read the flag from
`arguments_from_stored_definition` in `TableFunctionObjectStorage::parseArgumentsImpl`, and keep the
replay decision in `InterpreterCreateQuery::getRequiredAccess`, which runs on every execution, including
a secondary DDL replay.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-table-functions Table functions for temporary read/write to external systems (FROM ... tableFunction()). pr-improvement Pull request with some product improvements 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.

The s3 table function does well while url does not.

3 participants