```
CREATE TABLE t (x UInt8, PROJECTION p (SELECT x GROUP BY x)) ENGINE = MergeTree ORDER BY ();
INSERT INTO t VALUES (0);

SET group_by_overflow_mode = 'any', max_rows_to_group_by = 1000, totals_mode = 'after_having_auto';
SELECT x FROM t GROUP BY x WITH TOTALS;
```
{
                    start_with_valid_prefix = true;
                    break;
                }
            }
            if (!start_with_valid_prefix)
                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))
                    {
                        LOG_WARNING(log, "{} is in use (by merge/mutation/INSERT) (consider increasing temporary_directories_lifetime setting)", full_path);
                        continue;
                    }
                    else
                    {
                        LOG_WARNING(log, "Removing temporary directory {}", full_path);
                        
                        
                        
                        
                        
                        bool keep_shared = false;
                        if (disk->supportZeroCopyReplication() && settings->allow_remote_fs_zero_copy_replication)
                        {
                            LOG_WARNING(log, "Since zero-copy replication is enabled we are not going to remove blobs from shared storage for {}", full_path);
                            keep_shared = true;