```
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;
```
{
        PrewhereInfoPtr prewhere_info = std::make_shared<PrewhereInfo>();
        if (row_level_filter)
            prewhere_info->row_level_filter = row_level_filter->clone();
        if (prewhere_actions)
            prewhere_info->prewhere_actions = prewhere_actions->clone();
        prewhere_info->row_level_column_name = row_level_column_name;
        prewhere_info->prewhere_column_name = prewhere_column_name;
        prewhere_info->remove_prewhere_column = remove_prewhere_column;
        prewhere_info->need_filter = need_filter;
        return prewhere_info;
    }
};
struct FilterInfo
{
    ExpressionActionsPtr alias_actions;
    ExpressionActionsPtr actions;
    String column_name;
    bool do_remove_column = false;
};
struct FilterDAGInfo
{
    ActionsDAGPtr actions;
    String column_name;
    bool do_remove_column = false;
    std::string dump() const;
};
struct InputOrderInfo
{