Repository navigation
Remove the order-dependent groupArray statement from test 04651_nullable_tuple_lowcardinality_subcolumn_shared_cache - #124956
Conversation
The statement asserted the exact order of `groupArray` over a table with `ORDER BY tuple()` and no `ORDER BY` in the query. Under parallel replicas each replica aggregates the mark ranges it was given and the initiator merges the partial states in arrival order, so the array came back rotated when the part was split between replicas (marks 3..9 before marks 0..2). It also did not exercise the bug the test covers: the analyzer prunes the unused `x.a.b` from the subquery, so only `x.a` was read. The child and parent read across several granule ranges stays covered by the previous statement, whose aggregates do not depend on the order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-11:20261009-163600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-6:20261009-161000 |
|
Workflow [PR], commit [784f252] Summary: ✅ AI ReviewSummaryThis PR removes an order-dependent Final VerdictStatus: ✅ Approve |
Related: #112232
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
04651_nullable_tuple_lowcardinality_subcolumn_shared_cachefails in theParallelReplicaslanes on one statement,SELECT groupArray(x.a) FROM (SELECT x.a.b, x.a FROM t_04651_ranges SETTINGS max_block_size = 2), which returns the same 20 values rotated, e.g. on #122506: report. The coverage lane relabels such failuresOK: 59 identical diffs in 30 days over ~10,600ParallelReplicasruns, including master (bd202925d0d4), and none in other lanes or on other lines.The table is
ORDER BY tuple()and the query has noORDER BY. Under parallel replicas each replica builds a partialgroupArraystate over the mark ranges it was given, and the initiator merges the states in arrival order. The failing output is exactly marks 3..9 followed by marks 0..2.The statement also does not exercise the bug the test was added for in #112232 (a child and its parent subcolumn read together from one Compact part): the analyzer drops the unused
x.a.bfrom the subquery, andEXPLAIN actions = 1showsReadFromMergeTreewithOutput: x.aonly. The previous statement readsx.a, x.a.bacross granule ranges with order-independent aggregates, so it keeps that coverage. The change deletes the statement and its two reference lines.Validation: the test passes 50/50 randomized runs on a default server and 100/100 on a local
ParallelReplicas-config server (50 of them withparallel_replicas_local_plan = 0).Workflow [PR]
Sync PR [sync-upstream/pr/124956]
Version info
26.10.1.2020-master(included in26.10and later)