[TD-4733]<test>: add test case for derivative function
This commit is contained in:
parent
4066fb7c50
commit
958d2454df
|
@ -130,6 +130,13 @@ class TDTestCase:
|
|||
tdSql.prepare()
|
||||
self.insertAndCheckData()
|
||||
|
||||
tdSql.execute("create table st(ts timestamp, c1 int, c2 int) tags(id int)")
|
||||
tdSql.execute("insert into dev1(ts, c1) using st tags(1) values(now, 1)")
|
||||
|
||||
tdSql.error("select derivative(c1, 10s, 0) from (select c1 from st)")
|
||||
tdSql.query("select diff(c1) from (select derivative(c1, 1s, 0) c1 from dev1)")
|
||||
tdSql.checkRows(0)
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
|
|
Loading…
Reference in New Issue