From eea4d260cc754231364a0db787addeaa5bfa3554 Mon Sep 17 00:00:00 2001 From: "wenzhouwww@live.cn" Date: Fri, 1 Jul 2022 17:58:47 +0800 Subject: [PATCH] update case for csum about stable --- tests/system-test/2-query/csum.py | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/system-test/2-query/csum.py b/tests/system-test/2-query/csum.py index b7fa9a0cbb..804a3257e8 100644 --- a/tests/system-test/2-query/csum.py +++ b/tests/system-test/2-query/csum.py @@ -419,12 +419,66 @@ class TDTestCase: tdSql.checkData(3,0,4) tdSql.query("select csum(abs(c1))+2 from t1 ") tdSql.checkRows(4) + + def csum_support_stable(self): + tdSql.query(" select csum(1) from stb1 ") + tdSql.checkRows(70) + tdSql.query("select csum(c1) from stb1 partition by tbname ") + tdSql.checkRows(40) + tdSql.query("select csum(st1) from stb1 partition by tbname") + tdSql.checkRows(70) + tdSql.query("select csum(st1+c1) from stb1 partition by tbname") + tdSql.checkRows(40) + tdSql.query("select csum(st1+c1) from stb1 partition by tbname") + tdSql.checkRows(40) + tdSql.query("select csum(st1+c1) from stb1 partition by tbname") + tdSql.checkRows(40) + + # # bug need fix + # tdSql.query("select csum(st1+c1) from stb1 partition by tbname slimit 1 ") + # tdSql.checkRows(4) + # tdSql.error("select csum(st1+c1) from stb1 partition by tbname limit 1 ") + + + # bug need fix + tdSql.query("select csum(st1+c1) from stb1 partition by tbname") + tdSql.checkRows(40) + + # bug need fix + # tdSql.query("select tbname , csum(c1) from stb1 partition by tbname") + # tdSql.checkRows(40) + # tdSql.query("select tbname , csum(st1) from stb1 partition by tbname") + # tdSql.checkRows(70) + # tdSql.query("select tbname , csum(st1) from stb1 partition by tbname slimit 1") + # tdSql.checkRows(7) + + # partition by tags + # tdSql.query("select st1 , csum(c1) from stb1 partition by st1") + # tdSql.checkRows(40) + # tdSql.query("select csum(c1) from stb1 partition by st1") + # tdSql.checkRows(40) + # tdSql.query("select st1 , csum(c1) from stb1 partition by st1 slimit 1") + # tdSql.checkRows(4) + # tdSql.query("select csum(c1) from stb1 partition by st1 slimit 1") + # tdSql.checkRows(4) + + # partition by col + # tdSql.query("select c1 , csum(c1) from stb1 partition by c1") + # tdSql.checkRows(41) + # tdSql.query("select csum(c1) from stb1 partition by c1") + # tdSql.checkRows(41) + # tdSql.query("select c1 , csum(c1) from stb1 partition by st1 slimit 1") + # tdSql.checkRows(4) + # tdSql.query("select csum(c1) from stb1 partition by st1 slimit 1") + # tdSql.checkRows(4) + def run(self): import traceback try: # run in develop branch self.csum_test_run() + self.csum_support_stable() pass except Exception as e: traceback.print_exc() -- GitLab