```
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;
```
{
    LOG_TRACE(log, "dropIfEmpty");
    auto lock = lockParts();
    if (!data_parts_by_info.empty())
        return;
    try
    {
        for (const auto & disk : getDisks())
        {
            if (disk->isBroken())
                continue;
            
            disk->removeFileIfExists(fs::path(relative_data_path) / MergeTreeData::FORMAT_VERSION_FILE_NAME);
            disk->removeDirectory(fs::path(relative_data_path) / MergeTreeData::DETACHED_DIR_NAME);
            disk->removeDirectory(relative_data_path);
        }
    }
    catch (...)
    {
        
        tryLogCurrentException(__PRETTY_FUNCTION__);
    }
}
namespace
{
bool isSafeForKeyConversion(const IDataType * from, const IDataType * to)