Skip to content

Add default database in join subquery for distributed - #36902

Closed
vdimir wants to merge 1 commit into
ClickHouse:masterfrom
vdimir:join_subquery_distributed_rewrite
Closed

vdimir wants to merge 1 commit into
ClickHouse:masterfrom
vdimir:join_subquery_distributed_rewrite

Conversation

@vdimir

@vdimir vdimir commented May 4, 2022

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

  • Fix table not found error for distributed queries with JOIN with subquery and non default current database.

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label May 4, 2022
@yakov-olkhovskiy yakov-olkhovskiy self-assigned this May 4, 2022
@yakov-olkhovskiy

Copy link
Copy Markdown
Member

@vdimir
vdimir marked this pull request as draft May 9, 2022 11:07

CREATE TABLE test_local (text String, text2 String) ENGINE = MergeTree() ORDER BY text;
CREATE TABLE test_distributed (text String, text2 String) ENGINE = Distributed('test_shard_localhost', currentDatabase(), test_local);
INSERT INTO test_distributed VALUES ('a', 'b');

@azat azat May 9, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the flakiness of the test:

Suggested change
INSERT INTO test_distributed VALUES ('a', 'b');
INSERT INTO test_distributed SETTINGS insert_distributed_sync=1 VALUES ('a', 'b');

@vdimir vdimir closed this May 27, 2022
@vdimir
vdimir deleted the join_subquery_distributed_rewrite branch May 27, 2022 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants