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 | |
8 | namespace DB |
9 | { |
10 | |
11 | namespace |
12 | { |
13 | |
14 | AggregateFunctionPtr 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 | |
26 | void registerAggregateFunctionGroupArrayInsertAt(AggregateFunctionFactory & factory) |
27 | { |
28 | factory.registerFunction("groupArrayInsertAt", createAggregateFunctionGroupArrayInsertAt); |
29 | } |
30 | |
31 | } |
32 |