tdSql.execute("insert into dev_002 (ts,t1) values(%d, %d,)"%(self.ts+i,i+1))
foriinrange(10):
sql="insert into dev_002 (ts,t1) values "
forjinrange(int(self.rowNum/1000)):
sql+="(%d, %d,)"%(self.ts+i*1000+j,i*1000+j+1)
tdSql.execute(sql)
tdSql.query("select count(ts) from dev_001 state_window(t1)")
tdSql.checkRows(3)
...
...
@@ -70,7 +75,7 @@ class TDTestCase:
tdSql.checkRows(3)
tdSql.checkData(1,0,2)
tdSql.query("select count(ts) from dev_002 state_window(t1)")
tdSql.checkRows(100000)
tdSql.checkRows(1000)
# with all aggregate function
tdSql.query("select count(*),sum(t1),avg(t1),twa(t1),stddev(t15),leastsquares(t15,1,1),first(t15),last(t15),spread(t15),percentile(t15,90),t9 from dev_001 state_window(t9);")
...
...
@@ -100,7 +105,43 @@ class TDTestCase:
tdSql.error("select count(*) from dev_001 state_window(t6)")
tdSql.error("select count(*) from dev_001 state_window(t10)")
tdSql.error("select count(*) from dev_001 state_window(tag2)")