ClickHouse/dbms/src/AggregateFunctions/AggregateFunctionGroupArrayInsertAt.cpp

28 lines
816 B
C++
Raw Normal View History

#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, const Array & parameters)
{
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);
}
}