提交 ae773fee 编写于 作者: S shenglian zhou

feature: add test case

上级 93ab8143
...@@ -887,6 +887,7 @@ ...@@ -887,6 +887,7 @@
,,y,script,./test.sh -f tsim/query/emptyTsRange.sim ,,y,script,./test.sh -f tsim/query/emptyTsRange.sim
,,y,script,./test.sh -f tsim/query/partitionby.sim ,,y,script,./test.sh -f tsim/query/partitionby.sim
,,y,script,./test.sh -f tsim/query/tableCount.sim ,,y,script,./test.sh -f tsim/query/tableCount.sim
,,y,script,./test.sh -f tsim/query/tag_scan.sim
,,y,script,./test.sh -f tsim/query/nullColSma.sim ,,y,script,./test.sh -f tsim/query/nullColSma.sim
,,y,script,./test.sh -f tsim/qnode/basic1.sim ,,y,script,./test.sh -f tsim/qnode/basic1.sim
,,y,script,./test.sh -f tsim/snode/basic1.sim ,,y,script,./test.sh -f tsim/snode/basic1.sim
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sql connect
sql drop database if exists test
sql create database test;
sql use test;
sql create table st(ts timestamp, f int) tags (t int);
sql insert into ct1 using st tags(1) values(now, 1);
sql insert into ct2 using st tags(2) values(now, 2);
sql insert into ct3 using st tags(3) values(now, 3);
sql insert into ct4 using st tags(4) values(now, 4);
sql create table st2(ts timestamp, f int) tags (t int);
sql insert into ct21 using st2 tags(1) values(now, 1);
sql insert into ct22 using st2 tags(2) values(now, 2);
sql insert into ct23 using st2 tags(3) values(now, 3);
sql insert into ct24 using st2 tags(4) values(now, 4);
sql select tbname, 1 from st group by tbname order by tbname;
print $rows $data00 $data10 $data20
if $rows != 4 then
return -1
endi
if $data00 != @ct1@ then
return -1
endi
if $data10 != @ct2@ then
return -1
endi
sql select tbname, 1 from st group by tbname slimit 0, 1;
print $rows
if $rows != 1 then
return -1
endi
sql select tbname, 1 from st group by tbname slimit 2, 2;
print $rows $data00 $data10
if $rows != 2 then
return -1
endi
sql select tbname, 1 from st group by tbname order by tbname slimit 0, 1;
print $rows $data00 $data10 $data20
if $rows != 4 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册