```sql

create table A ( A date) Engine=MergeTree order by A TTL A+interval 1 year;

alter table A reset SETTING TTL;

show create table A;

CREATE TABLE default.A
(
    `A` Date
)
ENGINE = MergeTree
ORDER BY A
TTL A + toIntervalYear(1)
SETTINGS index_granularity = 8192
```
size_t pos = 0;
        for (size_t i : metadata_snapshot->minmax_count_projection->partition_value_indices)
        {
            if (i >= part->partition.value.size())
                throw Exception("Partition value index is out of boundary. It's a bug", ErrorCodes::LOGICAL_ERROR);
            partition_minmax_count_columns[pos++]->insert(part->partition.value[i]);
        }
        size_t minmax_idx_size = part->minmax_idx->hyperrectangle.size();
        for (size_t i = 0; i < minmax_idx_size; ++i)
        {
            auto & min_column = assert_cast<ColumnAggregateFunction &>(*partition_minmax_count_columns[pos++]);
            auto & max_column = assert_cast<ColumnAggregateFunction &>(*partition_minmax_count_columns[pos++]);
            const auto & range = part->minmax_idx->hyperrectangle[i];
            insert(min_column, range.left);
            insert(max_column, range.right);
        }
        if (!primary_key_max_column_name.empty())
        {
            const auto & primary_key_column = *part->index[0];
            auto & min_column = assert_cast<ColumnAggregateFunction &>(*partition_minmax_count_columns[pos++]);
            auto & max_column = assert_cast<ColumnAggregateFunction &>(*partition_minmax_count_columns[pos++]);
            insert(min_column, primary_key_column[0]);
            insert(max_column, primary_key_column[primary_key_column.size() - 1]);
        }
        {
            auto & column = assert_cast<ColumnAggregateFunction &>(*partition_minmax_count_columns.back());
            auto func = column.getAggregateFunction();
            Arena & arena = column.createOrGetArena();
            size_t size_of_state = func->sizeOfData();
            size_t align_of_state = func->alignOfData();