Skip to content

Commit 25abb8f

Browse files
fix test: fix fill2 test case
1 parent ec97778 commit 25abb8f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/system-test/2-query/fill2.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -988,19 +988,19 @@ def validate_fill_prev_one_group(self, fill_res_one_group, interval_res_one_grou
988988
## from now on, all rows are generated by fill
989989
for colIdx in range(1, colNum):
990990
if fill_row[colIdx] != last_valid_row_val[colIdx]:
991-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {last_valid_row_val[colIdx]} got: {fill_row[colIdx]}")
991+
tdLog.exit(f"1 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {last_valid_row_val[colIdx]} got: {fill_row}")
992992
if desc_row[colIdx] != last_valid_row_val[colIdx]:
993-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {last_valid_row_val[colIdx]} got: {desc_row[colIdx]}")
993+
tdLog.exit(f"2 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {last_valid_row_val[colIdx]} got: {desc_row}")
994994
i += 1
995995
else:
996996
if fill_ts < interval_row[0]:
997997
## this row is generated by fill
998998
for colIdx in range(1, colNum):
999999
val = self.find_valid_val_for_col(interval_res_one_group, j-1, False, colIdx)
10001000
if val != fill_row[colIdx]:
1001-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row[colIdx]}")
1001+
tdLog.exit(f"3 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row}")
10021002
if val != desc_row[colIdx]:
1003-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {desc_row[colIdx]}")
1003+
tdLog.exit(f"4 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {desc_row}")
10041004
i += 1
10051005
else:
10061006
## this row is copied from interval, but NULL cols are generated by fill
@@ -1012,9 +1012,9 @@ def validate_fill_prev_one_group(self, fill_res_one_group, interval_res_one_grou
10121012
else:
10131013
val = interval_row[colIdx]
10141014
if val != fill_row[colIdx]:
1015-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row[colIdx]}")
1015+
tdLog.exit(f"5 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row}")
10161016
if filled and val != desc_row[colIdx]:
1017-
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {desc_row[colIdx]}")
1017+
tdLog.exit(f"6 got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {desc_row}")
10181018
i += 1
10191019
j += 1
10201020

@@ -1263,9 +1263,9 @@ def validate_fill_linear_one_group(self, fill_res_one_group, interval_res_one_gr
12631263
if fill_row[colIdx] is not None or desc_row[colIdx] is not None:
12641264
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row[colIdx]}")
12651265
else:
1266-
if not math.isclose(val, fill_row[colIdx], rel_tol=1e-6, abs_tol=1e-6):
1266+
if not math.isclose(val, fill_row[colIdx], rel_tol=1e-5, abs_tol=1e-6):
12671267
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {fill_row[colIdx]}")
1268-
if not math.isclose(val, desc_row[colIdx], rel_tol=1e-6, abs_tol=1e-6):
1268+
if not math.isclose(val, desc_row[colIdx], rel_tol=1e-5, abs_tol=1e-6):
12691269
tdLog.exit(f"got different val for fill_res: {fill_row} rowIdx: {i} colIdx: {colIdx}, expect: {val} got: {desc_row[colIdx]}")
12701270
i += 1
12711271
else:

0 commit comments

Comments
 (0)