Skip to content

Fix logical error for a constant-condition if GROUP BY key under group_by_use_nulls - #117241

Open
groeneai wants to merge 5 commits into
ClickHouse:masterfrom
groeneai:fix-group-by-use-nulls-constant-condition-key
Open

groeneai wants to merge 5 commits into
ClickHouse:masterfrom
groeneai:fix-group-by-use-nulls-constant-condition-key

Conversation

@groeneai

@groeneai groeneai commented Aug 31, 2026 •

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

Fixed Bad cast from type DB::ColumnNullable to DB::ColumnVector<char8_t> when a GROUP BY key is an if or multiIf with a constant condition, the query uses ROLLUP, CUBE or GROUPING SETS with group_by_use_nulls = 1, and a correlated subquery references the column that key collapses to.

Description

Reported in #100173 (comment) from Stress test (amd_tsan): CI report, STID 1499-5613. Unrelated to it.

Reproducer. Fails on 26.7 and 26.8 with Code: 49, and aborts the server in debug and sanitizer builds:

SELECT (SELECT c0) FROM (SELECT 1::Bool) t0(c0)
GROUP BY if(1, c0, false) WITH ROLLUP
SETTINGS group_by_use_nulls = 1;

nullable_group_by_keys is filled from the GROUP BY keys as resolved, but IfConstantConditionPass runs afterwards and collapses if(1, c0, false) to c0, making c0 the real grouping key. It collapses the key and only the key, whose node is not Nullable-wrapped while its projection copies are. The correlated reference to c0 then matches no registered key, keeps its non-Nullable Bool type, and its placeholder is bound by name to the actual Nullable(Bool) header column. FunctionCast, built for Bool, hands a ColumnNullable to the strict checkAndGetColumn<ColumnUInt8> in createUInt8ToBoolWrapper.

The fix registers each key's collapsed shape as a key too, via a predicate extracted from IfConstantConditionPass and shared with it, so prediction and behaviour cannot diverge. One shape is added per key, matching the pass, which visits a node position once then descends into the replacement's children: if(1, if(1, c0, false), false) collapses to the inner if, not to c0. A constant branch is not registered: it can never be a correlated reference, and registering it would make a same-valued projection literal Nullable.

GROUP BY c0 WITH ROLLUP with the same projection already worked, and the reproducer now returns its values. UInt8, UInt64 and String keys already worked and are asserted unchanged.

Out of scope, distinct carriers of the same symptom: LogicalExpressionOptimizerPass, so GROUP BY c0 AND (u < 300) with u UInt8 still fails; MultiIfToIfPass, #103419; the matcher and grouping paths, #104350.

Related: #106377, #100173


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

…p_by_use_nulls

A GROUP BY key that is an `if`/`multiIf` with a constant condition is rewritten to
the branch it always takes by `IfConstantConditionPass`, which runs after
`QueryAnalysisPass`. That branch is then the expression the aggregation actually
groups by, and the one whose type ROLLUP/CUBE/GROUPING SETS turn Nullable under
`group_by_use_nulls`. But `nullable_group_by_keys` is populated during resolution
and only ever held the un-collapsed shape.

The rewrite reaches the key and only the key, because
`registerNullableGroupByKeys` stores the key node unchanged and puts the Nullable
form in a clone, so the pass's result-type check holds for the key while every
projection, ORDER BY and HAVING copy of it is Nullable-wrapped and left alone.

A correlated reference to the collapsed-to column therefore matched no registered
key, was not converted in `resolveExpressionNode`, and kept its non-Nullable
type. The subquery's placeholder was created with that type,
`ActionsDAG::decorrelate` turns it into an input without touching `result_type`,
and `ActionsDAG::updateHeader` binds it to the header column by name only. For a
`Bool` key the resulting `FunctionCast` was built for a non-Nullable source, so
`prepareRemoveNullable` skipped `createBlockWithNestedColumns` and handed a
`ColumnNullable` to the strict `checkAndGetColumn<ColumnUInt8>` in
`createUInt8ToBoolWrapper`.

