mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
#include <AggregateFunctions/AggregateFunctionCombinatorFactory.h>
|
|
#include <AggregateFunctions/AggregateFunctionSimpleState.h>
|
|
|
|
namespace DB
|
|
{
|
|
struct Settings;
|
|
namespace
|
|
{
|
|
class AggregateFunctionCombinatorSimpleState final : public IAggregateFunctionCombinator
|
|
{
|
|
public:
|
|
String getName() const override { return "SimpleState"; }
|
|
|
|
DataTypes transformArguments(const DataTypes & arguments) const override { return arguments; }
|
|
|
|
AggregateFunctionPtr transformAggregateFunction(
|
|
const AggregateFunctionPtr & nested_function,
|
|
const AggregateFunctionProperties &,
|
|
const DataTypes & arguments,
|
|
const Array & params) const override
|
|
{
|
|
return std::make_shared<AggregateFunctionSimpleState>(nested_function, arguments, params);
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
void registerAggregateFunctionCombinatorSimpleState(AggregateFunctionCombinatorFactory & factory)
|
|
{
|
|
factory.registerCombinator(std::make_shared<AggregateFunctionCombinatorSimpleState>());
|
|
}
|
|
|
|
}
|