1#include <AggregateFunctions/AggregateFunctionFactory.h>
2#include <AggregateFunctions/AggregateFunctionGroupArrayInsertAt.h>
3#include <AggregateFunctions/Helpers.h>
4#include <AggregateFunctions/FactoryHelpers.h>
5#include "registerAggregateFunctions.h"
6
7
8namespace DB
9{
10
11namespace
12{
13
14AggregateFunctionPtr createAggregateFunctionGroupArrayInsertAt(const std::string & name, const DataTypes & argument_types, const Array & parameters)
15{
16 assertBinary(name, argument_types);
17
18 if (argument_types.size() != 2)
19 throw Exception("Aggregate function groupArrayInsertAt requires two arguments.", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
20
21 return std::make_shared<AggregateFunctionGroupArrayInsertAtGeneric>(argument_types, parameters);
22}
23
24}
25
26void registerAggregateFunctionGroupArrayInsertAt(AggregateFunctionFactory & factory)
27{
28 factory.registerFunction("groupArrayInsertAt", createAggregateFunctionGroupArrayInsertAt);
29}
30
31}
32