enhance: bi mode tbname col to tbname func

This commit is contained in:
slzhou 2023-11-21 14:34:09 +08:00
parent ebbbb3825d
commit 1fc16355de
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
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 db1;
sql create database db1 vgroups 3;
sql create database db1;
sql use db1;
sql create stable sta (ts timestamp, f1 int, f2 binary(200)) tags(t1 int, t2 int, t3 int);
sql create stable stb (ts timestamp, f1 int, f2 binary(200)) tags(t1 int, t2 int, t3 int);
sql create table tba1 using sta tags(1, 1, 1);
sql create table tba2 using sta tags(2, 2, 2);
sql insert into tba1 values(now, 1, "1")(now+3s, 3, "3")(now+5s, 5, "5");
sql insert into tba2 values(now + 1s, 2, "2")(now+2s, 2, "2")(now+4s, 4, "4");
sql create table tbn1 (ts timestamp, f1 int);
set_bi_mode 1
sql select `tbname`, f1, f2 from sta order by ts
print $rows
print $data00 $data01 $data02 $data10 $data11 $data12
if $rows != 6 then
return -1
endi
if $data00 != @tba1@ then
return -1
endi
if $data10 != @tba2@ then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT