```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
```
{
    
    std::unique_lock lock(clear_old_temporary_directories_mutex, std::defer_lock);
    if (!lock.try_lock())
        return 0;
    const auto settings = getSettings();
    time_t current_time = time(nullptr);
    ssize_t deadline = current_time - custom_directories_lifetime_seconds;
    size_t cleared_count = 0;
    
    for (const auto & disk : getDisks())
    {
        if (disk->isBroken())
            continue;
        for (auto it = disk->iterateDirectory(relative_data_path); it->isValid(); it->next())
        {
            const std::string & basename = it->name();
            if (!startsWith(basename, "tmp_"))
            {
                continue;
            }
            const std::string & full_path = fullPath(disk, it->path());
            try
            {
                if (disk->isDirectory(it->path()) && isOldPartDirectory(disk, it->path(), deadline))
                {
                    if (temporary_parts.contains(basename))
                    {