Skip to content

Fix classification of a parameterized view whose SELECT body is not a flat UNION list - #112211

Merged
PedroTadim merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-parameterized-view-union-child-classification
Jul 28, 2026
Merged

PedroTadim merged 2 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-parameterized-view-union-child-classification

Conversation

@groeneai

Copy link
Copy Markdown
Collaborator

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):

Fixes a parameterized view whose SELECT body uses INTERSECT/EXCEPT, or a UNION chain that mixes UNION DISTINCT with UNION ALL, being classified as an ordinary view. Such a view was created successfully but its metadata could not be read back: loading it threw Invalid storage definition in metadata file, which made the view permanently unloadable and aborted a debug or sanitizer server on startup. system.tables.parameterized_view_parameters also reported no parameters for those views.

Description

Related: #111542

ASTSelectWithUnionQuery::hasQueryParameters() inspected a list_of_selects child only when child->as<ASTSelectQuery>() succeeded. IAST::as<T>() is typeid_cast, an exact typeid match, so a child of any other type was skipped silently and its query parameters became invisible. Two child kinds reach that hole, and interpreter passes create both:

  • ASTSelectIntersectExceptQuery, which SelectIntersectExceptQueryVisitor substitutes into the list. It derives from ASTSelectQuery, so the exact typeid check does not match it.
  • a nested ASTSelectWithUnionQuery, which NormalizeSelectWithUnionQueryVisitor creates for a chain that mixes UNION DISTINCT with UNION ALL. This carrier involves no INTERSECT or EXCEPT at all.

The two code paths ask the question in opposite orders. On CREATE, classification runs before both rewrites and is memoized, so the answer is correct and the metadata written is correct for a parameterized view. On startup load, DatabaseOrdinary::loadTablesMetadata runs both rewrites before any classification, so the answer is computed on the already-rewritten tree and comes out false. createTableFromAST then keeps has_columns = true, finds no column list and (for a view) no engine, and throws LOGICAL_ERROR at DatabaseOnDisk.cpp:137-139. Because a logical error aborts at construction in debug and sanitizer builds, that happens before the AsyncLoader worker's catch(...), so a single such view stops the whole server from starting, even under FORCE_ATTACH.

The fix makes both hasQueryParameters() and getQueryParameters() answer for the whole SELECT body, reusing the existing analyzeReceiveQueryParams/analyzeReceiveQueryParamsWithType helpers that ASTSelectQuery::hasQueryParameters() already uses. Both accessors are changed, otherwise a view would load but system.tables.parameterized_view_parameters would still report nothing for it.

The accessor is the single point of truth: every consumer (isParameterizedView(), the create-time substitution gate, system.tables, createTableFromAST) already calls these two functions and already expects the whole-body answer. Reordering the visitors would add a third classification point and leave system.tables wrong; relaxing the DatabaseOnDisk.cpp check would leave the view unloadable while removing a guard that legitimately detects hand-edited metadata.

Reproducible without a server, object storage or a fuzzer:

D=$(mktemp -d)
clickhouse local --path $D -q "CREATE DATABASE d ENGINE=Atomic;
                               CREATE VIEW d.v AS SELECT {n:UInt64} AS x INTERSECT SELECT 2;"
clickhouse local --path $D -q "SELECT name FROM system.tables WHERE database='d'"

The second invocation aborts before this change and succeeds after it. A directory written by an unpatched binary loads correctly with a patched one, because the classification is recomputed when the metadata is parsed again, so existing broken views recover on upgrade without manual repair. The metadata format is unchanged: a parameterized view simply stores no column list, exactly as the already-working flat spelling does.

One behaviour change is worth calling out. A view written with explicit parentheses, such as SELECT 1 AS x UNION DISTINCT (SELECT {n:UInt64} AS x UNION ALL SELECT 3), is nested by the parser rather than by a rewrite, so its parameter was invisible at CREATE time too. It never wrote unreadable metadata: with the parameter unset the CREATE failed with UNKNOWN_QUERY_PARAMETER, and with it set the parameter was substituted and an ordinary view was stored. The same accessor governs that shape, so it is now preserved as a parameterized view, matching what the equivalent flat spelling already did. The regression test covers it.

