#include #include #include namespace DB { namespace { AggregateFunctionPtr createAggregateFunctionGroupArray(const std::string & name, const DataTypes & argument_types) { if (argument_types.size() != 1) throw Exception("Incorrect number of arguments for aggregate function " + name, ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH); AggregateFunctionPtr res(createWithNumericType(*argument_types[0])); if (!res) res = std::make_shared(); return res; } } void registerAggregateFunctionGroupArray(AggregateFunctionFactory & factory) { factory.registerFunction("groupArray", createAggregateFunctionGroupArray); } }