mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-22 16:30:49 +00:00
28 lines
790 B
C++
28 lines
790 B
C++
|
#include <AggregateFunctions/AggregateFunctionFactory.h>
|
||
|
#include <AggregateFunctions/AggregateFunctionGroupArrayInsertAt.h>
|
||
|
#include <AggregateFunctions/Helpers.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
namespace
|
||
|
{
|
||
|
|
||
|
AggregateFunctionPtr createAggregateFunctionGroupArrayInsertAt(const std::string & name, const DataTypes & argument_types)
|
||
|
{
|
||
|
if (argument_types.size() != 2)
|
||
|
throw Exception("Incorrect number of arguments for aggregate function " + name + ", should be 2",
|
||
|
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
|
||
|
|
||
|
return std::make_shared<AggregateFunctionGroupArrayInsertAtGeneric>();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
void registerAggregateFunctionGroupArrayInsertAt(AggregateFunctionFactory & factory)
|
||
|
{
|
||
|
factory.registerFunction("groupArrayInsertAt", createAggregateFunctionGroupArrayInsertAt);
|
||
|
}
|
||
|
|
||
|
}
|