This does not claim to close the torn-read race that issue #111542 is titled after: the reporter's own failing tables do not look like parameterized views, so that instance may be a different mechanism. What it fixes is the deterministic carrier of the same fatal message, reproduced above and seen aborting the same table across six consecutive restarts in a CI artifact on that issue. #110906 is disjoint: it only degrades a future variant of this failure from a server abort to an exception, and is not the fix for these views.

groeneai and others added 2 commits July 27, 2026 23:31
… flat UNION list

ASTSelectWithUnionQuery::hasQueryParameters() inspected a list_of_selects child
only when child->as<ASTSelectQuery>() matched. IAST::as<T>() is typeid_cast, an
exact typeid match, so a child of any other type was skipped silently and its
query parameters became invisible. Two interpreter passes create such children:
SelectIntersectExceptQueryVisitor substitutes an ASTSelectIntersectExceptQuery
(which derives from ASTSelectQuery, so the exact check does not match it), and
NormalizeSelectWithUnionQueryVisitor nests a fresh ASTSelectWithUnionQuery for a
chain that mixes UNION DISTINCT with UNION ALL. The second carrier involves no
INTERSECT or EXCEPT at all.

The two code paths ask the question in opposite orders. On CREATE, classification
runs before both rewrites and is memoized, so the metadata written is correct for
a parameterized view. On startup load, DatabaseOrdinary::loadTablesMetadata runs
both rewrites before any classification, so the answer is computed on the
already-rewritten tree and comes out false. createTableFromAST then keeps
has_columns = true, finds no column list and no engine, and throws LOGICAL_ERROR
at DatabaseOnDisk.cpp:137-139. A logical error aborts at construction in debug and
sanitizer builds, before the AsyncLoader worker's catch(...), so one such view
stopped the whole server from starting, even under FORCE_ATTACH.

Make both hasQueryParameters() and getQueryParameters() answer for the whole
SELECT body, reusing the existing analyzeReceiveQueryParams helpers that
ASTSelectQuery::hasQueryParameters() already uses. Both accessors have to change:
fixing only the first would let the view load while
system.tables.parameterized_view_parameters still reported no parameters.

The fix is at the accessor rather than at the throw site because every consumer
already calls these two functions and already expects the whole-body answer.
Reordering the visitors would add a third classification point and leave
system.tables wrong, and relaxing the DatabaseOnDisk.cpp check would leave the
view unloadable while removing a guard that legitimately detects hand-edited
metadata.

A directory written by an unpatched binary loads with a patched one, because the
classification is recomputed when the metadata is parsed again, so existing broken
views recover on upgrade. The metadata format is unchanged.

A view written with explicit parentheses is nested by the parser rather than by a
rewrite, so its parameter was invisible at CREATE time too and the parameter was
substituted instead of being kept. It never wrote unreadable metadata, but the
same accessor governs it, so it is now preserved as a parameterized view, matching
what the equivalent flat spelling already did. The test covers that shape.

Related: ClickHouse#111542
Review follow-up to the previous commit; no behaviour change.

The regression test carried a no-fasttest tag whose stated reason was that it
spawns clickhouse-local and writes an on-disk metadata directory. Neither half
of that gates the Fast test job. clickhouse-local is part of clickhouse-bundle,
which the Fast test build produces, and the test only uses the Atomic database
engine and system.tables, so nothing it needs is compiled out when libraries
are disabled. It runs in about a second against a 60 second timeout, and most
existing shell tests that drive clickhouse-local with a persistent --path carry
no such tag either. Keeping the tag hid a parser and AST regression from the
cheapest job that could catch it, so it is removed. No replacement tag is
needed: every path the test touches is scoped to CLICKHOUSE_TEST_UNIQUE_NAME,
it needs no server, and it mutates no shared server state.

Verified by running the test harness with --fast-tests-only: the test is now
selected and passes, where with the tag restored the same command skips it with
"running fast tests only".

The comment above the two file-local helpers is also trimmed to the one fact
that is not visible at the call site. The rest of it repeated this commit's
predecessor message, and it implied that all three dispatch arms are required
for correctness, which is not true: the general branch alone would already
handle a nested union node, because QueryParameterVisitor recurses over all
children. The first two arms exist to preserve the per-node memo.

Related: ClickHouse#111542

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

Copy link
Copy Markdown
Collaborator Author
Internal second-model review (2 review rounds, 3 second-model passes, 8 findings adjudicated)

Before opening this PR I ran an independent cold review of the resulting code plus three
second-model review passes, and adjudicated every finding. No blocker was raised. One major
was raised, agreed and fixed in a follow-up round; the rest were nits. The final pass, over
the exact content published here, returned nothing.

