diff --git a/be/src/vec/functions/function_binary_arithmetic.h b/be/src/vec/functions/function_binary_arithmetic.h index 7198a08bb2..911704718f 100644 --- a/be/src/vec/functions/function_binary_arithmetic.h +++ b/be/src/vec/functions/function_binary_arithmetic.h @@ -79,7 +79,8 @@ struct OperationTraits { std::is_same_v>; static constexpr bool can_overflow = (is_plus_minus || is_multiply) && - (IsDecimalV2 || IsDecimalV2 || IsDecimal256 || IsDecimal256); + (IsDecimalV2 || IsDecimalV2 || IsDecimal128I || IsDecimal128I || + IsDecimal256 || IsDecimal256); static constexpr bool has_variadic_argument = !std::is_void_v()))>; }; diff --git a/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out b/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out index 1b9f52fd5e..fc5d8e286c 100644 --- a/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out +++ b/regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out @@ -18,7 +18,7 @@ 0.11111111111111111111111111111111100000 11111111111111111111111111111.1100000000 0.11111111111111111111111111111111100000 11111111111111111111111111111.110 -- !sql -- -0.11111111111111111111111111111111100000 9223372036854775.807 0.11111111111111111111111111111111100000 11111111111111111111111111111.110 +0.11111111111111111111111111111111100000 -999999999999999.999 0.11111111111111111111111111111111100000 11111111111111111111111111111.110 -- !sql -- 0.11111111111111111111111111111111100000 -9223.372036854775808 0.11111111111111111111111111111111100000 11111111111111111111111111111.110 diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy index 757a4a593f..b140673e7a 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy @@ -76,7 +76,7 @@ class OutputUtils { double expectDouble = Double.parseDouble(expectCell) double realDouble = Double.parseDouble(realCell) - double realRelativeError = Math.abs(expectDouble - realDouble) / realDouble + double realRelativeError = Math.abs(expectDouble - realDouble) / Math.abs(realDouble) double expectRelativeError = 1e-8 if (expectRelativeError < realRelativeError) {