```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
```
}
        if (part->getState() != DataPartState::Deleting)
            parts_to_remove.emplace_back(part);
    }
    removePartsFromWorkingSet(parts_to_remove, clear_without_timeout, lock);
    return parts_to_remove;
}
void MergeTreeData::forgetPartAndMoveToDetached(const MergeTreeData::DataPartPtr & part_to_detach, const String & prefix, bool restore_covered)
{
    if (prefix.empty())
        LOG_INFO(log, "Renaming {} to {} and forgetting it.", part_to_detach->relative_path, part_to_detach->name);
    else
        LOG_INFO(log, "Renaming {} to {}_{} and forgetting it.", part_to_detach->relative_path, prefix, part_to_detach->name);
    auto lock = lockParts();
    bool removed_active_part = false;
    bool restored_active_part = false;
    auto it_part = data_parts_by_info.find(part_to_detach->info);
    if (it_part == data_parts_by_info.end())
        throw Exception("No such data part " + part_to_detach->getNameWithState(), ErrorCodes::NO_SUCH_DATA_PART);
    
    DataPartPtr part = *it_part;
    if (part->getState() == DataPartState::Active)
    {
        removePartContributionToDataVolume(part);
        removePartContributionToColumnAndSecondaryIndexSizes(part);
        removed_active_part = true;
    }
    modifyPartState(it_part, DataPartState::Deleting);
    part->renameToDetached(prefix);
    data_parts_indexes.erase(it_part);