# Finding Verdict Resolution
⚠️ The regression test carried no-fasttest, excluding a parser and AST regression from the Fast test gate for no reason AGREE Tag removed. clickhouse-local is unconditionally built into clickhouse-bundle, the test uses only Atomic and system.tables so nothing it needs is compiled out by -DENABLE_LIBRARIES=0, it runs in about a second against a 60 second timeout, and 15 of the 18 existing shell tests that drive clickhouse-local over a persistent --path carry no such tag either. The three that do carry it do so for unrelated reasons. Verified by running the harness with --fast-tests-only in both directions: selected without the tag, skipped with it restored
💡 Changelog entry was in past tense AGREE Reworded to present tense per docs/changelog_entry_guidelines.md
💡 The in-diff comment restated what the commit message already says AGREE Trimmed to the one fact that is not inferable at the call site
💡 That comment implied all three dispatch branches were correctness-required AGREE Corrected: QueryParameterVisitor already recurses through children, so the general branch is the answer and the two typed branches only preserve the existing memo
💡 PR description was long AGREE Tightened
💡 Test scratch directory is relative rather than under $CLICKHOUSE_TMP DISAGREE Both idioms are established in tree (02246, 02707, 02816 use the relative form) and shell_config.sh defaults CLICKHOUSE_TMP to the same directory, so this is a style coin-flip, and the directory name is already unique per test and per database
💡 The comment writes as<ASTSelectQuery>() where the repository style guide prefers naming a function without the empty argument list DISAGREE The token quotes a call site rather than naming a function, which is the case that guidance scopes out, and the surrounding file already spells other call sites the same way
💡 The two commits differ in whether they carry a Co-Authored-By trailer DISAGREE Correcting the first one would require amending an existing commit, which the repository guidance asks contributors not to do

Verified independently rather than taken from the change: the exact-typeid behaviour of
IAST::as, both rewriters that substitute a non-plain child, the opposite ordering of
classification on create versus on load and the memoization that makes the create path
correct, that every consumer of the classification funnels through these two accessors so
they are the single point of truth, that system.tables calls the second accessor directly
and therefore both had to change, and that every new assertion fails if the change is
reverted. The neighbouring exact-typeid loops over the union list
(ApplyWithGlobalVisitor, InsertQuerySettingsPushDownVisitor, TreeOptimizer,
InterpreterInsertQuery, the formatter) were checked and none of them decides this
classification, so they are deliberately left alone.

Because the test now runs in the Fast test job, the two things that break only there were
also checked: the file keeps mode 755, and the scratch directories it creates are relative
to the job-local working directory and named after CLICKHOUSE_TEST_UNIQUE_NAME, so they
stay unique per test and per parallel copy and are removed at the end.