Register the collapsed shape of each key as a key as well. The predicate that
decides whether a node collapses, and to what, is extracted out of
`IfConstantConditionPass` into `tryCollapseConstantConditionFunction` and called
from both places, so what the resolver predicts and what the pass does cannot
drift apart if either is changed later. Exactly one shape is added per key,
mirroring the visitor, which replaces a node position once and then descends into
the replacement's children: `if(1, if(1, x, y), z)` collapses to the inner `if`,
so registering `x` would promote references to a column that is not a key.

A branch that is a constant is left out. A correlated reference is always a
ColumnNode, so a constant entry could never serve one, and the map is keyed by
value and type: a same-valued literal in the projection would match that entry and
be converted to Nullable, which is what
03926_group_by_use_nulls_constant_type.sql exists to prevent. For `if` the whole
node is already folded to that constant during resolution, by
`FunctionIf::getConstantResultForNonConstArguments`, so `multiIf`, which has no
such fold, is the shape that reaches this. Measured on
`GROUP BY multiIf(1, 'a', c0) WITH ROLLUP`: `toTypeName('a')` in the projection is
String before this change and after it, and was Nullable(String) in between.

This continues 310f78a, which established that this class of defect is
fixed by making the analyzer's `group_by_use_nulls` typing correct rather than by
reconciling types in the planner.

Only `Bool` made this fatal. `UInt8`, `UInt64` and `String` keys reach a cast
wrapper that tolerates the extra Nullable layer, so they returned correct values
while carrying the same type mismatch; the new test asserts their values so a
future change cannot regress them to NOT_IMPLEMENTED.

`LogicalExpressionOptimizerPass` reaches the same invariant through boundary
folding and operand pruning, and `GROUP BY c0 AND (u < 300)` with `u UInt8` still
fails the same way. That promotion cannot be expressed as this predicate and is
left for a separate change.
The test comment said the constant that a constant-condition `if` folds to is not
a registered GROUP BY key. It is: the fold happens during resolution, so the
constant is the written key, and the test's own reference shows a same-valued
projection literal turning `Nullable` with it while the unfolded `multiIf` rows
keep `String`.

The doc block on `registerNullableGroupByKeys` said all shapes map to the original
key node. Each maps to the key whose shape it is, which is what the appended
collapsed branches require, since each of those is itself a key in the list.
The field's doc block said every registered shape maps to the original key
node and listed three shapes. Registration maps each shape to the key node it
is a shape of, and a key that is an `if`/`multiIf` with a constant condition
contributes a fourth shape: the branch the key is later collapsed to, which is
what the aggregation groups by.

Comment text only, no behaviour change.
…ation

The sentence about the collapsed branch read as unconditional, but
`registerNullableGroupByKeys` skips a collapsed branch whose node type is
`CONSTANT`. `GROUP BY multiIf(1, 'a', c0)` reaches registration still a
`multiIf`, because `multiIf` has no constant fold, so its taken branch `'a'`
is not registered. Lines 50-53 of
`05061_group_by_use_nulls_constant_condition_group_by_key.reference` are the
measured proof: `toTypeName('a')` stays `String` there.

A reader who took the field documentation as the contract could remove that
guard and reintroduce the type regression it prevents.

Comment only, no behaviour change.
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-request PR origin: a maintainer pinged or directed groeneai labels Aug 31, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review

Independent cold reviews of this change: my own, and a second model reviewing the diff without my
notes, repeated after each round. All ran before publication; everything agreed on was fixed
before the first push, and the final pass over the tree being published returned nothing.

❌ Blockers

None.

⚠️ Major

