mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
70d1adfe4b
* save format string for NetException * format exceptions * format exceptions 2 * format exceptions 3 * format exceptions 4 * format exceptions 5 * format exceptions 6 * fix * format exceptions 7 * format exceptions 8 * Update MergeTreeIndexGin.cpp * Update AggregateFunctionMap.cpp * Update AggregateFunctionMap.cpp * fix
40 lines
1018 B
C++
40 lines
1018 B
C++
#include <AggregateFunctions/AggregateFunctionFactory.h>
|
|
#include <AggregateFunctions/AggregateFunctionRankCorrelation.h>
|
|
#include <AggregateFunctions/FactoryHelpers.h>
|
|
#include <AggregateFunctions/Helpers.h>
|
|
|
|
|
|
namespace ErrorCodes
|
|
{
|
|
extern const int NOT_IMPLEMENTED;
|
|
}
|
|
|
|
namespace DB
|
|
{
|
|
struct Settings;
|
|
|
|
namespace
|
|
{
|
|
|
|
AggregateFunctionPtr createAggregateFunctionRankCorrelation(
|
|
const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *)
|
|
{
|
|
assertBinary(name, argument_types);
|
|
assertNoParameters(name, parameters);
|
|
|
|
if (!isNumber(argument_types[0]) || !isNumber(argument_types[1]))
|
|
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Aggregate function {} only supports numerical types", name);
|
|
|
|
return std::make_shared<AggregateFunctionRankCorrelation>(argument_types);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
void registerAggregateFunctionRankCorrelation(AggregateFunctionFactory & factory)
|
|
{
|
|
factory.registerFunction("rankCorr", createAggregateFunctionRankCorrelation);
|
|
}
|
|
|
|
}
|