diff --git a/src/Functions/FunctionBinaryArithmetic.h b/src/Functions/FunctionBinaryArithmetic.h index ad4be84d3375740d454425634bc26f6d4039ddc7..c99f12a99b005ea49caff6dfe802565c380a6517 100644 --- a/src/Functions/FunctionBinaryArithmetic.h +++ b/src/Functions/FunctionBinaryArithmetic.h @@ -1015,20 +1015,8 @@ public: /// non-vector result if (col_left_const && col_right_const) { - NativeResultType const_a; - NativeResultType const_b; - - 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 (!result_is_decimal && dec_b) - const_b = DecimalUtils::convertTo( - col_right_const->template getValue(), scale_b); - else - const_b = col_right_const->template getValue(); + auto const_a = col_left_const->template getValue(); + auto const_b = col_right_const->template getValue(); auto res = check_decimal_overflow ? OpImplCheck::template constantConstant(const_a, const_b, scale_a, scale_b) :