Skip to content

Fix Merge(Distributed()) with JOIN#16993

Merged
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
azat:merge-distributed-join-fix
Nov 23, 2020
Merged

Fix Merge(Distributed()) with JOIN#16993
alexey-milovidov merged 4 commits intoClickHouse:masterfrom
azat:merge-distributed-join-fix

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Nov 13, 2020

Changelog category (leave one):

  • Bug Fix

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

Fixes: #11755
Refs: #15242
Broken-since: 20.3+ (looks like it had been introduced in #9035)

HEAD:

Details
  • d1f52dc72d417580c4088cf3880593176416bea2

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Nov 13, 2020
@azat
Copy link
Copy Markdown
Member Author

azat commented Nov 14, 2020

Functional stateless tests (ubsan) — fail: 1, passed: 2440, skipped: 9

2020-11-14 03:24:48 01247_optimize_distributed_group_by_sharding_key:                       [ FAIL ] 0.34 sec. - return code 101
2020-11-14 03:24:48 Received exception from server (version 20.12.1):
2020-11-14 03:24:48 Code: 101. DB::Exception: Received from localhost:9000. DB::Exception: Received from 127.0.0.2:9000. DB::Exception: Unexpected packet Data received from client. 

Not related, but interesting, I will take a look

@azat
Copy link
Copy Markdown
Member Author

azat commented Nov 15, 2020

Cc @4ertus2

@azat azat marked this pull request as draft November 15, 2020 10:48
@azat azat marked this pull request as ready for review November 15, 2020 19:57
@azat azat force-pushed the merge-distributed-join-fix branch from d1f52dc to 5297417 Compare November 19, 2020 21:07
@alexey-milovidov alexey-milovidov self-assigned this Nov 23, 2020
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

Ok.

The logic is too complicated.
I strongly don't recommend to use Merge over Distributed.

Prefer Distributed over Merge whenever possible.

PS. Do I understand correctly, that it simply defies the purpose of GLOBAL JOIN? So, data won't be sent to remote servers for joining...

@azat
Copy link
Copy Markdown
Member Author

azat commented Nov 23, 2020

The logic is too complicated.
I strongly not recommend to use Merge over Distributed.

Indeed (this use case looks really doubtful)

PS. Do I understand correctly, that it simply defies the purpose of GLOBAL JOIN? So, data won't be sent to remote servers for joining...

Kind of, but temporary table will be still created and sent to the remote, while this should not happen.

@ibeleychev
Copy link
Copy Markdown

ibeleychev commented Nov 24, 2021

Hello guys, I see, that you backported that bug fix into version version 20.9
But we still get missing columns exceptions with versions 20.9.7.11
I ran queries like in test file in that PR and got exceptions.

@SaltTan
Copy link
Copy Markdown
Contributor

SaltTan commented Nov 28, 2021

Hello guys, I see, that you backported that bug fix into version version 20.9 But we still get missing columns exceptions with versions 20.9.7.11 I ran queries like in test file in that PR and got exceptions.

The fix was not backported.
The backport PRs are Closed, not Merged.

@ibeleychev
Copy link
Copy Markdown

@SaltTan Thank you for explanation. Do not you know they want to backport it?

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.

Distributed JOIN over engine Merge fails with 'Missing columns' errors

6 participants