aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/AggregateFunctions/AggregateFunctionThirdMoment.cpp
blob: 78e4d6fe502539f1255004d42ba6f8b5fa5ad69e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/AggregateFunctionStatisticsSimple.h>


namespace DB
{

template <typename T> using AggregateFunctionThirdMoment = AggregateFunctionVarianceSimple<StatFuncOneArg<T, 3>>;

void registerAggregateFunctionsStatisticsThirdMoment(AggregateFunctionFactory & factory)
{
    factory.registerFunction("skewSamp", createAggregateFunctionStatisticsUnary<AggregateFunctionThirdMoment, StatisticsFunctionKind::skewSamp>);
    factory.registerFunction("skewPop", createAggregateFunctionStatisticsUnary<AggregateFunctionThirdMoment, StatisticsFunctionKind::skewPop>);
}

}