From e267ba87f0fc24fa7ef9126c5a753b0afb45f7ef Mon Sep 17 00:00:00 2001 From: Andrey Mironov Date: Fri, 3 Apr 2015 17:52:33 +0300 Subject: [PATCH] dbms: rename isNan to isNaN [#METR-15731] --- .../DB/Functions/FunctionsMiscellaneous.h | 6 +++--- dbms/src/Functions/FunctionsMiscellaneous.cpp | 2 +- .../00143_number_classification_functions.sql | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dbms/include/DB/Functions/FunctionsMiscellaneous.h b/dbms/include/DB/Functions/FunctionsMiscellaneous.h index 789116733f4..65cd2f19577 100644 --- a/dbms/include/DB/Functions/FunctionsMiscellaneous.h +++ b/dbms/include/DB/Functions/FunctionsMiscellaneous.h @@ -874,14 +874,14 @@ struct IsInfiniteImpl template 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 static bool execute(const T t) { return std::isnan(t); } }; using FunctionIsFinite = FunctionNumericPredicate; using FunctionIsInfinite = FunctionNumericPredicate; -using FunctionIsNan = FunctionNumericPredicate; +using FunctionIsNaN = FunctionNumericPredicate; } diff --git a/dbms/src/Functions/FunctionsMiscellaneous.cpp b/dbms/src/Functions/FunctionsMiscellaneous.cpp index 5d2dc669171..7eaf498d8fb 100644 --- a/dbms/src/Functions/FunctionsMiscellaneous.cpp +++ b/dbms/src/Functions/FunctionsMiscellaneous.cpp @@ -336,7 +336,7 @@ void registerFunctionsMiscellaneous(FunctionFactory & factory) factory.registerFunction(); factory.registerFunction(); - factory.registerFunction(); + factory.registerFunction(); } } diff --git a/dbms/tests/queries/0_stateless/00143_number_classification_functions.sql b/dbms/tests/queries/0_stateless/00143_number_classification_functions.sql index 8f37d518f7d..feb59c5f227 100644 --- a/dbms/tests/queries/0_stateless/00143_number_classification_functions.sql +++ b/dbms/tests/queries/0_stateless/00143_number_classification_functions.sql @@ -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;