update case for all
This commit is contained in:
parent
cca327190d
commit
f2163399f5
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue