mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
dbms: rename isNan to isNaN [#METR-15731]
This commit is contained in:
parent
4ed57ac566
commit
e267ba87f0
@ -874,14 +874,14 @@ struct IsInfiniteImpl
|
||||
template <typename T> static bool execute(const T t) { return std::isinf(t); }
|
||||
};
|
||||
|
||||
struct IsNanImpl
|
||||
struct IsNaNImpl
|
||||
{
|
||||
static constexpr auto name = "isNan";
|
||||
static constexpr auto name = "isNaN";
|
||||
template <typename T> static bool execute(const T t) { return std::isnan(t); }
|
||||
};
|
||||
|
||||
using FunctionIsFinite = FunctionNumericPredicate<IsFiniteImpl>;
|
||||
using FunctionIsInfinite = FunctionNumericPredicate<IsInfiniteImpl>;
|
||||
using FunctionIsNan = FunctionNumericPredicate<IsNanImpl>;
|
||||
using FunctionIsNaN = FunctionNumericPredicate<IsNaNImpl>;
|
||||
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ void registerFunctionsMiscellaneous(FunctionFactory & factory)
|
||||
|
||||
factory.registerFunction<FunctionIsFinite>();
|
||||
factory.registerFunction<FunctionIsInfinite>();
|
||||
factory.registerFunction<FunctionIsNan>();
|
||||
factory.registerFunction<FunctionIsNaN>();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,13 +21,13 @@ select isInfinite(-inf) = 1;
|
||||
select isInfinite(nan) = 0;
|
||||
|
||||
|
||||
select isNan(0) = 0;
|
||||
select isNan(1) = 0;
|
||||
select isNan(materialize(0)) = 0;
|
||||
select isNan(materialize(1)) = 0;
|
||||
select isNan(1/0) = 0;
|
||||
select isNan(-1/0) = 0;
|
||||
select isNan(0/0) = 1;
|
||||
select isNan(inf) = 0;
|
||||
select isNan(-inf) = 0;
|
||||
select isNan(nan) = 1;
|
||||
select isNaN(0) = 0;
|
||||
select isNaN(1) = 0;
|
||||
select isNaN(materialize(0)) = 0;
|
||||
select isNaN(materialize(1)) = 0;
|
||||
select isNaN(1/0) = 0;
|
||||
select isNaN(-1/0) = 0;
|
||||
select isNaN(0/0) = 1;
|
||||
select isNaN(inf) = 0;
|
||||
select isNaN(-inf) = 0;
|
||||
select isNaN(nan) = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user