mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 20:32:43 +00:00
28 lines
745 B
C++
28 lines
745 B
C++
#include <AggregateFunctions/AggregateFunctionFactory.h>
|
|
#include <AggregateFunctions/AggregateFunctionCount.h>
|
|
#include <AggregateFunctions/FactoryHelpers.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace
|
|
{
|
|
|
|
AggregateFunctionPtr createAggregateFunctionCount(const std::string & name, const DataTypes & argument_types, const Array & parameters)
|
|
{
|
|
assertNoParameters(name, parameters);
|
|
|
|
/// 'count' accept any number of arguments and (in this case of non-Nullable types) simply ignore them.
|
|
return std::make_shared<AggregateFunctionCount>(argument_types);
|
|
}
|
|
|
|
}
|
|
|
|
void registerAggregateFunctionCount(AggregateFunctionFactory & factory)
|
|
{
|
|
factory.registerFunction("count", createAggregateFunctionCount, AggregateFunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
}
|