```
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;
```
disk_wal_parts.push_back(std::move(part));
                    }
                }
            });
        }
        pool.wait();
        MutableDataPartsVector parts_from_wal;
        for (auto & [_, disk_wal_parts] : disk_wal_part_map)
            parts_from_wal.insert(
                parts_from_wal.end(), std::make_move_iterator(disk_wal_parts.begin()), std::make_move_iterator(disk_wal_parts.end()));
        loadDataPartsFromWAL(duplicate_parts_to_remove, parts_from_wal);
        num_parts += parts_from_wal.size();
    }
    if (num_parts == 0)
    {
        resetObjectColumnsFromActiveParts(part_lock);
        LOG_DEBUG(log, "There are no data parts");
        return;
    }
    if (!is_static_storage)
    {
        for (auto & part : broken_parts_to_detach)
        {
            
            part->renameToDetached("broken-on-start");
        }
        for (auto & part : duplicate_parts_to_remove)
            part->remove();
    }
    auto deactivate_part = [&] (DataPartIteratorByStateAndInfo it)