sql create stream streams3 trigger at_once into result3.streamt3 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", 1 ) ) as select _wstart, count(*) c1 from st interval(10s);
sql create stream streams3 trigger at_once into result3.streamt3 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", "1") ) as select _wstart, count(*) c1 from st interval(10s);
print ===== insert into 3
sql insert into t1 values(1648791213000,1,2,3);
sql insert into t2 values(1648791213000,2,2,3);
...
...
@@ -198,29 +220,24 @@ if $rows != 1 then
goto loop4
endi
if $data00 != NULL then
if $data00 != dd then
print =====data00=$data00
goto loop4
endi
sql select dd from result3.streamt3 order by 1;
if $rows != 2 then
if $rows != 1 then
print =====rows=$rows
print $data00 $data10
goto loop4
endi
if $data00 != col-1 then
if $data00 != NULL then
print =====data00=$data00
goto loop4
endi
if $data10 != col-2 then
print =====data10=$data10
goto loop4
endi
$loop_count = 0
loop5:
...
...
@@ -233,9 +250,20 @@ endi
sql select * from result3.streamt3;
if $rows != 2 then
if $rows != 1 then
print =====rows=$rows
print $data00 $data10
print $data00
print $data10
goto loop5
endi
if $data01 != 2 then
print =====data01=$data01
goto loop5
endi
if $data02 != NULL then
print =====data02=$data02
goto loop5
endi
...
...
@@ -251,9 +279,10 @@ endi
sql select table_name from information_schema.ins_tables where db_name="result3" order by 1;
if $rows != 2 then
if $rows != 1 then
print =====rows=$rows
print $data00 $data10
print $data00
print $data10
goto loop6
endi
...
...
@@ -262,17 +291,12 @@ if $data00 != tbn-1 then
goto loop6
endi
if $data10 != tbn-2 then
print =====data10=$data10
goto loop6
endi
print ===== step5
print ===== tag name + table name
sql create database result4 vgroups 1;
sql create database test4 vgroups 4;
sql create database test4 vgroups 1;
sql use test4;
...
...
@@ -281,7 +305,7 @@ sql create table t1 using st tags(1,1,1);
sql create table t2 using st tags(2,2,2);
sql create table t3 using st tags(3,3,3);
sql create stream streams4 trigger at_once into result4.streamt4 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", dd)) as select _wstart, count(*) c1 from st interval(10s);
sql create stream streams4 trigger at_once into result4.streamt4 TAGS(dd varchar(100)) SUBTABLE(concat("tbn-", "1")) as select _wstart, count(*) c1 from st interval(10s);
sql insert into t1 values(1648791213000,1,1,1) t2 values(1648791213000,2,2,2) t3 values(1648791213000,3,3,3);
...
...
@@ -297,27 +321,18 @@ endi
sql select table_name from information_schema.ins_tables where db_name="result4" order by 1;