blob: f031530edf5146f892233d525fd7355816dc8707 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionMathBinaryFloat64.h>
namespace DB
{
namespace
{
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>>;
}
REGISTER_FUNCTION(Min2)
{
factory.registerFunction<FunctionMin2>({}, FunctionFactory::CaseInsensitive);
}
}
|