From 50a542a1b9ea2983dfaa0a00de28d9979e96bab7 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 26 Oct 2022 19:07:57 +0800 Subject: [PATCH] test: add test case for max/min function --- tests/system-test/2-query/max.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/system-test/2-query/max.py b/tests/system-test/2-query/max.py index 5cc9a2d9e8..f3f2fdb86b 100644 --- a/tests/system-test/2-query/max.py +++ b/tests/system-test/2-query/max.py @@ -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 = []