From d296ec9baf220e6e91548d6e9b79da8ea214cdee Mon Sep 17 00:00:00 2001 From: "wenzhouwww@live.cn" Date: Tue, 31 May 2022 19:16:09 +0800 Subject: [PATCH] update case --- tests/system-test/2-query/mavg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/mavg.py b/tests/system-test/2-query/mavg.py index d877b0f821..1d92964615 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -289,8 +289,9 @@ class TDTestCase: 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 # 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] - if pre_result is pre_result.any: + if not tdSql.queryResult: + 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 tdSql.query(self.mavg_query_form( sel=sel, func=func, col=col, m_comm=m_comm, k=k, r_comm=r_comm, alias=alias, fr=fr, -- GitLab