A GROUP BY key whose constant-condition branch is itself a constant was registered as a
nullable grouping key.
Measured rather than argued, because the shape that arms it is not the
obvious one: for if, the resolver folds the whole node to its constant branch during resolution
(FunctionIf::getConstantResultForNonConstArguments), so a constant-condition if with a constant
branch never reaches the collapse at all. multiIf has no such fold, so
GROUP BY multiIf(1, 'a', c0) is the shape that does. There, toTypeName('a') for a same-valued
literal in the projection became Nullable(String) where it is String without the change, which
is the invariant 03926_group_by_use_nulls_constant_type exists to hold. Fixed: only a
non-constant branch is registered, at the call site rather than in the predicate shared with
IfConstantConditionPass, so the pass still collapses to constants as before. A correlated
reference is always a ColumnNode, and validateAggregates already skips constant keys, so
nothing is lost. Four cases pin it, at both values of optimize_if_transform_strings_to_enum,
which is randomized in CI.

Three comments about nullable_group_by_keys described a contract the implementation does not
have, and each was corrected only after being measured.
In the new test: a collapsed constant was
said to be unregistered "either way", but for the folded if form the constant is the written key
and pre-existing code registers it, which is why those rows show Nullable(String) while the
multiIf rows show String. In registerNullableGroupByKeys: a registered collapsed branch maps
to itself, not to the if key it came from, and that is what makes a bare-column lookup resolve to
a clone of the column rather than of the if. In the field's own documentation: the collapsed
branch is in the map unless it is a constant. Every one of those behaviours is correct and matches
master; only the descriptions were wrong. They are corrected, and the boundary between a written
constant key and a collapsed-to constant is now the measured one, visible in the test's reference
output rather than asserted in prose.

💡 Noted, not blocking

IfConstantConditionPass runs at pass 28 of 46, and runOnlyResolve runs 4, so the collapse is
skipped for secondary/shard queries, ignore_ast_optimizations and is_create_view. The outcome
there is unchanged: without the collapse the column reaches the post-aggregation header only when
it is independently a written key, in which case it was already registered, and otherwise the
correlated reference hits the existing "can not find correlated column in current header"
rejection either way. Because the change is in the resolution pass it applies on shards as well
as on the initiator, so it does not introduce an asymmetry.

Every other pass that can replace a GROUP BY key with a descendant was checked rather than
assumed: OptimizeGroupByFunctionKeysPass, OptimizeGroupByInjectiveFunctionsPass and
FunctionToSubcolumnsPass all bail out on this setting and modifier combination, and
IfChainToMultiIfPass runs after the collapsing pass. LogicalExpressionOptimizerPass reaches the
same invariant by a different route and is out of scope here, as the description says.

Unrelated to this change, and left alone deliberately: with only a correlated scalar subquery in the
projection, GROUP BY GROUPING SETS ((c0), ()) returns one row where the equivalent
GROUP BY c0 WITH ROLLUP returns two. Both are bare-key forms, so nothing here touches them, and
the reference file pins the existing behaviour of each. The collapsing forms match whichever bare
form they correspond to, which is the property this change is about.

@groeneai groeneai added the groeneai-origin-request PR origin: a maintainer pinged or directed groeneai label Aug 31, 2026
@clickhouse-gh clickhouse-gh Bot closed this Aug 31, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Aug 31, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5fa021e]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DBReplicated, parallel, 1/3) FAIL
03707_autopr_unsupported_cases FAIL cidb
Upgrade check (amd_release) FAIL
Error message in clickhouse-server.log (see upgrade_error_messages.txt) FAIL cidb
Finish Workflow FAIL
python3 ./ci/jobs/scripts/workflow_hooks/new_tests_check.py FAIL
Bugfix validation (functional tests, amd64) ERROR
Bugfix validation (functional tests, aarch64) ERROR
Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6) ERROR
Container memory budget exceeded (/docker) ERROR cidb

AI Review

Summary

This PR fixes group_by_use_nulls analysis when IfConstantConditionPass later collapses a GROUP BY key to its taken branch, so correlated references to that real key shape are typed Nullable consistently under ROLLUP, CUBE, and GROUPING SETS. The current head looks coherent, the changelog metadata matches the change, and the added stateless coverage is focused enough for the reported regression and its nearby boundaries. I did not find a high-confidence correctness, safety, or coverage issue that still needs an inline comment.

Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Measured on commit 5fa021e.

