From 1c52842e835a661a9fb36693a45ff70a1be96633 Mon Sep 17 00:00:00 2001 From: myrrc Date: Thu, 17 Dec 2020 22:21:23 +0300 Subject: [PATCH] simplified the condition --- src/Functions/FunctionBinaryArithmetic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Functions/FunctionBinaryArithmetic.h b/src/Functions/FunctionBinaryArithmetic.h index b04e07833ba..ad4be84d337 100644 --- a/src/Functions/FunctionBinaryArithmetic.h +++ b/src/Functions/FunctionBinaryArithmetic.h @@ -1018,13 +1018,13 @@ public: NativeResultType const_a; NativeResultType const_b; - if constexpr (IsFloatingPoint && dec_a) + if constexpr (!result_is_decimal && dec_a) const_a = DecimalUtils::convertTo( col_left_const->template getValue(), scale_a); else const_a = col_left_const->template getValue(); - if constexpr (IsFloatingPoint && dec_b) + if constexpr (!result_is_decimal && dec_b) const_b = DecimalUtils::convertTo( col_right_const->template getValue(), scale_b); else