```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
```
{
    return getMaxPartsCountForPartitionWithState(DataPartState::Active);
}
size_t MergeTreeData::getMaxInactivePartsCountForPartition() const
{
    return getMaxPartsCountForPartitionWithState(DataPartState::Outdated);
}
std::optional<Int64> MergeTreeData::getMinPartDataVersion() const
{
    auto lock = lockParts();
    std::optional<Int64> result;
    for (const auto & part : getDataPartsStateRange(DataPartState::Active))
    {
        if (!result || *result > part->info.getDataVersion())
            result = part->info.getDataVersion();
    }
    return result;
}
void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until) const