sql insert into t1 values(1648791213000,10,2,3,1.0);
sql create stream stream2 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart, sum(a) from st partition by ta interval(10s);
$loop_count = 0
loop00:
sleep 1000
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
sql select * from streamt2;
if $rows != 1 then
print ======$rows
print data00,data01, data02
print data10,data11, data12
print data20,data21, data22
goto loop00
endi
if $data01 != 10 then
print =====data01=$data01
goto loop00
endi
sql insert into t1 values(1648791213000,1,2,3,1.0);
$loop_count = 0
loop0:
sleep 1000
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
sql select * from streamt2;
if $rows != 1 then
print ======$rows
print data00,data01, data02
print data10,data11, data12
print data20,data21, data22
goto loop0
endi
if $data01 != 1 then
print =====data01=$data01
goto loop0
endi
sql insert into t1 values(1648791213001,2,2,3,1.0);
$loop_count = 0
loop1:
sleep 1000
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
sql select * from streamt2;
if $rows != 1 then
print ======$rows
print data00,data01, data02
print data10,data11, data12
print data20,data21, data22
goto loop1
endi
if $data01 != 3 then
print ======$data01
goto loop1
endi
sql insert into t1 values(1648791223001,3,2,3,1.0);
sql insert into t1 values(1648791223002,4,2,3,1.0);