fix: add more test case

This commit is contained in:
slzhou 2023-09-22 13:47:50 +08:00
parent 484854b4fa
commit 6134c90398
1 changed files with 80 additions and 3 deletions

View File

@ -23,7 +23,84 @@ sql create table tba1 using sta tags(1, 1, 1);
sql create table tba2 using sta tags(2, 2, 2);
set_bi_mode 1
sql select * from db1.sta;
print $rows
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
sql select * from db1.sta order by ts;
if $cols != 7 then
return -1
endi
if $data06 != tba1 then
return -1
endi
sql select last(*) from db1.sta;
if $cols != 4 then
return -1
endi
if $data03 != tba2 then
return -1
endi
sql select last_row(*) from db1.sta;
if $cols != 4 then
return -1
endi
if $data03 != tba2 then
return -1
endi
sql select first(*) from db1.sta;
if $cols != 4 then
return -1
endi
if $data03 != tba1 then
return -1
endi
print "=====table star ====================="
sql select b.* from db1.sta b order by ts;
if $cols != 7 then
return -1
endi
if $data06 != tba1 then
return -1
endi
sql select last(b.*) from db1.sta b;
if $cols != 4 then
return -1
endi
if $data03 != tba2 then
return -1
endi
sql select last_row(b.*) from db1.sta b;
if $cols != 4 then
return -1
endi
if $data03 != tba2 then
return -1
endi
sql select first(b.*) from db1.sta b;
if $cols != 4 then
return -1
endi
if $data03 != tba1 then
return -1
endi
set_bi_mode 0
sql select * from db1.sta order by ts;
if $cols != 6 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT