Repository navigation
Fix the master build: pass the join analyze mode in the starved totals unit test - #115087
Conversation
…s unit test `gtest_merge_join_starved_totals.cpp` was written on 2026-08-09 against the three argument `TableJoin(const Settings &, VolumePtr, TemporaryDataOnDiskScopePtr)` constructor. Commit b1a380d (PR ClickHouse#110892, merged 2026-08-14) inserted a `JoinAnalyzeMode analyze_mode_` parameter in the second position, so the call no longer resolves. The merge queue built the pull request head, which still had the old base, while MasterCI builds the post merge tree, where the signature has already changed. The test file therefore only broke after the merge, and it broke `unit_tests_dbms` in every configuration that enables tests, which stops `ninja clickhouse-bundle` before the binary is produced. `JoinAnalyzeMode::None` is what the test used to get: before the parameter existed, `analyze_mode` was left at its in class default of `None`. It also keeps the assertion meaningful. The only behavioural reader of the mode on this path is `MergeJoin::runPostBuildPhase`, whose condition is `is_right || is_full || (is_all_join && collectExactMatches())`, and the test builds a `JoinKind::Full` join, so `is_full` already selects the branch and the mode cannot change the outcome. Verified locally: the failing translation unit reproduces the CI error before the change, `unit_tests_dbms` and `clickhouse` both link after it, and `MergeJoinStarvedTotals.FullJoinKeepsRightRows` passes. To confirm the test is still a live oracle rather than merely compiling, `hasPostBuildPhase` was flipped to `false`, which reproduced the original wrong results ({(0,0),(1,0),(2,0)} instead of {(0,0),(0,3),(1,1),(2,0)}).
|
Master is currently red on all test-enabled build configs ( This is the one-line fix. I confirmed the test is still a live oracle rather than just compiling: flipping @alexey-milovidov could you merge this when CI is green, since master build is blocked. |
|
Workflow [PR], commit [00dce8b] AI ReviewSummaryThis PR updates Final Verdict✅ No new issues found in the current diff. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
cb42582
Related: #110892
Related: #113936
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The master build is currently broken on every configuration that enables tests.
src/Processors/tests/gtest_merge_join_starved_totals.cpp:48calls the threeargument
TableJoin(const Settings &, VolumePtr, TemporaryDataOnDiskScopePtr)constructor, but
b1a380dc1c04(#110892) inserted aJoinAnalyzeMode analyze_mode_parameter in the second position, so the call no longer resolves:
This is base drift, not a bad merge. The test file was written on 2026-08-09,
#110892 merged on 2026-08-14, and #113936 merged on 2026-08-17. The merge queue
builds the pull request head, where the old signature was still current, while
MasterCI builds the post merge tree, so the break only appeared after the merge.
It fails
unit_tests_dbms, which stopsninja clickhouse-bundlebefore thebinary exists, so
Build (amd_debug),Build (amd_msan),Build (amd_tsan),Build (amd_asan_ubsan),Build (arm_debug),Build (arm_msan),Build (arm_tsan),Build (arm_asan_ubsan),Build (arm_tidy)andBuild (llvm_coverage_build)are all red, and every downstream check that needsthose binaries cannot run.
The fix passes
JoinAnalyzeMode::None, which is exactly what the test used toget: before the parameter existed,
analyze_modestayed at its in class defaultof
None. It also leaves the assertion intact. The only behavioural reader ofthe mode on this path is
MergeJoin::runPostBuildPhase, whose condition isis_right || is_full || (is_all_join && collectExactMatches()), and the testbuilds a
JoinKind::Fulljoin, sois_fullalready selects the branch.Validation: the failing translation unit reproduces the CI error at master
6061d1c0df7e; with the changeunit_tests_dbmsandclickhouseboth link andMergeJoinStarvedTotals.FullJoinKeepsRightRowspasses. To show the test is stilla live oracle and not merely compiling,
hasPostBuildPhasewas flipped tofalse, which reproduced the original wrong results(
{(0,0),(1,0),(2,0)}instead of{(0,0),(0,3),(1,1),(2,0)}).Version info
26.8.1.1560(included in26.8and later)