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