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

update case for tag compute

上级 368336c1
...@@ -23,7 +23,6 @@ class TDTestCase: ...@@ -23,7 +23,6 @@ class TDTestCase:
self.time_step = 1000 self.time_step = 1000
def insert_datas_and_check_abs(self ,tbnums , rownums , time_step ): def insert_datas_and_check_abs(self ,tbnums , rownums , time_step ):
tdLog.info(" prepare datas for auto check abs function ") tdLog.info(" prepare datas for auto check abs function ")
tdSql.execute(" create database test ") tdSql.execute(" create database test ")
...@@ -36,7 +35,7 @@ class TDTestCase: ...@@ -36,7 +35,7 @@ class TDTestCase:
ts = self.ts ts = self.ts
for row in range(rownums): for row in range(rownums):
ts += time_step*row ts = self.ts + time_step*row
c1 = random.randint(0,10000) c1 = random.randint(0,10000)
c2 = random.randint(0,100000) c2 = random.randint(0,100000)
c3 = random.randint(0,125) c3 = random.randint(0,125)
...@@ -538,22 +537,23 @@ class TDTestCase: ...@@ -538,22 +537,23 @@ class TDTestCase:
# tdSql.query(" select sum(c1) from stb1 where t1+10 >1; ") # taosd crash # tdSql.query(" select sum(c1) from stb1 where t1+10 >1; ") # taosd crash
tdSql.query("select c1 ,t1 from stb1 where t1 =0 ") tdSql.query("select c1 ,t1 from stb1 where t1 =0 ")
tdSql.checkRows(13) tdSql.checkRows(13)
# tdSql.query("select t1 from stb1 where t1 >0 ") tdSql.query("select t1 from stb1 where t1 >0 ")
# tdSql.checkRows(3) tdSql.checkRows(3)
tdSql.query("select t1 from stb1 where t1 =3 ")
tdSql.checkRows(1)
# tdSql.query("select sum(t1) from (select c1 ,t1 from stb1)") # tdSql.query("select sum(t1) from (select c1 ,t1 from stb1)")
# tdSql.checkData(0,0,61) # tdSql.checkData(0,0,61)
# tdSql.query("select distinct(c1) ,t1 from stb1") # tdSql.query("select distinct(c1) ,t1 from stb1")
# tdSql.checkRows(20) # tdSql.checkRows(20)
# tdSql.query("select max(t2) , t1 ,c1, t2 from stb1") tdSql.query("select max(t2) , t1 ,c1, t2 from stb1")
# tdSql.checkData(0,3,33333) tdSql.checkData(0,3,33333)
# tag filter with abs function # tag filter with abs function
# tdSql.query("select t1 from stb1 where abs(t1)=1") tdSql.query("select t1 from stb1 where abs(t1)=1")
# tdSql.checkRows(1)
tdSql.query("select t1 from stb1 where abs(c1+t1)=1")
tdSql.checkRows(1) tdSql.checkRows(1)
# tdSql.query("select t1 from stb1 where abs(t1+c1)=1") tdSql.query("select t1 from stb1 where abs(c1+t1)=1")
# tdSql.checkRows(1) tdSql.checkRows(0)
tdSql.query( tdSql.query(
"select abs(c1+t1)*t1 from stb1 where abs(c1)/floor(abs(ceil(t1))) ==1") "select abs(c1+t1)*t1 from stb1 where abs(c1)/floor(abs(ceil(t1))) ==1")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册