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
  • Loading branch information
jacktengg committed Oct 26, 2023
1 parent c86fad7 commit 94f75ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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 @@ -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 94f75ff

Please sign in to comment.