From 04a39317c18b3953cd57a9e469503dbfdd86b52d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 3 Jan 2022 21:39:04 +0300 Subject: [PATCH] Add check --- .../AggregateFunctionContingencyCoefficient.cpp | 6 +++++- src/AggregateFunctions/AggregateFunctionCramersV.cpp | 1 + .../AggregateFunctionCramersVBiasCorrected.cpp | 1 + src/AggregateFunctions/AggregateFunctionTheilsU.cpp | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/AggregateFunctions/AggregateFunctionContingencyCoefficient.cpp b/src/AggregateFunctions/AggregateFunctionContingencyCoefficient.cpp index 77510f361f9..fa35c134a73 100644 --- a/src/AggregateFunctions/AggregateFunctionContingencyCoefficient.cpp +++ b/src/AggregateFunctions/AggregateFunctionContingencyCoefficient.cpp @@ -13,7 +13,10 @@ namespace struct ContingencyData : CrossTabData { - static const char * getName() { return "contingency"; } + static const char * getName() + { + return "contingency"; + } Float64 getResult() const { @@ -41,6 +44,7 @@ void registerAggregateFunctionContingency(AggregateFunctionFactory & factory) factory.registerFunction(ContingencyData::getName(), [](const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *) { + assertBinary(name, argument_types); assertNoParameters(name, parameters); return std::make_shared>(argument_types); }); diff --git a/src/AggregateFunctions/AggregateFunctionCramersV.cpp b/src/AggregateFunctions/AggregateFunctionCramersV.cpp index 48dad648d24..de070236043 100644 --- a/src/AggregateFunctions/AggregateFunctionCramersV.cpp +++ b/src/AggregateFunctions/AggregateFunctionCramersV.cpp @@ -47,6 +47,7 @@ void registerAggregateFunctionCramersV(AggregateFunctionFactory & factory) factory.registerFunction(CramersVData::getName(), [](const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *) { + assertBinary(name, argument_types); assertNoParameters(name, parameters); return std::make_shared>(argument_types); }); diff --git a/src/AggregateFunctions/AggregateFunctionCramersVBiasCorrected.cpp b/src/AggregateFunctions/AggregateFunctionCramersVBiasCorrected.cpp index f4d06991fb9..df0fd774da7 100644 --- a/src/AggregateFunctions/AggregateFunctionCramersVBiasCorrected.cpp +++ b/src/AggregateFunctions/AggregateFunctionCramersVBiasCorrected.cpp @@ -50,6 +50,7 @@ void registerAggregateFunctionCramersVBiasCorrected(AggregateFunctionFactory & f factory.registerFunction(CramersVBiasCorrectedData::getName(), [](const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *) { + assertBinary(name, argument_types); assertNoParameters(name, parameters); return std::make_shared>(argument_types); }); diff --git a/src/AggregateFunctions/AggregateFunctionTheilsU.cpp b/src/AggregateFunctions/AggregateFunctionTheilsU.cpp index 02a9b0956b1..96772a0daa8 100644 --- a/src/AggregateFunctions/AggregateFunctionTheilsU.cpp +++ b/src/AggregateFunctions/AggregateFunctionTheilsU.cpp @@ -50,8 +50,9 @@ struct TheilsUData : CrossTabData void registerAggregateFunctionTheilsU(AggregateFunctionFactory & factory) { factory.registerFunction(TheilsUData::getName(), - [](const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *) + [](const std::string & name, const DataTypes & argument_types, const Array & parameters, const Settings *) { + assertBinary(name, argument_types); assertNoParameters(name, parameters); return std::make_shared>(argument_types); });