Session id: cron:clickhouse-review-slot-9:20260728-015000

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes, on demand, no server / object storage / fuzzer. D=$(mktemp -d); clickhouse local --path $D -q "CREATE DATABASE d ENGINE=Atomic; CREATE VIEW d.v AS SELECT {n:UInt64} AS x INTERSECT SELECT 2;" then clickhouse local --path $D -q "SELECT name FROM system.tables WHERE database='d'" aborts with rc=134 on master, every time. A second oracle needs no reload at all: system.tables.parameterized_view_parameters reports [] for that view in the same session.
b Root cause explained? ASTSelectWithUnionQuery::hasQueryParameters() inspected a list_of_selects child only when child->as<ASTSelectQuery>() matched, and IAST::as<T>() is typeid_cast (exact typeid), so any other child type was skipped and its parameters were invisible. Two interpreter passes create such children: SelectIntersectExceptQueryVisitor (an ASTSelectIntersectExceptQuery, which derives from ASTSelectQuery so the exact check misses it) and NormalizeSelectWithUnionQueryVisitor (a nested ASTSelectWithUnionQuery, for a chain mixing UNION DISTINCT with UNION ALL). On CREATE classification runs before both rewrites and is memoized, so metadata is written correctly; on startup load DatabaseOrdinary::loadTablesMetadata runs both rewrites first, so the answer is computed on the rewritten tree and is false. createTableFromAST then keeps has_columns = true, finds no column list and no engine, and throws LOGICAL_ERROR at DatabaseOnDisk.cpp:137-139 -- which aborts at construction in debug/sanitizer builds, before the AsyncLoader worker's catch(...), so one such view stops the whole server.
c Fix matches root cause? Yes. The accessor is made to answer for the whole SELECT body, which is the question every consumer already asks it, reusing the existing analyzeReceiveQueryParams/analyzeReceiveQueryParamsWithType helpers. Explicitly not band-aids: the DatabaseOnDisk.cpp guard is untouched (it legitimately detects hand-edited metadata), no visitor was reordered (that would add a third classification point and leave system.tables still wrong), and no check was added at the throw site.
d Test intent preserved / new tests added? New test 04651_parameterized_view_union_child_metadata.sh. No existing test was modified or weakened. It asserts both carriers plus two controls, on two oracles (in-session parameterized_view_parameters, and a second clickhouse local invocation over the same --path for the load path). Neighbourhood sweep of 52 parameterized-view/set-operation tests shows no regression; in particular 02921_parameterized_view_except_queries (the highest-risk existing test, a parameterized view with EXCEPT in a subquery) passes identically before and after.
e Both directions demonstrated? Yes, both on Build-ID-verified binaries. Fixed build: PASS (and 50/50 with randomization, 50/50 without). Pristine master binary, same committed test: FAIL, with exactly the predicted signature -- the three carrier lines read [] instead of [('n','UInt64')], the reload section aborts rather than diffing (3 <Fatal> threads, one per carrier, stack DatabaseOnDisk.cpp:138 <- DatabaseOrdinary.cpp:388 <- AsyncLoader::worker, rc=134), and both control lines are unchanged. Mutation matrix, predictions written before running: reverting only the hasQueryParameters() dispatch fails via the reload abort; reverting only the getQueryParameters() dispatch leaves the reload working but empties the parameter map (so the second assertion is not vacuous); narrowing the dispatch to ASTSelectIntersectExceptQuery only fails on v_nested_union alone (so the second carrier is separately pinned). After restore the source md5 is back to its pre-mutation value and the rebuild is bit-identical.
f Fix is general across code paths? Both duplicated filters are fixed in the same commit (hasQueryParameters() and getQueryParameters()); fixing only the first would load the view while system.tables still reported no parameters. The fix is at the shared accessor, so both rewriters and both entry points (CREATE and startup load) are covered by one change, and DatabaseReplicated is covered too because it inherits DatabaseOrdinary::loadTablesMetadata. Verified non-carriers: ASTSelectQuery::hasQueryParameters() already delegates over its own whole subtree; MaterializedView/WindowView cannot reach this because isParameterizedView() requires is_ordinary_view.
g Fix generalizes across inputs? Measured across the child-kind and shape matrix rather than one spelling: INTERSECT, EXCEPT, INTERSECT DISTINCT, parameter on the right side, parameter inside a subquery of the left side, 3-way INTERSECT, EXCEPT+INTERSECT mixed, an EXCEPT chain followed by UNION; the mode-mixing UNION DISTINCT/UNION ALL chain with the parameter in either nested position; the parser-nested parenthesized shape; and single-mode chains (correct before and after). Parameters reachable only through ASTSetQuery field values stay covered because the reused helper already handles them. Controls confirm the direction is one-way: a non-parameterized INTERSECT view and a plain UNION ALL view still classify as ordinary and keep their stored column lists in system.columns.
h Backward compatible? Yes. No setting is added or changed, so no SettingsChangesHistory.cpp entry applies, and the metadata format is unchanged (a parameterized view stores no column list, exactly as the already-working flat spelling does). Measured upgrade direction: a directory created by an unpatched binary -- which that same unpatched binary then cannot read (rc=134) -- loads with the patched binary, reports the correct parameters, and the previously broken views become queryable. So existing broken views recover without manual repair.
i Invariants and contracts preserved? The invariant named: hasQueryParameters()/getQueryParameters() answer for the whole SELECT body, whatever node kinds the union list currently holds. The boolean and the map now agree by construction, which is what getQueryParameters()'s early return depends on. The mutable std::optional<bool> memo is intentionally kept -- it is what makes the CREATE path correct and is not the defect -- and an exact ASTSelectQuery child still goes through that node's own accessor, so its memo is preserved rather than bypassed; a nested ASTSelectWithUnionQuery recurses so its memo is preserved too. No lifetime, ownership or concurrency contract changes: both helpers take const ASTPtr & and only read. One deliberate, user-visible consequence is disclosed in the PR description: the parser-nested parenthesized shape is now preserved as parameterized instead of having its parameter substituted, which is what the equivalent flat spelling already did, and it is covered by the test.

