Merge pull request #17685 from taosdata/test/TD-19838
test: add test case for max/min function
This commit is contained in:
commit
2241df8b77
|
@ -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 = []
|
||||||
|
|
Loading…
Reference in New Issue