提交 f2163399 编写于 作者: W wenzhouwww@live.cn

update case for all

上级 cca32719
...@@ -288,15 +288,17 @@ class TDTestCase: ...@@ -288,15 +288,17 @@ class TDTestCase:
else: else:
tdSql.query(f"select {col} from {table_expr} {re.sub('limit [0-9]*|offset [0-9]*','',condition)}") tdSql.query(f"select {col} from {table_expr} {re.sub('limit [0-9]*|offset [0-9]*','',condition)}")
offset_val = condition.split("offset")[1].split(" ")[1] if "offset" in condition else 0 offset_val = condition.split("offset")[1].split(" ")[1] if "offset" in condition else 0
# print(f"select {col} from {table_expr} {re.sub('limit [0-9]*|offset [0-9]*','',condition)}")
pre_result = np.array(tdSql.queryResult)[np.array(tdSql.queryResult) != None] pre_result = np.array(tdSql.queryResult)[np.array(tdSql.queryResult) != None]
pre_mavg = pre_mavg = np.convolve(pre_result, np.ones(k), "valid")[offset_val:]/k if pre_result is pre_result.any:
tdSql.query(self.mavg_query_form( pre_mavg = pre_mavg = np.convolve(pre_result, np.ones(k), "valid")[offset_val:]/k
sel=sel, func=func, col=col, m_comm=m_comm, k=k, r_comm=r_comm, alias=alias, fr=fr, tdSql.query(self.mavg_query_form(
table_expr=table_expr, condition=condition sel=sel, func=func, col=col, m_comm=m_comm, k=k, r_comm=r_comm, alias=alias, fr=fr,
)) table_expr=table_expr, condition=condition
for i in range(tdSql.queryRows): ))
print(f"case in {line}: ", end='') for i in range(tdSql.queryRows):
tdSql.checkData(i, 0, pre_mavg[i]) print(f"case in {line}: ", end='')
tdSql.checkData(i, 0, pre_mavg[i])
pass pass
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册