ClickHouse/dbms/AggregateFunctions/AggregateFunctionCount.cpp

29 lines
725 B
C++
Raw Normal View History

#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/AggregateFunctionCount.h>
#include <AggregateFunctions/FactoryHelpers.h>
2019-12-15 06:34:43 +00:00
#include "registerAggregateFunctions.h"
2015-09-24 12:40:36 +00:00
namespace DB
{
namespace
{
2019-02-11 19:26:32 +00:00
AggregateFunctionPtr createAggregateFunctionCount(const std::string & name, const DataTypes & argument_types, const Array & parameters)
2015-09-24 12:40:36 +00:00
{
assertNoParameters(name, parameters);
2019-10-12 15:15:16 +00:00
assertArityAtMost<1>(name, argument_types);
2019-02-11 19:26:32 +00:00
return std::make_shared<AggregateFunctionCount>(argument_types);
2015-09-24 12:40:36 +00:00
}
}
void registerAggregateFunctionCount(AggregateFunctionFactory & factory)
{
factory.registerFunction("count", createAggregateFunctionCount, AggregateFunctionFactory::CaseInsensitive);
2015-09-24 12:40:36 +00:00
}
}