```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
```
sample_block.insertUnique(column);
            sample_block_for_keys.insertUnique(column);
        }
        /
        auto attach_aggregation_in_order_info = [&]()
        {
            for (const auto & key : keys)
            {
                auto actions_dag = analysis_result.before_aggregation->clone();
                actions_dag->foldActionsByProjection({key}, sample_block_for_keys);
                candidate.group_by_elements_actions.emplace_back(std::make_shared<ExpressionActions>(actions_dag, actions_settings));
                candidate.group_by_elements_order_descr.emplace_back(key, 1, 1);
            }
        };
        if (projection.type == ProjectionDescription::Type::Aggregate && analysis_result.need_aggregate && can_use_aggregate_projection)
        {
            bool match = true;
            Block aggregates;
            /
            for (const auto & aggregate : select.getQueryAnalyzer()->aggregates())
            {
                const auto * column = sample_block.findByName(aggregate.column_name);
                if (column)
                    aggregates.insert(*column);
                else
                {
                    match = false;
                    break;
                }
            }