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

FINAL SAMPLE #7907

Merged
merged 6 commits into from Nov 26, 2019
Merged

FINAL SAMPLE #7907

merged 6 commits into from Nov 26, 2019

Conversation

KochetovNicolai
Copy link
Member

@KochetovNicolai KochetovNicolai commented Nov 25, 2019

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

Changelog category (leave one):

  • Improvement

Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):
Fix error Column ... already exists while using FINAL and SAMPLE together, e.g. select count() from table final sample 1/2. Fixes #5186
Detailed description (optional):
It happened because sample expression is a part of PK, and it was calculated twice if we use final.


/// We do spoil available_real_columns here, but it is not used later.
auto sampling_column_type = data.primary_key_sample.getByName(data.sampling_expr_column_name).type;
available_real_columns.emplace_back(data.sampling_expr_column_name, std::move(type));
Copy link
Member

Choose a reason for hiding this comment

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

A small typo.

@KochetovNicolai KochetovNicolai added the pr-improvement Pull request with some product improvements label Nov 25, 2019
@KochetovNicolai
Copy link
Member Author

[#CLICKHOUSE-1219]

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.

Column already exists with FINAL queries to distributed tables with max_parallel_replicas > 1
2 participants