未验证 提交 cc89f9cc 编写于 作者: H huili 提交者: GitHub

Merge pull request #4773 from taosdata/test/testcase

[TD-2457]<test>bottom+interval+order by
......@@ -85,6 +85,22 @@ class TDTestCase:
tdSql.checkData(0, 1, 0.1)
tdSql.checkData(1, 1, 1.1)
#TD-2457 bottom + interval + order by
tdSql.error('select top(col2,1) from test interval(1y) order by col2;')
#TD-2563 top + super_table + interval
tdSql.execute("create table meters(ts timestamp, c int) tags (d int)")
tdSql.execute("create table t1 using meters tags (1)")
sql = 'insert into t1 values '
for i in range(20000):
sql = sql + '(%d, %d)' % (self.ts + i , i % 47)
if i % 2000 == 0:
tdSql.execute(sql)
sql = 'insert into t1 values '
tdSql.execute(sql)
tdSql.query('select bottom(c,1) from meters interval(10a)')
tdSql.checkData(0,1,0)
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -89,6 +89,20 @@ class TDTestCase:
tdSql.checkRows(2)
tdSql.checkData(0, 1, 8.1)
tdSql.checkData(1, 1, 9.1)
#TD-2563 top + super_table + interval
tdSql.execute("create table meters(ts timestamp, c int) tags (d int)")
tdSql.execute("create table t1 using meters tags (1)")
sql = 'insert into t1 values '
for i in range(20000):
sql = sql + '(%d, %d)' % (self.ts + i , i % 47)
if i % 2000 == 0:
tdSql.execute(sql)
sql = 'insert into t1 values '
tdSql.execute(sql)
tdSql.query('select top(c,1) from meters interval(10a)')
tdSql.checkData(0,1,9)
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册