Repository navigation
Name the join algorithms that were tried in the "can't execute" error - #115226
Conversation
- The error said only "Can't execute any of specified algorithms for specified strictness/kind and right storage type". It named neither the algorithms that were tried nor the JOIN that failed, although both are available at the throw site. Setting `join_algorithm` and then writing an `ASOF JOIN` gave a dead end with nothing to act on. - It now reads: "Can't execute ASOF INNER JOIN with any of the algorithms enabled by the 'join_algorithm' setting [grace_hash, partial_merge] for the given right table storage type". - Algorithm names come from `SettingFieldJoinAlgorithmTraits::toString` rather than `toString(JoinAlgorithm)`. The latter returns the uppercase enum spelling, `GRACE_HASH`, which the setting parser rejects, so the names in the message can now be pasted straight back into `join_algorithm`. - Adds a stateless test for both the rejected and the supported algorithms. - Updates a comment in 02242_join_rocksdb.sql that quoted the old wording.
- The previous wording, "Can't execute X JOIN with any of the algorithms enabled by the 'join_algorithm' setting [...] for the given right table storage type", reads as though the storage type is what blocked the JOIN. That is true when a `direct` join is asked for over a non key-value table, but not for `ASOF` with `grace_hash`, where the strictness is what fails and the storage type is beside the point. - It now states only what is actually known: "None of the algorithms enabled by the 'join_algorithm' setting [grace_hash] can execute this ASOF INNER JOIN with the given right table storage type". - Deliberately not naming the algorithms that would work. `tryCreateJoin` has no capability table, the support rules live implicitly across its per algorithm branches, so listing them here would hardcode a fourth copy of knowledge that is already in the docs and would rot silently.
|
Workflow [PR], commit [65b76ae] Summary: ✅
AI ReviewSummaryThis PR improves the Final Verdict✅ Approved LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 22/22 (100.00%) · Uncovered code |
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 units8 translation units recompiled, 27 s compile time in total, 8 of them have a recent master baseline. |
…text Addresses review feedback on the pull request. - `enable_analyzer = 0` takes `ExpressionAnalyzer::chooseJoinAlgorithm`, a second copy of the same loop that was left throwing the old wording. Both paths now produce the same message, so the improvement does not depend on which analyzer is in use. - The existing test only asserted `NOT_IMPLEMENTED`, so it passed just as well with the old text and could not have caught the untouched legacy path. Adds a shell test that reads the message itself under both `enable_analyzer` values and checks that it names the setting, the algorithm that was tried and the JOIN strictness, and that it does not print the uppercase enum spelling, which the setting parser rejects.
Addresses review feedback. The test checked that the message names the JOIN strictness but not the kind, so `INNER` could have disappeared from the message and the test would still have passed, which is weaker than what the change promises. It now asserts the kind on its own and the two together, so the test also fails if they stop being reported as a single JOIN.
`04926_direct_join_prepared_source` pinned the refusal to `Can't execute any of specified algorithms`, but `chooseJoinAlgorithm` has said `None of the algorithms enabled by the 'join_algorithm' setting [direct] can execute this ALL LEFT JOIN with the given right table storage type` since ClickHouse#115226 landed. All three `expect_refusal` cases therefore printed `unexpected` and the test failed on every run, reproducibly and independently of randomized settings, even though the behaviour under test - declining instead of failing to clone - was correct. The refusal is now recognised by the `NOT_IMPLEMENTED` code together with the `storage type` tail that both wordings share, so a further reword of the sentence does not break the test. The `Cannot clone` check this test exists for stays first and stays exact. A query that succeeds, or that fails for an unrelated reason, is still reported as `unexpected` rather than being mistaken for the refusal. CI report: https://d1k2gkhrlfqv31.cloudfront.net/clickhouse-test-reports-private/json.html?PR=70002&sha=6c220df461525fa4f73bb2dbaf765a1e47b3dc59&name_0=PR&name_1=Stateless%20tests%20(amd_asan_ubsan%2C%20distributed%20cache%2C%20meta%20in%20keeper%2C%20s3%20storage%2C%20parallel%2C%201%2F2) Related: ClickHouse/clickhouse-private#70002 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
When no enabled join algorithm can run a JOIN, the planner threw:
It named neither the algorithms that were tried nor the JOIN that failed, even though both are available at the throw site. Setting
join_algorithmto something narrower for memory reasons and then writing anASOF JOINleft you with nothing to act on.It now reads:
Algorithm names are printed through
SettingFieldJoinAlgorithmTraits::toStringrather thantoString(JoinAlgorithm). The latter returns the uppercase enum spelling,GRACE_HASH, which the setting parser rejects, so the names in the message can now be pasted straight back intojoin_algorithm.The message deliberately does not list the algorithms that would work.
tryCreateJoinhas no capability table, the rules live implicitly across its per algorithm branches, so naming them here would add a copy of knowledge that is already in the documentation and would rot quietly the next time an algorithm gains or loses support.Also updates a comment in
02242_join_rocksdb.sqlthat quoted the old wording.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
When no join algorithm enabled by the
join_algorithmsetting can execute aJOIN, the error message now names the algorithms that were tried and the strictness and kind of the JOIN that failed, instead of reporting only that none of them worked.Workflow [PR]
Sync PR [sync-upstream/pr/115226]
Version info
26.8.1.1751(included in26.8and later)