```
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;
```
auto get_inited_wal = [&] ()
        {
            if (!wal)
                wal = data.getWriteAheadLog();
            return wal;
        };
        if (settings->in_memory_parts_enable_wal)
            for (const auto & part : precommitted_parts)
                if (auto part_in_memory = asInMemoryPart(part))
                    get_inited_wal()->addPart(part_in_memory);
        NOEXCEPT_SCOPE({
            auto current_time = time(nullptr);
            size_t add_bytes = 0;
            size_t add_rows = 0;
            size_t add_parts = 0;
            size_t reduce_bytes = 0;
            size_t reduce_rows = 0;
            size_t reduce_parts = 0;
            for (const auto & part : precommitted_parts)
            {
                DataPartPtr covering_part;
                DataPartsVector covered_parts = data.getActivePartsToReplace(part->info, part->name, covering_part, *owing_parts_lock);
                if (covering_part)
                {
                    
                    
                    
                    if (part->info.level)
                        LOG_WARNING(data.log, "Tried to commit obsolete part {} covered by {}", part->name, covering_part->getNameWithState());
                    else