From 82246d441d6ae3c3f27cc568f41708edc2c3f3ba Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 19 Nov 2020 18:42:38 +0800 Subject: [PATCH] [TD-1765] add test cases. --- tests/script/general/parser/groupby.sim | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/script/general/parser/groupby.sim b/tests/script/general/parser/groupby.sim index 48298733ec..82456f6bb2 100644 --- a/tests/script/general/parser/groupby.sim +++ b/tests/script/general/parser/groupby.sim @@ -533,6 +533,51 @@ if $data03 != 99.000000000 then return -1 endi +print ============>td-1765 +sql select percentile(c4, 49),min(c4),max(c4),avg(c4),stddev(c4) from group_tb0 group by c8; +if $rows != 100 then + return -1 +endi + +if $data00 != 4851.000000000 then + return -1 +endi + +if $data01 != 0 then + return -1 +endi + +if $data02 != 9900 then + return -1 +endi + +if $data03 != 4950.000000000 then + return -1 +endi + +if $data04 != 2886.607004772 then + return -1 +endi + +if $data10 != 4852.000000000 then + return -1 +endi + +if $data11 != 1 then + return -1 +endi + +if $data12 != 9901 then + return -1 +endi + +if $data13 != 4951.000000000 then + return -1 +endi + +if $data14 != 2886.607004772 then + return -1 +endi #=========================== group by multi tags ====================== sql create table st (ts timestamp, c int) tags (t1 int, t2 int, t3 int, t4 int); -- GitLab