Better management of DateTime partitionning #3786 #3800
Better management of DateTime partitionning #3786 #3800alexey-milovidov merged 7 commits intoClickHouse:masterfrom
Conversation
Adding min_time and max_date in system.parts table
|
Missing functional test. Look at |
|
I think, the user will expect, that |
|
For the tests, I will take a look. |
|
For the other issue, I have a doubt. For my understanding, DateTime is timezone agnostic (it could be seen to any timezone, and still refer to the same instant). But Date is timezone dependant. So for converting a DateTime to Date, you need to specify a timezone. So here, which timezone could we use for converting the DateTime to Date ? The system timezone ? The user timezone ? Thanks, |
You're right, let leave it as is. |
|
I added some tests. Nevertheless, the result is a bit different of what i described in the issue. The column min_time and max_time are filled if the merge tree partitionning index contains a DateTime. It does not care about the merge tree sorting index. Since these two columns is defined for each partition, it seems more logical that they depend of the partitionning index. |
issue with reference file for tests
Stills issue on tests reference
issue with reference file for test it is due to partition naming that seems to have changed recently.
|
Ok. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Has discussed in the issue #3786, I added two columns called "min_time" and "max_time" in the system.parts table. They contain the min datetime and max datetime of the partition if the merge tree is using one and only datetime in the sorting index. Otherwise, these columns are equals to 0.