Skip to content

Exclude partition key columns from SummingMergeTree #12173

Merged
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
nikitamikhaylov:summing-bug-fix
Jul 7, 2020
Merged

Exclude partition key columns from SummingMergeTree #12173
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
nikitamikhaylov:summing-bug-fix

Conversation

@nikitamikhaylov
Copy link
Member

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):
Fixed the behaviour when SummingMergeTree engine sums up columns from partition key. Added an exception in case of explicit definition of columns to sum which intersects with partition key columns. This fixes #7867

@blinkov blinkov added the pr-bugfix Pull request with bugfix, not backported by default label Jul 6, 2020
@alexey-milovidov alexey-milovidov self-assigned this Jul 6, 2020
case MergeTreeData::MergingParams::Summing:
return std::make_shared<SummingSortedTransform>(header, pipes.size(),
sort_description, data.merging_params.columns_to_sum, max_block_size);
sort_description, data.merging_params.columns_to_sum, partition_key_columns, max_block_size);
Copy link
Member

Choose a reason for hiding this comment

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

We also need a test with SELECT FINAL?

@alexey-milovidov alexey-milovidov merged commit ffdd6e1 into ClickHouse:master Jul 7, 2020
alexey-milovidov added a commit that referenced this pull request Jul 12, 2020
…40e62ee261882363efdceea5b60a3

Cherry pick #12173 to 20.5: Exclude partition key columns from SummingMergeTree
alexey-milovidov added a commit that referenced this pull request Jul 27, 2020
Backport #12173 to 20.5: Exclude partition key columns from SummingMergeTree
abyss7 added a commit that referenced this pull request Jul 31, 2020
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.

Discrepancy. SummingMergeTree sums partition key but does't update min_max

4 participants