Metric Baseline Current Δ
Lines 88.60% 88.60% +0.00%
Functions 92.10% 92.10% +0.00%
Branches 80.90% 80.90% +0.00%

Changed lines: Changed C/C++ lines covered: 30/31 (96.77%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Aug 31, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. SELECT (SELECT c0) FROM (SELECT 1::Bool) t0(c0) GROUP BY if(1, c0, false) WITH ROLLUP SETTINGS group_by_use_nulls = 1; fails on every run on the pristine binary, no randomization needed. allow_experimental_correlated_subqueries already defaults to true, so group_by_use_nulls = 1 is the only non-default ingredient.
b Root cause explained? Yes. nullable_group_by_keys is filled from the GROUP BY keys as resolved (QueryAnalyzer.cpp:4050), but IfConstantConditionPass (QueryTreePassManager.cpp:322, after QueryAnalysisPass at :270) then collapses the key to the branch it always takes (tryCollapseConstantConditionFunction, Utils.cpp:416-447, called from IfConstantConditionPass.cpp:20), making that branch the real grouping key. The correlated reference matches no entry, is not promoted at QueryAnalyzer.cpp:3701, and its DAG placeholder keeps Bool while updateHeader binds it by name to the real Nullable(Bool) column, so prepareRemoveNullable (FunctionsConversion.cpp:2962) computes source_is_nullable = false and the strict checkAndGetColumn<ColumnUInt8> at :602 throws. Both frames were captured from the local abort, not read off the CI report.
c Fix matches root cause? Yes. The map lacked the shape that actually becomes the key, so the fix registers exactly that shape, using a predicate extracted from the collapsing pass and shared with it, which makes analyzer prediction and pass behaviour incapable of diverging. No widened bound, no no-random-* tag, no unwrapping at the cast site, and no planner-side type repair (that last approach is what 310f78a595150ca removed as masking the real problem).
d Test intent preserved / new tests added? New test 05061_group_by_use_nulls_constant_condition_group_by_key with 26 value cases and 7 expected-error cases. No existing test removed, weakened or re-referenced.
e Both directions demonstrated? Yes, at two levels. Per query: the reproducer gives Bad cast from type DB::ColumnNullable to DB::ColumnVector<char8_t> (exit 134) before and true, \N after. Per test file: on the pristine server clickhouse-test drives the server to abort (exit 134, that exact logical error in the log); with the fix it is [ OK ], and 50/50 with randomization. Server buildId() was asserted equal to the binary's Build ID on each arm before every verdict.
f Fix is general across code paths? All 46 passes in addQueryTreePasses were classified; four can replace a GROUP BY key with a descendant. OptimizeGroupByFunctionKeysPass and OptimizeGroupByInjectiveFunctionsPass already bail out under group_by_use_nulls. This PR covers IfConstantConditionPass. The fourth, LogicalExpressionOptimizerPass, was measured rather than assumed: GROUP BY c0 AND (u < 300) with u UInt8 reproduces the identical error, with EXPLAIN QUERY TREE confirming the key really is reduced to the bare column, and c0 AND true / c0 AND 1 confirmed as negative controls where no reduction happens. It is disclosed in the description and tracked separately, because its promotion is spread across boundary folding and operand pruning and cannot use this predicate. Fixed at the source, not guarded where it throws.
g Fix generalizes across inputs (params/datatypes/wrappers)? Types Bool, UInt8, UInt64, String, Nullable(Bool), LowCardinality(Bool); clauses ROLLUP, CUBE, GROUPING SETS, WITH TOTALS, HAVING; if and multiIf (including with optimize_multiif_to_if = 0, the only way to reach the multiIf arm of the predicate); the true branch and the false branch; one key and two keys; a nested if; a branch whose result type differs so the predicate declines; and group_by_use_nulls both on and off. 31 cases run on both arms: 8 changed, all abort -> correct values, 23 byte-identical. A branch that is a constant is excluded from registration, at both values of optimize_if_transform_strings_to_enum, which clickhouse-test randomizes.
h Backward compatible? (maintainer-approved exception only) Yes. No setting default changed, no new setting, no serialization or format change, so no SettingsChangesHistory.cpp entry is required. The only behaviour change is to queries that previously raised a logical error; every currently-succeeding case in the matrix returns byte-identical values, including the projection copies under ROLLUP/CUBE/GROUPING SETS, which were the most likely place for silent value drift and showed none. Declared types are unchanged too: on GROUP BY multiIf(1, 'a', c0) WITH ROLLUP, toTypeName('a') in the projection is String on the pristine binary and String here. Every group_by_use_nulls, optimize_if_transform_strings_to_enum and group_by_constant test in the tree (32 files) was also run on this build and on the branch's previous build; the failure sets are identical apart from the new test.
i Invariants and contracts preserved? Each registered shape maps to the key node it is a shape of, so a promoted expression is rewritten to the key the aggregation groups by. validateAggregates builds its own key list from the written GROUP BY nodes and never reads nullable_group_by_keys, confirmed by grouping still resolving and by an uncorrelated reference still being rejected NOT_AN_AGGREGATE. Exactly one extra shape is added per key, never a fixpoint: EXPLAIN QUERY TREE shows if(1, if(1, c0, false), false) collapsing to the inner if on both arms, and that case keeps returning NOT_IMPLEMENTED rather than starting to return values. A branch that is a constant is not registered. A written constant key still is, as it always was, and .reference:46-49 versus :50-53 is the measured boundary between the two. ValidationUtils.cpp:349,360 separately skips constant keys when building the key list for aggregate validation, which is why grouping and the NOT_AN_AGGREGATE rejection are unaffected either way. The extracted predicate allocates nothing and returns an existing child pointer, so the pass is byte-identical in behaviour, with no lifetime or ownership change. No concurrency, storage, replication or Keeper path is touched.

Session id: cron:clickhouse-impl-slot-4:20260831-022400

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @KochetovNicolai @novikd, could you review this? IfConstantConditionPass collapses a constant-condition if/multiIf GROUP BY key to its taken branch after resolution, so that branch is the real grouping key, but nullable_group_by_keys held only the uncollapsed shape, leaving a correlated reference to the branch typed non-Nullable against a Nullable(Bool) header column. Registration now derives the extra shape from the same predicate the pass uses to collapse, so the two cannot diverge.

@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 5fa021ee8 with master a39c4b20c (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

78 translation units recompiled, 507 s compile time in total, 78 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×1.10 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost +43.4 s (+9%) in total before that adjustment.

Job report

@groeneai

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 530aa6db658d7bc66b50474d2cc000ae9ec4cc0c

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

Check / test Reason Owner / fixing PR
Integration tests (amd_asan_ubsan, db disk, old analyzer, 2/6) / Container memory budget exceeded (/docker) the job's containers breach the /docker cgroup budget and the kernel kills processes inside it, so the shard errors at job level with no test-level failure #117202 (external, merged 2026-08-31 11:05:36Z), merged master @ 5fa021ee83ba187e91d986f9159254e856de7530
Integration tests (amd_asan_ubsan, db disk, old analyzer, 5/6) / Container memory budget exceeded (/docker) same signature #117202 (external, merged 2026-08-31 11:05:36Z), merged master @ 5fa021ee83ba187e91d986f9159254e856de7530
Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6) / Container memory budget exceeded (/docker) same signature #117202 (external, merged 2026-08-31 11:05:36Z), merged master @ 5fa021ee83ba187e91d986f9159254e856de7530

None of the three can be caused by this PR. Its diff is IfConstantConditionPass.cpp,
IdentifierResolveScope.h, QueryAnalyzer.cpp, Analyzer/Utils.cpp, Analyzer/Utils.h and one
stateless test, all of it analyzer-side group_by_use_nulls key rewriting, which cannot change how
much memory an unrelated integration module's containers use. Mergeable Check reported
Failed: 3, matching this set exactly, and all three failing shards report at job level with an
empty test set.

This head predates the fix: 7fc3004ed25a2dc8aa66428f4f010244dea3046a is not an ancestor of
530aa6db658d, measured by content rather than by commit distance (the symbol GDB_ATTACH_LOCK
that #117202 introduces in tests/integration/integration-tests-entrypoint.sh is absent from this
head and present at the fix). So I merged master in at a39c4b20cb752914374fe84614b0b66ee25d8d4a
to pick it up, and CI is re-running. The merge is a pure master merge: it adds no commit of my own,
the published tree is byte-identical to the tree I merged locally, its first parent is the
pre-merge head, and no contrib/ submodule pin moved.

CH Inc sync was success at this head, so nothing here is exempt.

Reports:

Session id: cron:our-pr-ci-monitor:20260831-173000

@groeneai

groeneai commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

CI finish ledger - 5fa021e

Every failure below has an owner: a fixing PR, or a full-effort fix task whose fixing-PR link will be
posted here when it opens.

Check / test Reason Owner / fixing PR
Bugfix validation (functional tests, amd64) ERRORs at ci/jobs/functional_tests.py:734 with AssertionError: Could not find master builds in S3 before any server starts, so the job measured no test. Trunk-wide, onset 19:00Z on 08-31 with zero errors in the six preceding hours, and still firing at 01:00Z #117433 (ours, open)
Bugfix validation (functional tests, aarch64) same Could not find master builds in S3 abort as the row above #117433 (ours, open)
Finish Workflow / Post Hooks cascade of the Bugfix validation rows: new_tests_check.py reds when no per-arch job reports OK or XFAIL, and its own log quotes that same functional_tests.py:734 traceback #117433 (ours, open)
Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DBReplicated, parallel, 1/3) / 03707_autopr_unsupported_cases trunk-wide rather than specific to this branch: 118 rows over 115 trees, 104 pull requests and 12 true-master commits in 24h. The test collects parallel-replicas statistics off the query plan, which only the analyzer builds #117364 (external, merged 2026-08-31 22:05Z), absent from this tree
Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6) / Container memory budget exceeded (/docker) job-level container-memory abort with no failing test assertion; 323 rows over 314 trees, 256 pull requests and 25 true-master commits in 24h a fix task holds it at P1, blocked on the integration-test capacity decision I put to the maintainers at #115963 (comment)
Upgrade check (amd_release) / Error message in clickhouse-server.log (see upgrade_error_messages.txt) pre-existing fixture, not this diff: every flagged line is Cluster: Code: 198 ... Not found address of host: aaa...aaa (DNS_ERROR) from 04725_distributed_async_insert_long_directory_name's 250-byte Remote hosts, which survive into the restarted server because the upgrade check runs with --fake-drop; 20 rows over 20 pull requests and 0 on master in 30d #117284 (ours, open)

None of the rows above is caused by this pull request.

On the 03707_autopr_unsupported_cases row: #117364 merged at 22:05:00Z and this head predates it, so the next run picks it up. On true master that signature has 12 failing trees before the merge and 0 after. I am not merging master here purely to re-run CI.

Session id: cron:our-pr-ci-monitor:20260901-013000

@clickhouse-gh clickhouse-gh Bot added the comp-query-analyzer Semantic analysis + logical/physical planning + rewrites (Analyzer and Planner modules). label Sep 4, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

Superseded by #122512, which reworks this fix, so this PR can be closed without merging. Applied to a recent master, its change makes SELECT if(1, s, lower(s)) AS r FROM t GROUP BY r WITH ROLLUP ORDER BY r SETTINGS group_by_use_nulls = 1 (s a String column) fail with NOT_AN_AGGREGATE, where master returns the rows.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-query-analyzer Semantic analysis + logical/physical planning + rewrites (Analyzer and Planner modules). groeneai-origin-request PR origin: a maintainer pinged or directed groeneai pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant