Skip to content

Fix remove TTL for column#18130

Merged
alesapin merged 3 commits intomasterfrom
fix_remove_column_ttl
Dec 16, 2020
Merged

Fix remove TTL for column#18130
alesapin merged 3 commits intomasterfrom
fix_remove_column_ttl

Conversation

@alesapin
Copy link
Copy Markdown
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):
Fix error when query MODIFY COLUMN ... REMOVE TTL doesn't actually remove column TTL.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Dec 16, 2020

/// Changes in columns may lead to changes in TTL expressions.
auto column_ttl_asts = metadata_copy.columns.getColumnTTLs();
metadata_copy.column_ttls_by_name.clear();
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.

The whole fix is here.

@alesapin
Copy link
Copy Markdown
Member Author

alesapin commented Dec 16, 2020

2020-12-16 11:09:07 01603_remove_column_ttl:                                                [ FAIL ] - result differs with reference:
2020-12-16 11:09:07 --- /ClickHouse/tests/queries/0_stateless/01603_remove_column_ttl.reference	2020-12-16 10:36:30.537843299 +0300
2020-12-16 11:09:07 +++ /ClickHouse/tests/queries/0_stateless/01603_remove_column_ttl.stdout	2020-12-16 11:09:07.768762806 +0300
2020-12-16 11:09:07 @@ -1,6 +1,6 @@
2020-12-16 11:09:07  1	32
2020-12-16 11:09:07 -2	0
2020-12-16 11:09:07 +2	45
2020-12-16 11:09:07  CREATE TABLE default.table_with_column_ttl\n(\n    `EventTime` DateTime,\n    `UserID` UInt64,\n    `Age` UInt8\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS index_granularity = 8192
2020-12-16 11:09:07  1	32
2020-12-16 11:09:07 -2	0
2020-12-16 11:09:07 +2	45
2020-12-16 11:09:07  3	27
2020-12-16 11:09:07 

How is it possible? Downloaded fastest binary and cannot reproduce...

@alesapin
Copy link
Copy Markdown
Member Author

Ok, integration test failures are known.

@alesapin alesapin merged commit a999850 into master Dec 16, 2020
@alesapin alesapin deleted the fix_remove_column_ttl branch December 16, 2020 19:05
alesapin added a commit that referenced this pull request Dec 24, 2020
Backport #18130 to 20.11: Fix remove TTL for column
alesapin added a commit that referenced this pull request Dec 24, 2020
Backport #18130 to 20.10: Fix remove TTL for column
alesapin added a commit that referenced this pull request Dec 24, 2020
Backport #18130 to 20.12: Fix remove TTL for column
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.

3 participants