From 5f859c2196698718bd24edd15537ae7ea4f85d2e Mon Sep 17 00:00:00 2001 From: Mryange <2319153948@qq.com> Date: Wed, 13 Mar 2024 17:17:07 +0800 Subject: [PATCH] upd --- .../org/apache/doris/regression/util/OutputUtils.groovy | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 95f6f615c683811..5a663ea1a266aee 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 @@ -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