mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 18:14:03 +00:00
Merge pull request #33852 from bharatnc/ncb/updates
updates to min2 and max2 funcs
This commit is contained in:
commit
1fd79e732b
@ -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>>;
|
||||
}
|
||||
|
||||
|
@ -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>>;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user