system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sleep 50 sql connect print =============== create database sql create database test vgroups 1 sql show databases if $rows != 3 then return -1 endi print $data00 $data01 $data02 sql use test sql create table t1(ts timestamp, a int, b int , c int, d double,id int); sql create stream streams2 trigger at_once into streamt as select _wstartts, count(*) c1, sum(a), max(a), min(d), stddev(a), last(a), first(d), max(id) s from t1 session(ts,10s); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL,1); sql insert into t1 values(1648791223001,10,2,3,1.1,2); sql insert into t1 values(1648791233002,3,2,3,2.1,3); sql insert into t1 values(1648791243003,NULL,NULL,NULL,NULL,4); sql insert into t1 values(1648791213002,NULL,NULL,NULL,NULL,5) (1648791233012,NULL,NULL,NULL,NULL,6); sleep 300 sql select * from streamt order by s desc; # row 0 if $data01 != 3 then print ======$data01 return -1 endi if $data02 != 3 then print ======$data02 return -1 endi if $data03 != 3 then print ======$data03 return -1 endi if $data04 != 2.100000000 then print ======$data04 return -1 endi if $data05 != 0.000000000 then print ======$data05 return -1 endi if $data06 != 3 then print ======$data05 return -1 endi if $data07 != 2.100000000 then print ======$data05 return -1 endi if $data08 != 6 then print ======$data05 return -1 endi # row 1 if $data11 != 3 then print ======$data01 return -1 endi if $data12 != 10 then print ======$data02 return -1 endi if $data13 != 10 then print ======$data03 return -1 endi if $data14 != 1.100000000 then print ======$data04 return -1 endi if $data15 != 0.000000000 then print ======$data05 return -1 endi if $data16 != 10 then print ======$data05 return -1 endi if $data17 != 1.100000000 then print ======$data05 return -1 endi if $data18 != 5 then print ======$data05 return -1 endi sql insert into t1 values(1648791213000,1,2,3,1.0,7); sql insert into t1 values(1648791223001,2,2,3,1.1,8); sql insert into t1 values(1648791233002,3,2,3,2.1,9); sql insert into t1 values(1648791243003,4,2,3,3.1,10); sql insert into t1 values(1648791213002,4,2,3,4.1,11) ; sql insert into t1 values(1648791213002,4,2,3,4.1,12) (1648791223009,4,2,3,4.1,13); sleep 300 sql select * from streamt order by s desc ; # row 0 if $data01 != 7 then print ======$data01 return -1 endi if $data02 != 9 then print ======$data02 return -1 endi if $data03 != 4 then print ======$data03 return -1 endi if $data04 != 1.100000000 then print ======$data04 return -1 endi if $data05 != 0.816496581 then print ======$data05 return -1 endi if $data06 != 3 then print ======$data05 return -1 endi if $data07 != 1.100000000 then print ======$data05 return -1 endi if $data08 != 13 then print ======$data05 return -1 endi system sh/exec.sh -n dnode1 -s stop -x SIGINT