windowClose.sim 714 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
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 stable st(ts timestamp, a int) tags(t int);
sql create table tu1 using st tags(1);
sql create table tu2 using st tags(2);

21
sql create stream stream1 trigger window_close into streamt as select  _wstart, sum(a) from st interval(10s);
22 23 24

sql insert into tu1 values(now, 1);

5
54liuyao 已提交
25
sleep 500
26 27 28 29 30 31 32
sql select * from streamt;
if $rows != 0 then
  print ======$rows
  return -1
endi

system sh/exec.sh -n dnode1 -s stop -x SIGINT