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
Added move_ttl_info
to system.parts
#10591
Added move_ttl_info
to system.parts
#10591
Conversation
{"hash_of_uncompressed_files", std::make_shared<DataTypeString>()}, | ||
{"uncompressed_hash_of_compressed_files", std::make_shared<DataTypeString>()}, | ||
|
||
{"move_ttl_info", std::make_shared<DataTypeArray>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what with basic ttl info (for deletion)?
Проблема 1 - как показать move_ttl. Варианты - массив туплов (не self-desctibing) или Nested (не всегда удобный, self-describing, используется в разных местах - например system.query_log.ProfileEvents) Проблема 2 - как показать ttl для части. Мне кажется просто 2 колонки (ttl_min / ttl_max) в system.parts Проблема 3 - как показать ttl для колонки внутри части. Мне кажется просто 2 колонки (ttl_min / ttl_max) в system.parts_columns Nested - это по сути несколько массивов с одинаковым префиксом. Типа Можно вынести это на обсуждение. Но порефакторить это потом будет никак. Как только люди начнут этим пользоваться - нужно будет чтоб структура была всегда такая иначе проблемы с обратной совместимостью. |
Agree, but it is probably sufficient to have two columns, not 3: move_ttl_info.name Array(String), |
For table TTLs we already have: TTL expr MOVE and there are upcoming TTL expr DELETE WHERE cond Now suppose we will allow multiple table TTLs. And we should not limit this new info for TTL MOVE, because it is rarely used feature that is still in experimental stage (see https://github.com/ClickHouse/ClickHouse/pulls/excitoon). |
|
It's Ok to add info about MOVE TTL but only after we will already have info about ordinary TTL. |
@alexey-milovidov Historically, there is no expression stored in part for DELETE TTL. If I merge move and delete TTLs into one array, what should I output for delete TTL as an expression? |
I don't understand why expression is stored for move ttl but not for delete ttl? |
It was not used originally, and i think @excitoon kept it as is for backward compatibility. Otherwise older version will not be able to read ttl for parts created in a newer version (and not sure how it will fail, as the quite simple and stupid parser is used).
If there are (let's say) 3 ttl move rules it's hard to distinguish them otherwise. So for such ttl rules:
it writes smth like
I'm don't understand the first case - what is the difference with existing TTL delete? |
Regarding the usability:
Ie.
is much clearer than
|
Ok. BTW, why delete ttl is Array? If we can only have one delete TTL for table, let's make it simple. |
I see that this is just a mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
But there is no test for this feature :( |
There is |
Also, we wanted to have something like |
I have same question as @vzakaznikov asks. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added
move_ttl_info
tosystem.parts
in order to provide introspection of move TTL functionality.