tdLog.debug("INSERT TABLE DATA ............ [OK]")
return
# first case base
defcase_first(self):
#
# last base function
#
# base t1 table
sql="select first(*) from t1 where ts>='2017-07-14 12:40:00' order by ts asc;"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
sql="select first(*) from t1 where ts>='2017-07-14 12:40:00' order by ts desc;"# desc
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
# super table st
sql="select first(*) from st where ts>='2017-07-14 11:40:00' and ts<='2017-07-14 12:40:00' and tbname in('t1') order by ts;"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,3600)
sql="select first(*) from st where ts>='2017-07-14 11:40:00' and ts<='2017-07-14 12:40:00' and tbname in('t1') order by ts desc;"# desc
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,3600)
# sub query
sql="select first(*) from ( select sum(i1) from st where ts>='2017-07-14 11:40:00' and ts<'2017-07-14 12:40:00' interval(10m) order by ts asc );"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,187019100)
sql="select first(*) from ( select sum(i1) from st where ts>='2017-07-14 11:40:00' and ts<'2017-07-14 12:40:00' interval(10m) order by ts desc );"# desc
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,187019100)
return
# last case
defcase_last(self):
#
# last base test
#
# base t1 table
sql="select last(*) from t1 where ts<='2017-07-14 12:40:00' order by ts asc;"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
sql="select last(*) from t1 where ts<='2017-07-14 12:40:00' order by ts desc;"# desc
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
# super table st
sql="select last(*) from st where ts>='2017-07-14 11:40:00' and ts<='2017-07-14 12:40:00' and tbname in('t1') order by ts;"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
sql="select last(*) from st where ts>='2017-07-14 11:40:00' and ts<='2017-07-14 12:40:00' and tbname in('t1') order by ts desc;"# desc
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,7200)
# sub query
sql="select last(*) from ( select sum(i1) from st where ts>='2017-07-14 11:40:00' and ts<'2017-07-14 12:40:00' interval(10m) order by ts asc );"
tdSql.waitedQuery(sql,1,WAITS)
tdSql.checkData(0,1,192419100)
sql="select last(*) from ( select sum(i1) from st where ts>='2017-07-14 11:40:00' and ts<'2017-07-14 12:40:00' interval(10m) order by ts desc );"# desc