未验证 提交 2241df8b 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17685 from taosdata/test/TD-19838

test: add test case for max/min function
...@@ -45,6 +45,22 @@ class TDTestCase: ...@@ -45,6 +45,22 @@ class TDTestCase:
tdSql.query(f"select max(col1) from {dbname}.stb where col2<=5") tdSql.query(f"select max(col1) from {dbname}.stb where col2<=5")
tdSql.checkData(0,0,5) tdSql.checkData(0,0,5)
tdSql.query(f"select ts, max(col1) from {dbname}.stb")
tdSql.checkRows(1)
tdSql.checkData(0, 1, np.max(intData))
tdSql.query(f"select ts, max(col1) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.checkData(0, 1, np.max(intData))
tdSql.query(f"select ts, min(col9) from {dbname}.stb")
tdSql.checkRows(1)
tdSql.checkData(0, 1, np.min(floatData))
tdSql.query(f"select ts, min(col9) from {dbname}.stb_1")
tdSql.checkRows(1)
tdSql.checkData(0, 1, np.min(floatData))
def max_check_ntb_base(self, dbname="db"): def max_check_ntb_base(self, dbname="db"):
tdSql.prepare() tdSql.prepare()
intData = [] intData = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册