1#include <AggregateFunctions/AggregateFunctionFactory.h>
2#include <AggregateFunctions/AggregateFunctionCount.h>
3#include <AggregateFunctions/FactoryHelpers.h>
4#include "registerAggregateFunctions.h"
5
6
7namespace DB
8{
9
10namespace
11{
12
13AggregateFunctionPtr createAggregateFunctionCount(const std::string & name, const DataTypes & argument_types, const Array & parameters)
14{
15 assertNoParameters(name, parameters);
16 assertArityAtMost<1>(name, argument_types);
17
18 return std::make_shared<AggregateFunctionCount>(argument_types);
19}
20
21}
22
23void registerAggregateFunctionCount(AggregateFunctionFactory & factory)
24{
25 factory.registerFunction("count", createAggregateFunctionCount, AggregateFunctionFactory::CaseInsensitive);
26}
27
28}
29