Skip to content

Fix prewhere with virtual columns#15756

Merged
alesapin merged 1 commit intoClickHouse:masterfrom
CurtizJ:fix-prewhere-with-virtuals
Oct 9, 2020
Merged

Fix prewhere with virtual columns#15756
alesapin merged 1 commit intoClickHouse:masterfrom
CurtizJ:fix-prewhere-with-virtuals

Conversation

@CurtizJ
Copy link
Copy Markdown
Member

@CurtizJ CurtizJ commented Oct 8, 2020

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 some cases of queries, in which only virtual columns are selected. Previously Not found column _nothing in block exception may be thrown. Fixes #12298.

Detailed description / Documentation draft:
Chunk with empty set of columns can appear in case, when only virtual columns are selected and column, which is used only for prewhere was dropped. Now it's ok to create such chunks with non-zero number of rows, as it will be done here. empty() method of chunk will return false, and since chunk has non-zero number of rows, virtual columns will be injected here

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Oct 8, 2020
@CurtizJ CurtizJ changed the title Fix prewhere with virtuals columns Fix prewhere with virtual columns Oct 8, 2020
@filimonov
Copy link
Copy Markdown
Contributor

Does it also fix #13993 ?

@CurtizJ
Copy link
Copy Markdown
Member Author

CurtizJ commented Oct 9, 2020

Does it also fix #13993 ?

No.

@alesapin alesapin self-assigned this Oct 9, 2020
@alesapin
Copy link
Copy Markdown
Member

alesapin commented Oct 9, 2020

Test failures don't seem to be related to changes.

@alesapin alesapin merged commit 35165c8 into ClickHouse:master Oct 9, 2020
CurtizJ added a commit that referenced this pull request Oct 11, 2020
Backport #15756 to 20.9: Fix prewhere with virtual columns
CurtizJ added a commit that referenced this pull request Oct 11, 2020
Backport #15756 to 20.7: Fix prewhere with virtual columns
CurtizJ added a commit that referenced this pull request Oct 11, 2020
Backport #15756 to 20.8: Fix prewhere with virtual columns
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.

group by _part: Not found column _nothing in block

4 participants