[fix](regression) fix regression framework bug: if real test result is negative, it will miss check test result (#25734)

This commit is contained in:
TengJianPing
2023-11-08 09:05:58 +08:00
committed by GitHub
parent a6756b4660
commit 70bc8600a9
3 changed files with 4 additions and 3 deletions

View File

@ -79,7 +79,8 @@ struct OperationTraits {
std::is_same_v<Op, DivideIntegralImpl<T, T>>;
static constexpr bool can_overflow =
(is_plus_minus || is_multiply) &&
(IsDecimalV2<OpA> || IsDecimalV2<OpB> || IsDecimal256<OpA> || IsDecimal256<OpB>);
(IsDecimalV2<OpA> || IsDecimalV2<OpB> || IsDecimal128I<OpA> || IsDecimal128I<OpB> ||
IsDecimal256<OpA> || IsDecimal256<OpB>);
static constexpr bool has_variadic_argument =
!std::is_void_v<decltype(has_variadic_argument_types(std::declval<Op>()))>;
};

View File

@ -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

View File

@ -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) {