New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix optimize_skip_unused_shards with JOINs #51037
Fix optimize_skip_unused_shards with JOINs #51037
Conversation
This is an automated comment for commit d9d8782 with description of existing statuses. It's updated for the latest CI running
|
af11df5
to
78de102
Compare
Can someone take a look please? |
Kind ping, looks like this got lost |
Test failures are not related (and they fail in upstream/master as well):
|
a333d92
to
f48b078
Compare
Tests have failed. |
@azat let's investigate and fix the unrelated tests. |
Ok, though it sometimes kind of a chicken and egg problem...
I will not look at analyzer tests for now. |
Actually the newly added test SIGSEGV server with analyzer, will take a look |
f48b078
to
3c303cc
Compare
Ok, for now I simply disabled it for analyzer, since there are lots of other tests that fails because of optimize_skip_unused_shards does not work with analyzer (actually not simply "it does not work" but instead it crashes the server). Will take a look separately into this. |
e66b7a6
to
bae2b4a
Compare
|
In case of JOIN query may contains conditions for other tables, while optimize_skip_unused_shards was pretty dumb and failed to skip such columns. Fix this by removing JOIN before applying this optimization. v2: restriction for analyzer v3: ignore 01940_custom_tld_sharding_key under analyzer Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> Co-Authored-By: Alexey Milovidov <milovidov@clickhouse.com>
56df1ea
to
20625d7
Compare
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix optimize_skip_unused_shards with JOINs (when the query contains some filters for the JOINed tables)
In case of JOIN query may contains conditions for other tables, while optimize_skip_unused_shards was pretty dumb and failed to skip such columns.
Fix this by removing JOIN before applying this optimization.
Fixes: #15995