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

test: add test case for max/min function
This commit is contained in:
Shengliang Guan 2022-10-27 10:51:08 +08:00 committed by GitHub
commit 2241df8b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -45,6 +45,22 @@ class TDTestCase:
tdSql.query(f"select max(col1) from {dbname}.stb where col2<=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"):
tdSql.prepare()
intData = []