Skip to content

Commit 80a9c89

Browse files
authored
[fix](regression) fix regression framework bug: if real test result is negative, it will miss check test result apache#25734 (apache#25734) (apache#26551)
1 parent 00143f7 commit 80a9c89

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎regression-test/data/schema_change_p0/decimalv3/test_agg_keys_schema_change_decimalv3.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
0.11111111111111111111111111111111100000 11111111111111111111111111111.1100000000 0.11111111111111111111111111111111100000 11111111111111111111111111111.110
1919

2020
-- !sql --
21-
0.11111111111111111111111111111111100000 9223372036854775.807 0.11111111111111111111111111111111100000 11111111111111111111111111111.110
21+
0.11111111111111111111111111111111100000 -999999999999999.999 0.11111111111111111111111111111111100000 11111111111111111111111111111.110
2222

2323
-- !sql --
2424
0.11111111111111111111111111111111100000 -9223.372036854775808 0.11111111111111111111111111111111100000 11111111111111111111111111111.110

‎regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class OutputUtils {
7676
double expectDouble = Double.parseDouble(expectCell)
7777
double realDouble = Double.parseDouble(realCell)
7878

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

8282
if (expectRelativeError < realRelativeError) {

0 commit comments

Comments
 (0)