Repository navigation
Make 00956_join_use_nulls_with_array_column deterministic - #125133
Conversation
After the left side of the join became `numbers(10)`, `ANY LEFT JOIN ... LIMIT 1` without `ORDER BY` may return any of its rows. With parallel replicas it returned `5`. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125010&sha=7bb4fa863a77f8bfe9065f40349fdab1db9bea39&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 Related: #125010 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [59cf6f3] Summary: ✅ AI ReviewSummaryThis PR makes Final Verdict
|
…in_use_nulls_with_array_column` Instead of `ORDER BY` between the join and the `LIMIT`, make the left input deterministic by using a single-row `numbers(1)`, so the test still covers `LIMIT` applied to a join result. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ay_column` The single-row left side `numbers(1)` only produced a matching row, so the `ANY LEFT JOIN` no longer exercised the `join_use_nulls` path for unmatched rows with an `Array` column on the right side. Ordering the left side before the join is not reliable with parallel replicas, so make every query order-independent instead, keeping `LIMIT` directly on the join result: - `SEMI LEFT JOIN` over `numbers(10)` keeps only the matching row `0`; - `ANY LEFT JOIN` over `numbers(1, 9)` has only unmatched rows, so any row gives the default `[]` for the `Array` column; - `ANY LEFT JOIN` over `numbers(10)` with `LIMIT 10` mixes the matched and unmatched rows, and counting them is independent of the order. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125133&sha=6cc8928c182dc47444011986661ce3d8c6dfd747&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29 ( |
|
The fix is already in progress: #123121 (mine, open). This is the race from #112642: query 26 of |
Since the left side of the join in
00956_join_use_nulls_with_array_columnbecamenumbers(10)(8182000), theANY LEFT JOIN ... LIMIT 1query has noORDER BY, so it may return any of the left rows. With parallel replicas it returned5instead of0:https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125010&sha=7bb4fa863a77f8bfe9065f40349fdab1db9bea39&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20ParallelReplicas%2C%20s3%20storage%2C%20parallel%29
This makes every query independent of the row order while
LIMITstays directly on the join result: theSEMI LEFT JOINkeeps only the single matching row, oneANY LEFT JOINhas only unmatched rows (so theArraycolumn is always the default[]), and anotherANY LEFT JOINtakes all rows, mixing matched and unmatched ones, and counts them.Related: #125010
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125133]
Version info
26.10.1.2286-master(included in26.10and later)