From 57545ec692afc53b34632eb1d340856eaac120f4 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Mon, 8 Mar 2021 11:43:29 +0800 Subject: [PATCH] add case --- tests/script/general/parser/last_groupby.sim | 36 ++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/tests/script/general/parser/last_groupby.sim b/tests/script/general/parser/last_groupby.sim index ed86e1ee40..f993324cd1 100644 --- a/tests/script/general/parser/last_groupby.sim +++ b/tests/script/general/parser/last_groupby.sim @@ -28,8 +28,6 @@ sql insert into tb1 values (now+500s,4,4.0,4.0,4,4,4,true,"4","4") sql select f1,last(*) from st2 group by f1; -print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 $data10 - if $rows != 4 then return -1 endi @@ -64,4 +62,38 @@ if $data09 != 1 then return -1 endi +sql select f1,last(f1,st2.*) from st2 group by f1; +if $rows != 4 then + return -1 +endi + +if $data00 != 1 then + return -1 +endi + +if $data01 != 1 then + return -1 +endi +if $data03 != 1 then + return -1 +endi +if $data04 != 1.00000 then + return -1 +endi +if $data05 != 1.000000000 then + return -1 +endi +if $data06 != 1 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != 1 then + return -1 +endi +if $data09 != 1 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT -- GitLab