Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
93557c36
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
93557c36
编写于
10月 22, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
10月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17557 from taosdata/feature/stream_ly
feat(stream):change stream mode & add ci
上级
5d293869
308c3cad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
102 addition
and
1 deletion
+102
-1
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+5
-0
tests/script/tsim/stream/windowClose.sim
tests/script/tsim/stream/windowClose.sim
+97
-1
未找到文件。
source/libs/executor/src/timewindowoperator.c
浏览文件 @
93557c36
...
...
@@ -4411,6 +4411,11 @@ SOperatorInfo* createStreamFinalSessionAggOperatorInfo(SOperatorInfo* downstream
taosArrayPush
(
pInfo
->
pChildren
,
&
pChildOp
);
}
}
if
(
!
IS_FINAL_OP
(
pInfo
)
||
numOfChild
==
0
)
{
pInfo
->
twAggSup
.
calTrigger
=
STREAM_TRIGGER_AT_ONCE
;
}
return
pOperator
;
_error:
...
...
tests/script/tsim/stream/windowClose.sim
浏览文件 @
93557c36
...
...
@@ -5,7 +5,7 @@ sleep 50
sql connect
print =============== create database
sql create database test vgroups 1
sql create database test vgroups 1
;
sql select * from information_schema.ins_databases
if $rows != 3 then
return -1
...
...
@@ -29,4 +29,100 @@ if $rows != 0 then
return -1
endi
sql create database test1 vgroups 4;
sql use test1;
sql create stable st(ts timestamp, a int, b int) tags(t int);
sql create table t1 using st tags(1);
sql create table t2 using st tags(2);
sql create stream stream2 trigger window_close into streamt2 as select _wstart, sum(a) from st interval(10s);
sql create stream stream3 trigger max_delay 1s into streamt3 as select _wstart, sum(a) from st interval(10s);
sql create stream stream4 trigger window_close into streamt4 as select _wstart, sum(a) from t1 interval(10s);
sql create stream stream5 trigger max_delay 1s into streamt5 as select _wstart, sum(a) from t1 interval(10s);
sql create stream stream6 trigger window_close into streamt6 as select _wstart, sum(a) from st session(ts, 10s);
sql create stream stream7 trigger max_delay 1s into streamt7 as select _wstart, sum(a) from st session(ts, 10s);
sql create stream stream8 trigger window_close into streamt8 as select _wstart, sum(a) from t1 session(ts, 10s);
sql create stream stream9 trigger max_delay 1s into streamt9 as select _wstart, sum(a) from t1 session(ts, 10s);
sql create stream stream10 trigger window_close into streamt10 as select _wstart, sum(a) from t1 state_window(b);
sql create stream stream11 trigger max_delay 1s into streamt11 as select _wstart, sum(a) from t1 state_window(b);
sql insert into t1 values(1648791213000,1,1);
sql insert into t1 values(1648791213001,2,1);
sql insert into t1 values(1648791213002,3,1);
sql insert into t1 values(1648791233000,4,2);
$loop_count = 0
loop1:
sleep 200
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
sql select * from streamt2;
if $rows != 1 then
print ======streamt2=$rows
return -1
endi
sql select * from streamt3;
if $rows != 2 then
print ======streamt3=$rows
goto loop1
endi
sql select * from streamt4;
if $rows != 1 then
print ======streamt4=$rows
return -1
endi
sql select * from streamt5;
if $rows != 2 then
print ======streamt5=$rows
goto loop1
endi
sql select * from streamt6;
if $rows != 1 then
print ======streamt6=$rows
return -1
endi
sql select * from streamt7;
if $rows != 2 then
print ======streamt7=$rows
goto loop1
endi
sql select * from streamt8;
if $rows != 1 then
print ======streamt8=$rows
return -1
endi
sql select * from streamt9;
if $rows != 2 then
print ======streamt9=$rows
goto loop1
endi
sql select * from streamt10;
if $rows != 1 then
print ======streamt10=$rows
return -1
endi
sql select * from streamt11;
if $rows != 2 then
print ======streamt11=$rows
goto loop1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录