提交 632c3b50 编写于 作者: P Ping Xiao

[TD-2583]<test>: add test case for min/max function

上级 aa9092de
......@@ -69,6 +69,15 @@ class TDTestCase:
tdSql.query("select max(col6) from test1")
tdSql.checkData(0, 0, np.max(floatData))
# test case: https://jira.taosdata.com:18080/browse/TD-2583
tdSql.execute("create database test days 2")
tdSql.execute("create table car(ts timestamp, speed int)")
tdSql.execute("insert into car values(now, -1)")
tdSql.execute("insert into car values(now-10d, null)")
tdSql.query("select max(speed) from car")
tdSql.checkData(0, 0, -1)
def stop(self):
tdSql.close()
......
......@@ -69,6 +69,15 @@ class TDTestCase:
tdSql.query("select min(col6) from test1")
tdSql.checkData(0, 0, np.min(floatData))
# test case: https://jira.taosdata.com:18080/browse/TD-2583
tdSql.execute("create database test days 2")
tdSql.execute("create table car(ts timestamp, speed int)")
tdSql.execute("insert into car values(now, 1)")
tdSql.execute("insert into car values(now-10d, null)")
tdSql.query("select min(speed) from car")
tdSql.checkData(0, 0, 1)
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册