diff --git a/src/AggregateFunctions/AggregateFunctionMax.cpp b/src/AggregateFunctions/AggregateFunctionMax.cpp index 2577c932592..e9cd651b8db 100644 --- a/src/AggregateFunctions/AggregateFunctionMax.cpp +++ b/src/AggregateFunctions/AggregateFunctionMax.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include namespace DB @@ -74,7 +75,7 @@ void AggregateFunctionsSingleValueMax::addBatchSinglePlace( Arena * arena, ssize_t if_argument_pos) const { - if constexpr (!std::is_same_v || !std::is_same_v) + if constexpr (!is_any_of) { /// Leave other numeric types (large integers, decimals, etc) to keep doing the comparison as it's /// faster than doing a permutation @@ -169,7 +170,7 @@ void AggregateFunctionsSingleValueMax::addBatchSinglePlaceNotNull( Arena * arena, ssize_t if_argument_pos) const { - if constexpr (!std::is_same_v || !std::is_same_v) + if constexpr (!is_any_of) { /// Leave other numeric types (large integers, decimals, etc) to keep doing the comparison as it's /// faster than doing a permutation diff --git a/src/AggregateFunctions/AggregateFunctionMin.cpp b/src/AggregateFunctions/AggregateFunctionMin.cpp index 701101e7207..d767bd5c563 100644 --- a/src/AggregateFunctions/AggregateFunctionMin.cpp +++ b/src/AggregateFunctions/AggregateFunctionMin.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include @@ -75,7 +76,7 @@ void AggregateFunctionsSingleValueMin::addBatchSinglePlace( Arena * arena, ssize_t if_argument_pos) const { - if constexpr (!std::is_same_v || !std::is_same_v) + if constexpr (!is_any_of) { /// Leave other numeric types (large integers, decimals, etc) to keep doing the comparison as it's /// faster than doing a permutation @@ -170,7 +171,7 @@ void AggregateFunctionsSingleValueMin::addBatchSinglePlaceNotNull( Arena * arena, ssize_t if_argument_pos) const { - if constexpr (!std::is_same_v || !std::is_same_v) + if constexpr (!is_any_of) { /// Leave other numeric types (large integers, decimals, etc) to keep doing the comparison as it's /// faster than doing a permutation diff --git a/src/AggregateFunctions/AggregateFunctionMinMaxAny.h b/src/AggregateFunctions/AggregateFunctionMinMaxAny.h index b69a0b100a3..dec70861543 100644 --- a/src/AggregateFunctions/AggregateFunctionMinMaxAny.h +++ b/src/AggregateFunctions/AggregateFunctionMinMaxAny.h @@ -965,6 +965,7 @@ template struct AggregateFunctionMinData : Data { using Self = AggregateFunctionMinData; + using Impl = Data; bool changeIfBetter(const IColumn & column, size_t row_num, Arena * arena) { return this->changeIfLess(column, row_num, arena); } bool changeIfBetter(const Self & to, Arena * arena) { return this->changeIfLess(to, arena); } @@ -993,6 +994,7 @@ template struct AggregateFunctionMaxData : Data { using Self = AggregateFunctionMaxData; + using Impl = Data; bool changeIfBetter(const IColumn & column, size_t row_num, Arena * arena) { return this->changeIfGreater(column, row_num, arena); } bool changeIfBetter(const Self & to, Arena * arena) { return this->changeIfGreater(to, arena); }