Skip to content

Commit

Permalink
[fix](regression) fix regression framework bug: if real test result i…
Browse files Browse the repository at this point in the history
…s negative, it will miss check test result (apache#25734)
  • Loading branch information
jacktengg authored and 胥剑旭 committed Dec 14, 2023
1 parent 4e26c43 commit 7c33ab0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion be/src/vec/functions/function_binary_arithmetic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>()))>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7c33ab0

Please sign in to comment.