From 99966456113ab4e613a783eb2595539762d5c26d Mon Sep 17 00:00:00 2001 From: "wenzhouwww@live.cn" Date: Mon, 20 Jun 2022 14:46:37 +0800 Subject: [PATCH] update case about selective function --- .../system-test/2-query/distribute_agg_max.py | 21 +++++++++++++++++++ .../system-test/2-query/distribute_agg_min.py | 18 ++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/tests/system-test/2-query/distribute_agg_max.py b/tests/system-test/2-query/distribute_agg_max.py index ae0ab5aafa..5c9760cbcf 100644 --- a/tests/system-test/2-query/distribute_agg_max.py +++ b/tests/system-test/2-query/distribute_agg_max.py @@ -245,6 +245,27 @@ class TDTestCase: tdSql.query(" select max(c1),c2 from stb1 group by c2 ") tdSql.checkRows(31) + # selective common cols of datas + tdSql.query("select max(c1),c2,c3,c5 from stb1") + tdSql.checkRows(1) + tdSql.checkData(0,0,28) + tdSql.checkData(0,1,311108) + tdSql.checkData(0,2,3108) + tdSql.checkData(0,3,31.08000) + + tdSql.query("select max(c1),t1,c2,t3 from stb1") + tdSql.checkRows(1) + tdSql.checkData(0,0,28) + tdSql.checkData(0,1,19) + tdSql.checkData(0,2,311108) + + tdSql.query("select max(c1),ceil(t1),pow(c2,1)+2,abs(t3) from stb1") + tdSql.checkRows(1) + tdSql.checkData(0,0,28) + tdSql.checkData(0,1,19) + tdSql.checkData(0,2,311110.000000000) + tdSql.checkData(0,3,2109) + # partition by tbname or partition by tag tdSql.query("select max(c1),tbname from stb1 partition by tbname") query_data = tdSql.queryResult diff --git a/tests/system-test/2-query/distribute_agg_min.py b/tests/system-test/2-query/distribute_agg_min.py index 8a458c74df..dd20d88229 100644 --- a/tests/system-test/2-query/distribute_agg_min.py +++ b/tests/system-test/2-query/distribute_agg_min.py @@ -245,6 +245,24 @@ class TDTestCase: tdSql.query(" select min(c1),c2 from stb1 group by c2 ") tdSql.checkRows(31) + # selective common cols of datas + tdSql.query("select min(c1),c2,c3,c5 from stb1") + tdSql.checkRows(1) + tdSql.checkData(0,0,0) + tdSql.checkData(0,1,0) + tdSql.checkData(0,2,0) + tdSql.checkData(0,3,0) + + tdSql.query("select min(c1),t1,c2,t3 from stb1 where c1 >5") + tdSql.checkRows(1) + tdSql.checkData(0,0,6) + tdSql.checkData(0,2,66666) + + tdSql.query("select min(c1),ceil(t1),pow(c2,1)+2,abs(t3) from stb1 where c1>12") + tdSql.checkRows(1) + tdSql.checkData(0,0,13) + tdSql.checkData(0,2,144445.000000000) + # partition by tbname or partition by tag tdSql.query("select min(c1),tbname from stb1 partition by tbname") query_data = tdSql.queryResult -- GitLab