Skip to content
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

Enable predicate push-down optimization by default. #4846

Merged
merged 15 commits into from
Apr 18, 2019

Conversation

abyss7
Copy link
Contributor

@abyss7 abyss7 commented Mar 29, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

For changelog. Remove if this is non-significant change.

Category (leave one):

  • Improvement

Short description (up to few sentences):

Disable push-down to right table in left join, left table in right join, and both tables in full join.

Detailed description:

The current implementation of push-down has a bug in cases like:
SELECT a, b FROM (SELECT 1 AS a) ANY LEFT JOIN (SELECT 1 AS a, 1 AS b) USING (a) WHERE b = 0

It can't be fixed on syntax level, so in the future we have to move this optimization deeper into execution stack.

@abyss7 abyss7 force-pushed the enable-pushdown-optimization branch from 5ad6908 to f377ad3 Compare April 2, 2019 14:48
@abyss7 abyss7 closed this Apr 2, 2019
@abyss7 abyss7 reopened this Apr 2, 2019
@abyss7 abyss7 marked this pull request as ready for review April 10, 2019 15:29
@abyss7 abyss7 requested a review from 4ertus2 April 10, 2019 15:29
@abyss7 abyss7 added the pr-improvement Pull request with some product improvements label Apr 10, 2019
@abyss7 abyss7 requested a review from 4ertus2 April 12, 2019 16:09
@abyss7
Copy link
Contributor Author

abyss7 commented Apr 15, 2019

@alexey-milovidov I don't see any differences in the PVS report, that you mentioned earlier in Telegram Chat. Can you point out what new errors/warnings were introduced in this PR?

@abyss7 abyss7 requested review from KochetovNicolai and removed request for 4ertus2 April 17, 2019 11:33
///
/// SELECT a, b FROM (SELECT 1 AS a) ANY LEFT JOIN (SELECT 1 AS a, 1 AS b WHERE b = 0) USING (a) WHERE b = 0
///
/// That leads to the empty result in the right subquery and changes the whole outcome to (1, 0) or (1, NULL).
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Are we going to move the entire predicate optimization onto the execution stack in the future ? and how do we do that ? Maybe I can get on with this work?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we are going to do it after "Processors" will be ready #4914
And we will be happy to have your help!

@alexey-milovidov
Copy link
Member

I don't see any differences in the PVS report, that you mentioned earlier in Telegram Chat. Can you point out what new errors/warnings were introduced in this PR?

There is no difference in PVS report for now.

@alexey-milovidov
Copy link
Member

00933_ttl_simple in tsan - TODO @alesapin

@abyss7 abyss7 merged commit 118bea2 into ClickHouse:master Apr 18, 2019
@abyss7 abyss7 deleted the enable-pushdown-optimization branch April 18, 2019 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants