Merge pull request #33852 from bharatnc/ncb/updates

updates to min2 and max2 funcs
This commit is contained in:
Maksim Kita 2022-01-21 11:37:13 +01:00 committed by GitHub
commit 1fd79e732b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 15 deletions

View File

@ -1,17 +1,21 @@
#include <Functions/FunctionMathBinaryFloat64.h>
#include <Functions/FunctionFactory.h>
template <typename T>
T max(T a, T b)
{
return a > b ? a : b;
}
#include <Functions/FunctionMathBinaryFloat64.h>
namespace DB
{
namespace
{
struct Max2Name { static constexpr auto name = "max2"; };
struct Max2Name
{
static constexpr auto name = "max2";
};
template <typename T>
T max(T a, T b)
{
return a > b ? a : b;
}
using FunctionMax2 = FunctionMathBinaryFloat64<BinaryFunctionVectorized<Max2Name, max>>;
}

View File

@ -1,17 +1,22 @@
#include <Functions/FunctionMathBinaryFloat64.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionMathBinaryFloat64.h>
template <typename T>
T min(T a, T b)
{
return a < b ? a : b;
}
namespace DB
{
namespace
{
struct Min2Name { static constexpr auto name = "min2"; };
struct Min2Name
{
static constexpr auto name = "min2";
};
template <typename T>
T min(T a, T b)
{
return a < b ? a : b;
}
using FunctionMin2 = FunctionMathBinaryFloat64<BinaryFunctionVectorized<Min2Name, min>>;
}