Skip to content

Fix lost WHERE condition in expression-push-down optimization of query plan#25370

Merged
KochetovNicolai merged 3 commits intomasterfrom
disable-query_plan_filter_push_down-because-of-25368
Jun 17, 2021
Merged

Fix lost WHERE condition in expression-push-down optimization of query plan#25370
KochetovNicolai merged 3 commits intomasterfrom
disable-query_plan_filter_push_down-because-of-25368

Conversation

@KochetovNicolai
Copy link
Copy Markdown
Member

@KochetovNicolai KochetovNicolai commented Jun 16, 2021

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

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix lost WHERE condition in expression-push-down optimization of query plan (setting query_plan_filter_push_down = 1 by default). Fixes #25368

@robot-clickhouse robot-clickhouse added doc-alert pr-feature Pull request with new product feature labels Jun 16, 2021
@robot-clickhouse robot-clickhouse added pr-bugfix Pull request with bugfix, not backported by default and removed pr-feature Pull request with new product feature labels Jun 16, 2021
@KochetovNicolai KochetovNicolai changed the title Disable query_plan_filter_push_down. Fix lost WHERE condition in expression-push-down optimization of query plan Jun 17, 2021
@alexey-milovidov alexey-milovidov self-assigned this Jun 17, 2021

INSERT INTO test VALUES (1,0,1),(1,0,2),(1,0,3),(1,0,4),(1,0,5),(1,0,6),(1,1,7),(0,0,7);

set query_plan_filter_push_down = true;
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.

Never thought that it works (true).

if (cur.node->type != ActionsDAG::ActionType::ARRAY_JOIN && cur.node->type != ActionsDAG::ActionType::INPUT)
allowed_nodes.emplace(cur.node);
}
else if (is_conjunction)
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.

Maybe add some comments?

@KochetovNicolai
Copy link
Copy Markdown
Member Author

Failed integration tests are known.
Do not wait for tests because only comment was added.

@KochetovNicolai KochetovNicolai merged commit 669b8a8 into master Jun 17, 2021
@KochetovNicolai KochetovNicolai deleted the disable-query_plan_filter_push_down-because-of-25368 branch June 17, 2021 20:07
robot-clickhouse pushed a commit that referenced this pull request Jun 18, 2021
KochetovNicolai added a commit that referenced this pull request Jun 18, 2021
Backport #25370 to 21.6: Fix lost WHERE condition in expression-push-down optimization of query plan
robot-clickhouse pushed a commit that referenced this pull request Jun 18, 2021
robot-clickhouse pushed a commit that referenced this pull request Jun 18, 2021
vitlibar pushed a commit that referenced this pull request Jun 21, 2021
Backport #25370 to 21.5: Fix lost WHERE condition in expression-push-down optimization of query plan
vitlibar pushed a commit that referenced this pull request Jun 22, 2021
Backport #25370 to 21.3: Fix lost WHERE condition in expression-push-down optimization of query plan
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.

Incorrect results (ignoring WHERE) when using JOIN combined with NOT IN

3 participants