Session id: cron:clickhouse-impl-slot-40:20260727-224000

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @evillique @SmitaRKulkarni - could you review this? ASTSelectWithUnionQuery::hasQueryParameters filtered union children with as<ASTSelectQuery>, which is an exact typeid check, so a parameterized view whose body is rewritten into an ASTSelectIntersectExceptQuery or a nested ASTSelectWithUnionQuery lost its classification on the load path and its metadata could no longer be read back. It is the same message that the 2024 fix by azat addressed for a different carrier, reached through a second hole in the accessor.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jul 28, 2026
@PedroTadim PedroTadim self-assigned this Jul 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [9cef8f7]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_msan, WasmEdge, parallel, 2/2) FAIL
00084_external_aggregation FAIL cidb IGNORED

AI Review

Summary

This PR fixes the original INTERSECT/EXCEPT and nested-UNION carriers by teaching ASTSelectWithUnionQuery to look past exact-typeid ASTSelectQuery children, and the new regression test exercises those load-path failures well. I found one remaining correctness hole in the same accessor: union-level trailing SETTINGS parameters are still ignored, so some ASTSelectWithUnionQuery views remain misclassified as ordinary views or report incomplete parameterized_view_parameters.

Findings

❌ Blockers

  • [src/Parsers/ASTSelectWithUnionQuery.cpp:173] ASTSelectWithUnionQuery::hasQueryParameters / getQueryParameters still only walk list_of_selects->children, but ParserQueryWithOutput attaches trailing query-level SETTINGS to ASTQueryWithOutput::settings_ast. A view like CREATE VIEW v AS (SELECT 1 UNION ALL SELECT 2) SETTINGS max_threads = {threads:UInt64} is therefore still treated as an ordinary view on create/load, and mixed cases still under-report system.tables.parameterized_view_parameters. Suggested fix: include settings_ast (or more generally the whole ASTSelectWithUnionQuery subtree) in both accessors, then add a regression test for the union-level SETTINGS shape.
Final Verdict
  • Status: ❌ Block

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 28, 2026
for (const auto & child : list_of_selects->children)
{
if (auto * select_node = child->as<ASTSelectQuery>())
if (childHasQueryParameters(child))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ParserQueryWithOutput still attaches query-level trailing SETTINGS to ASTQueryWithOutput::settings_ast, and this loop never looks at that child. That means a union view whose only placeholder is in ... SETTINGS max_threads = {threads:UInt64} is still classified as an ordinary view, unlike the single-SELECT form, and mixed cases will still omit that parameter from system.tables.parameterized_view_parameters. The accessor needs to include settings_ast (or otherwise scan the whole ASTSelectWithUnionQuery subtree) in both hasQueryParameters and getQueryParameters, plus a regression test for the union-level SETTINGS shape.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The asymmetry this describes does not exist, and the accessor cannot reach settings_ast from where it sits. Measured on the pristine merge-base and on this PR's head, both debug builds.

1. A placeholder in a flat trailing SETTINGS is already found, for both shapes. EXPLAIN AST shows why: ParserSelectQuery consumes it onto the innermost ASTSelectQuery, not onto the outer ASTSelectWithUnionQuery.

CREATE VIEW v AS SELECT 1 AS x UNION ALL SELECT 2 SETTINGS max_threads = {t:UInt64}
  CreateQuery v (children 2)
   SelectWithUnionQuery (children 1)
    ExpressionList (children 2)
     SelectQuery (children 1)  ...
     SelectQuery (children 2)  ...
      Set                       <-- child of the LAST SelectQuery

QueryParameterVisitor::visitSetQuery (src/Parsers/QueryParameterVisitor.cpp:43-58) already discovers placeholders inside an ASTSetQuery, so the per-child recursion reaches it. system.tables.parameterized_view_parameters, single session, identical on master and on this PR:

view body master this PR
SELECT 1 AS x SETTINGS max_threads = {t:UInt64} [('t','UInt64')] [('t','UInt64')]
SELECT 1 AS x UNION ALL SELECT 2 SETTINGS max_threads = {t:UInt64} [('t','UInt64')] [('t','UInt64')]
SELECT {n:UInt64} AS x UNION ALL SELECT 2 SETTINGS max_threads = {t:UInt64} [('t','UInt64'),('n','UInt64')] [('t','UInt64'),('n','UInt64')]

The mixed case reports both parameters. And this PR is what makes the INTERSECT spelling of the same shape work at all: SELECT 1 AS x INTERSECT SELECT 2 SETTINGS max_threads = {t:UInt64} reloads as [('t','UInt64')] here versus rc=134 on master.

2. A view's inner ASTSelectWithUnionQuery can never own a settings_ast. ParserSelectWithUnionQuery contains no SETTINGS handling at all (whole-file grep), and it is the parser used for the AS body (src/Parsers/ParserCreateQuery.cpp:1782, inside ParserCreateViewQuery). The node that can own one is ASTCreateQuery, a level above: with parenthesized branches, EXPLAIN AST puts Set as a direct child of CreateQuery, a sibling of SelectWithUnionQuery. Adding settings_ast to these two accessors would therefore be reaching for a child that is not in the subtree they traverse.

3. There is a real defect nearby, but it is pre-existing and in that layer above. A CREATE VIEW whose only placeholder is in a query-level trailing SETTINGS persists it unsubstituted, and the resulting metadata can never be attached:

Code: 695 ... Load job 'load table d.u_set' failed: Code: 456 ... Substitution `t` is not set:
Cannot attach table `d`.`u_set` from metadata file ... AS SELECT 1 AS x UNION ALL SELECT 2
SETTINGS max_threads = {t:UInt64}

Reload rc=210, byte-for-byte the same on master and on this PR head, and the same for the single-SELECT form, so it is neither UNION-specific nor touched by this change. The reason it cannot work today is that with no parameter supplied, every SETTINGS-placeholder shape already fails at CREATE with Code: 456, while every body-placeholder shape creates fine: a SETTINGS placeholder is substituted at CREATE time rather than being a view parameter. Whether it should become one is a semantics question for the owners, and the fix site is ASTCreateQuery/ParserQueryWithOutput, not ASTSelectWithUnionQuery.

So: agreed that the shape deserves attention, and I have filed a separate fix task for it with the measurements above. I am keeping it out of this PR, which fixes one root cause (the union-child classification) in one accessor.

@clickhouse-gh

clickhouse-gh Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.20% 86.30% +0.10%
Functions 92.00% 92.00% +0.00%
Branches 78.40% 78.40% +0.00%

Changed lines: Changed C/C++ lines covered: 20/20 (100.00%) · Uncovered code

Full report · Diff report

@PedroTadim
PedroTadim enabled auto-merge July 28, 2026 12:12
@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 9cef8f7

CI has fully finished on this head: 174 check-runs, 0 queued, 0 in progress, Finish Workflow
success at 13:43:41Z. 155 success, 18 skipped, 1 failure. Every failure below has an owner.

Check / test Reason Owner / fixing PR
Stateless tests (amd_msan, WasmEdge, parallel, 2/2) / 00084_external_aggregation query-level MEMORY_LIMIT_EXCEEDED (Code 241): 317.24 MiB attempted against the test's own 286.10 MiB cap, in AggregatingTransform fixing PR #112054 (external, open)

Not caused by this PR. The failing statement is SELECT URL, uniq(SearchPhrase) FROM test.hits GROUP BY URL, which touches nothing in this diff (ASTSelectWithUnionQuery::hasQueryParameters
plus the parameterized-view child classification). The test exceeds the max_memory_usage it sets
for itself, leaving too little headroom above the spill threshold for the aggregator's 64 MiB
chunk allocation. The runner's own diagnosis agrees it is not a property of this build: Runs: 2, Failed: 0, Passed: 2 on re-run with the same randomized settings.

Breadth over 30 days for this exact signature, excluding flaky-check jobs: 74 hits across 66
distinct PRs plus 3 on master, spanning amd_msan WasmEdge, amd_tsan, amd_debug,
arm_binary and amd_asan_ubsan distributed plan. #112054 raises the test's memory headroom and
is the owner for the whole family.

Session id: cron:our-pr-ci-monitor:20260728-140000

@PedroTadim
PedroTadim added this pull request to the merge queue Jul 28, 2026
auto-merge was automatically disabled July 28, 2026 19:37

Pull Request is not mergeable

Merged via the queue into ClickHouse:master with commit 3989bff Jul 28, 2026
177 of 179 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 28, 2026
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 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.

3 participants