mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 06:01:57 +00:00
30 lines
805 B
C++
30 lines
805 B
C++
#include <AggregateFunctions/AggregateFunctionFactory.h>
|
|
#include <AggregateFunctions/AggregateFunctionCount.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace
|
|
{
|
|
|
|
AggregateFunctionPtr createAggregateFunctionCount(const std::string & name, const DataTypes & argument_types, const Array & parameters)
|
|
{
|
|
return std::make_shared<AggregateFunctionCount>();
|
|
}
|
|
|
|
}
|
|
|
|
void registerAggregateFunctionCount(AggregateFunctionFactory & factory)
|
|
{
|
|
factory.registerFunction("count", createAggregateFunctionCount, AggregateFunctionFactory::CaseInsensitive);
|
|
}
|
|
|
|
AggregateFunctionPtr createAggregateFunctionCountNotNull(const DataTypes & argument_types)
|
|
{
|
|
if (argument_types.size() == 1)
|
|
return std::make_shared<AggregateFunctionCountNotNullUnary>();
|
|
return std::make_shared<AggregateFunctionCountNotNullVariadic>();
|
|
}
|
|
|
|
}
|