aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Interpreters/AggregationUtils.h
blob: cc37cec0a6935258eadb5b40addf601a9ac1f030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

#include <Interpreters/Aggregator.h>

namespace DB
{

struct OutputBlockColumns
{
    MutableColumns key_columns;
    std::vector<IColumn *> raw_key_columns;
    MutableColumns aggregate_columns;
    MutableColumns final_aggregate_columns;
    Aggregator::AggregateColumnsData aggregate_columns_data;
};


OutputBlockColumns prepareOutputBlockColumns(
    const Aggregator::Params & params,
    const Aggregator::AggregateFunctionsPlainPtrs & aggregate_functions,
    const Block & res_header,
    Arenas & aggregates_pools,
    bool final,
    size_t rows);

Block finalizeBlock(const Aggregator::Params & params, const Block & res_header, OutputBlockColumns && out_cols, bool final, size_t rows);
}