```
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;
```
for (const auto & part : precommitted_parts)
            part->version.creation_csn.store(Tx::RolledBackCSN);
        auto lock = data.lockParts();
        if (data.data_parts_indexes.empty())
        {
            
            if (!data.all_data_dropped)
            {
                Strings part_names;
                for (const auto & part : precommitted_parts)
                    part_names.emplace_back(part->name);
                throw Exception(ErrorCodes::LOGICAL_ERROR, "There are some PreActive parts ({}) to rollback, "
                                "but data parts set is empty and table {} was not dropped. It's a bug",
                                fmt::join(part_names, ", "), data.getStorageID().getNameForLogs());
            }
        }
        else
        {
            data.removePartsFromWorkingSet(txn,
                DataPartsVector(precommitted_parts.begin(), precommitted_parts.end()),
                 true, &lock);
        }
    }
    clear();
}
void MergeTreeData::Transaction::clear()
{
    precommitted_parts.clear();
}
MergeTreeData::DataPartsVector MergeTreeData::Transaction::commit(MergeTreeData::DataPartsLock * acquired_parts_lock)