Skip to content

Fix #23029#23359

Merged
KochetovNicolai merged 4 commits intomasterfrom
try-fix-23029
Apr 21, 2021
Merged

Fix #23029#23359
KochetovNicolai merged 4 commits intomasterfrom
try-fix-23029

Conversation

@KochetovNicolai
Copy link
Copy Markdown
Member

@KochetovNicolai KochetovNicolai commented Apr 20, 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 possible Block structure mismatch error for queries with UNION which could possibly happen after filter-push-down optimization. Fixes #23029

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Apr 20, 2021
const auto & cur = header.getByPosition(i).column;

/// Only remove const from common header if it is not const for current pipe.
if (cur && common && !isColumnConst(*cur))
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.

Can common be const?

Copy link
Copy Markdown
Member Author

@KochetovNicolai KochetovNicolai Apr 20, 2021

Choose a reason for hiding this comment

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

Yes, that's the point.
This code removes const from common header if in different pipes const is different for the same columns.

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.

So is is possible, that column in common header is const, columns in all pipes are const, but const columns contain different values?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For pipe this is not possible and separately checked.
For query plan, this is possible, and different constants are separately materialized.

@tavplubix tavplubix self-assigned this Apr 20, 2021
Add comment.
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.

Logical error: Block structure mismatch in QueryPipeline::unitePipelines stream: different columns

3 participants