Merge pull request #6524 from taosdata/xiaoping/add_test_case

[TD-4733]<test>: add test case for derivative function
This commit is contained in:
Hui Li 2021-06-18 18:54:20 +08:00 committed by GitHub
commit 5bafad7a77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -128,7 +128,14 @@ class TDTestCase:
def run(self):
tdSql.prepare()
self.insertAndCheckData()
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()