Repository navigation
Fix wrong database for JOIN w/o explicit database in distributed queries - #33611
Merged
Merged
Conversation
azat
force-pushed
the
dist-current-database
branch
2 times, most recently
from
January 13, 2022 18:49
ee09ad6 to
d0ea3c7
Compare
azat
marked this pull request as draft
January 13, 2022 19:27
Signed-off-by: Azat Khuzhin <[email protected]>
This will fix rewriting of distributed queries with GLOBAL IN v2: get external tables only for non-global context Signed-off-by: Azat Khuzhin <[email protected]>
Signed-off-by: Azat Khuzhin <[email protected]>
…ueries This should fix JOIN w/o explicit database. v2: rewrite only JOIN section, since there is old behavior that relies on default_database for IN section, see [1]: - 01487_distributed_in_not_default_db - 01152_cross_replication [1]: https://s3.amazonaws.com/clickhouse-test-reports/33611/d0ea3c76fa51131171b1825939680867eb1c04da/fast_test__actions_.html Signed-off-by: Azat Khuzhin <[email protected]>
azat
force-pushed
the
dist-current-database
branch
from
January 14, 2022 08:24
d0ea3c7 to
c341b3b
Compare
azat
marked this pull request as ready for review
January 14, 2022 08:24
vdimir
approved these changes
Jan 14, 2022
| if (identifier.compound()) | ||
| return; | ||
| /// There is temporary table with such name, should not be rewritten. | ||
| if (external_tables.count(identifier.shortName())) |
Member
There was a problem hiding this comment.
Suggested change
| if (external_tables.count(identifier.shortName())) | |
| if (external_tables.contains(identifier.shortName())) |
Member
Author
There was a problem hiding this comment.
Indeed, looks better, the reason I prefer to use count over contains is that before I have to remember about arcadia built that has pretty limited c++20 support, and contains wasn't supported, but anyway this is not relevant anymore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix wrong database for JOIN w/o explicit database in distributed queries (Fixes: #10471)