diff --git a/dbms/CMakeLists.txt b/dbms/CMakeLists.txt index 81fcf74a2995975b828e21c52a4a41fb27684f7e..c867352641ec7c7bfa560256cbb247d8ee20eae9 100644 --- a/dbms/CMakeLists.txt +++ b/dbms/CMakeLists.txt @@ -71,6 +71,7 @@ list (APPEND dbms_headers src/Functions/IFunction.h src/Functions/FunctionFactor list (APPEND dbms_sources src/AggregateFunctions/AggregateFunctionFactory.cpp + src/AggregateFunctions/FactoryHelpers.cpp src/AggregateFunctions/AggregateFunctionState.cpp src/AggregateFunctions/AggregateFunctionArray.cpp src/AggregateFunctions/AggregateFunctionNull.cpp @@ -84,6 +85,7 @@ list (APPEND dbms_sources list (APPEND dbms_headers src/AggregateFunctions/IAggregateFunction.h src/AggregateFunctions/AggregateFunctionFactory.h + src/AggregateFunctions/FactoryHelpers.h src/AggregateFunctions/AggregateFunctionState.h src/AggregateFunctions/AggregateFunctionArray.h src/AggregateFunctions/AggregateFunctionNull.h diff --git a/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp b/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp index 92bb52477b6af2b1665aff032d10bef5cf470c6e..5bd4af46bc9f0cf45d9f70a47909e9b51ec0d904 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp +++ b/dbms/src/AggregateFunctions/AggregateFunctionFactory.cpp @@ -42,7 +42,8 @@ AggregateFunctionPtr createAggregateFunctionForEach(AggregateFunctionPtr & neste AggregateFunctionPtr createAggregateFunctionIf(AggregateFunctionPtr & nested, const DataTypes & argument_types); AggregateFunctionPtr createAggregateFunctionState(AggregateFunctionPtr & nested, const DataTypes & argument_types, const Array & parameters); AggregateFunctionPtr createAggregateFunctionMerge(const String & name, AggregateFunctionPtr & nested, const DataTypes & argument_types); -AggregateFunctionPtr createAggregateFunctionNullUnary(AggregateFunctionPtr & nested, const DataTypes & argument_types); + +AggregateFunctionPtr createAggregateFunctionNullUnary(AggregateFunctionPtr & nested); AggregateFunctionPtr createAggregateFunctionNullVariadic(AggregateFunctionPtr & nested, const DataTypes & argument_types); AggregateFunctionPtr createAggregateFunctionCountNotNull(const String & name, const DataTypes & argument_types, const Array & parameters); AggregateFunctionPtr createAggregateFunctionNothing(); @@ -120,7 +121,7 @@ AggregateFunctionPtr AggregateFunctionFactory::get( } if (argument_types.size() == 1) - return createAggregateFunctionNullUnary(nested_function, argument_types); + return createAggregateFunctionNullUnary(nested_function); else return createAggregateFunctionNullVariadic(nested_function, argument_types); } diff --git a/dbms/src/AggregateFunctions/AggregateFunctionQuantile.cpp b/dbms/src/AggregateFunctions/AggregateFunctionQuantile.cpp index 2c78b302094c6cc5c743b26ca706128dac89a485..ebb1be2d38cef457eceb15ff9bc31def8a82a525 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionQuantile.cpp +++ b/dbms/src/AggregateFunctions/AggregateFunctionQuantile.cpp @@ -36,7 +36,7 @@ namespace M(Float64) -template