Conversation
|
This is an automated comment for commit c10d68c with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
|
Problematic queries found by stress tests are in https://raw.githubusercontent.com/ClickHouse/ClickHouse/19290298825f42800ed5a16aa5f4c2670164ca99/tests/queries/0_stateless/03267_join_swap_bug.sql |
77bf340 to
ffd1183
Compare
src/Core/Settings.cpp
Outdated
| For single JOIN in case of identifier ambiguity prefer left table | ||
| )", IMPORTANT) \ | ||
| \ | ||
| DECLARE(BoolAuto, query_plan_join_swap_table, {}, R"( |
There was a problem hiding this comment.
@devcrafter , is this name and description better?
There was a problem hiding this comment.
@vdimir Honestly, the setting looks weird. IMHO, the setting should just enable or disable the automatic mode to choose the table. But to use this setting for swapping tables in JOIN clause - looks weird - user should just rewrite the query itself.
There was a problem hiding this comment.
It's also useful for testing, as I want to ensure that any pipeline we build is valid and can be executed.
Another reason is that when the automatically inferred side is incorrect, and the user need an ad-hoc solution to specify the correct one (however, as you mentioned, rewriting is also an option and should work for most use cases).
But in ideal case the setting is used only in tests and rarely by user set to false to have legacy behavior.
0367fc6 to
d92383f
Compare
8afb0d0 to
b03f488
Compare
2d00ec4 to
e29fc6e
Compare
Conflict resolution did not go well |
|
|
Hi, I found a potential bug on this feature, and reported it two weeks ago. Just wanted to follow up and see if anyone has taken a look at this issue? |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
query_plan_join_swap_table, which can be set toauto. In this mode, ClickHouse will try to choose the table with the smallest number of rows.Close #71454, close #71507
Documentation entry for user-facing changes