From ef4828d8e0a9f408f19e2188eeae9cf76f88e3d2 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 8 Sep 2020 04:02:19 +0000 Subject: [PATCH] add test for count(1) function --- tests/script/general/compute/count.sim | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/script/general/compute/count.sim b/tests/script/general/compute/count.sim index aef30c8b6c..c2ed5af3ca 100644 --- a/tests/script/general/compute/count.sim +++ b/tests/script/general/compute/count.sim @@ -52,6 +52,12 @@ if $data00 != $rowNum then return -1 endi +sql select count(1) from $tb +print ===> select count(1) from $tb => $data00 +if $data00 != $rowNum then + return -1 +endi + sql select count(tbcol) from $tb print ===> $data00 if $data00 != $rowNum then @@ -102,13 +108,20 @@ if $data00 != $totalNum then return -1 endi +print =============== step8 +sql select count(1) from $mt +print ===> $data00 +if $data00 != $totalNum then + return -1 +endi + sql select count(tbcol) from $mt print ===> $data00 if $data00 != $totalNum then return -1 endi -print =============== step8 +print =============== step10 sql select count(tbcol) as c from $mt where ts < now + 4m print ===> $data00 if $data00 != 50 then @@ -171,4 +184,4 @@ if $rows != 0 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT -- GitLab