Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryange committed Mar 13, 2024
1 parent 7232a42 commit 5f859c2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ class OutputUtils {
double realDouble = Double.parseDouble(realCell)

double realRelativeError = Math.abs(expectDouble - realDouble) / Math.abs(realDouble)
double expectRelativeError = 1e-8

if (expectRelativeError < realRelativeError) {
double expectRelativeError = 1e-6
double realabsoluteError = Math.abs(expectDouble - realDouble)
double expectAbsoluteError = 1e-10
if (expectRelativeError < realRelativeError && expectAbsoluteError < realabsoluteError) {
// Keep the scale of low precision data to solve TPCH cases like:
// "Expect cell is: 0.0395, But real is: 0.039535109"
int expectDecimalPlaces = expectCell.contains(".") ? expectCell.length() - expectCell.lastIndexOf(".") - 1 : 0
Expand Down

0 comments on commit 5f859c2

Please sign in to comment.