Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
600607ef
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
600607ef
编写于
6月 27, 2023
作者:
H
Haojun Liao
提交者:
GitHub
6月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21846 from taosdata/fix/TD-24969
stream single session op end window function
上级
306e80ac
d1ca2ae2
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
5 addition
and
5 deletion
+5
-5
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+5
-5
未找到文件。
source/libs/executor/src/timewindowoperator.c
浏览文件 @
600607ef
...
@@ -3182,7 +3182,7 @@ int32_t saveSessionOutputBuf(SStreamAggSupporter* pAggSup, SResultWindowInfo* pW
...
@@ -3182,7 +3182,7 @@ int32_t saveSessionOutputBuf(SStreamAggSupporter* pAggSup, SResultWindowInfo* pW
}
}
static
void
doStreamSessionAggImpl
(
SOperatorInfo
*
pOperator
,
SSDataBlock
*
pSDataBlock
,
SSHashObj
*
pStUpdated
,
static
void
doStreamSessionAggImpl
(
SOperatorInfo
*
pOperator
,
SSDataBlock
*
pSDataBlock
,
SSHashObj
*
pStUpdated
,
SSHashObj
*
pStDeleted
,
bool
hasEndTs
)
{
SSHashObj
*
pStDeleted
,
bool
hasEndTs
,
bool
addGap
)
{
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
SStreamSessionAggOperatorInfo
*
pInfo
=
pOperator
->
info
;
SStreamSessionAggOperatorInfo
*
pInfo
=
pOperator
->
info
;
int32_t
numOfOutput
=
pOperator
->
exprSupp
.
numOfExprs
;
int32_t
numOfOutput
=
pOperator
->
exprSupp
.
numOfExprs
;
...
@@ -3221,7 +3221,7 @@ static void doStreamSessionAggImpl(SOperatorInfo* pOperator, SSDataBlock* pSData
...
@@ -3221,7 +3221,7 @@ static void doStreamSessionAggImpl(SOperatorInfo* pOperator, SSDataBlock* pSData
}
}
int64_t
winDelta
=
0
;
int64_t
winDelta
=
0
;
if
(
IS_FINAL_OP
(
pInfo
)
)
{
if
(
addGap
)
{
winDelta
=
pAggSup
->
gap
;
winDelta
=
pAggSup
->
gap
;
}
}
code
=
doOneWindowAggImpl
(
&
pInfo
->
twAggSup
.
timeWindowData
,
&
winInfo
,
&
pResult
,
i
,
winRows
,
rows
,
numOfOutput
,
code
=
doOneWindowAggImpl
(
&
pInfo
->
twAggSup
.
timeWindowData
,
&
winInfo
,
&
pResult
,
i
,
winRows
,
rows
,
numOfOutput
,
...
@@ -3547,7 +3547,7 @@ static SSDataBlock* doStreamSessionAgg(SOperatorInfo* pOperator) {
...
@@ -3547,7 +3547,7 @@ static SSDataBlock* doStreamSessionAgg(SOperatorInfo* pOperator) {
}
}
// the pDataBlock are always the same one, no need to call this again
// the pDataBlock are always the same one, no need to call this again
setInputDataBlock
(
pSup
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
setInputDataBlock
(
pSup
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
doStreamSessionAggImpl
(
pOperator
,
pBlock
,
pInfo
->
pStUpdated
,
pInfo
->
pStDeleted
,
IS_FINAL_OP
(
pInfo
));
doStreamSessionAggImpl
(
pOperator
,
pBlock
,
pInfo
->
pStUpdated
,
pInfo
->
pStDeleted
,
IS_FINAL_OP
(
pInfo
)
,
true
);
if
(
IS_FINAL_OP
(
pInfo
))
{
if
(
IS_FINAL_OP
(
pInfo
))
{
int32_t
chIndex
=
getChildIndex
(
pBlock
);
int32_t
chIndex
=
getChildIndex
(
pBlock
);
int32_t
size
=
taosArrayGetSize
(
pInfo
->
pChildren
);
int32_t
size
=
taosArrayGetSize
(
pInfo
->
pChildren
);
...
@@ -3562,7 +3562,7 @@ static SSDataBlock* doStreamSessionAgg(SOperatorInfo* pOperator) {
...
@@ -3562,7 +3562,7 @@ static SSDataBlock* doStreamSessionAgg(SOperatorInfo* pOperator) {
}
}
SOperatorInfo
*
pChildOp
=
taosArrayGetP
(
pInfo
->
pChildren
,
chIndex
);
SOperatorInfo
*
pChildOp
=
taosArrayGetP
(
pInfo
->
pChildren
,
chIndex
);
setInputDataBlock
(
&
pChildOp
->
exprSupp
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
setInputDataBlock
(
&
pChildOp
->
exprSupp
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
doStreamSessionAggImpl
(
pChildOp
,
pBlock
,
NULL
,
NULL
,
true
);
doStreamSessionAggImpl
(
pChildOp
,
pBlock
,
NULL
,
NULL
,
true
,
false
);
}
}
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
window
.
ekey
);
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
window
.
ekey
);
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
watermark
);
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
watermark
);
...
@@ -3767,7 +3767,7 @@ static SSDataBlock* doStreamSessionSemiAgg(SOperatorInfo* pOperator) {
...
@@ -3767,7 +3767,7 @@ static SSDataBlock* doStreamSessionSemiAgg(SOperatorInfo* pOperator) {
}
}
// the pDataBlock are always the same one, no need to call this again
// the pDataBlock are always the same one, no need to call this again
setInputDataBlock
(
pSup
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
setInputDataBlock
(
pSup
,
pBlock
,
TSDB_ORDER_ASC
,
MAIN_SCAN
,
true
);
doStreamSessionAggImpl
(
pOperator
,
pBlock
,
pInfo
->
pStUpdated
,
NULL
,
false
);
doStreamSessionAggImpl
(
pOperator
,
pBlock
,
pInfo
->
pStUpdated
,
NULL
,
false
,
false
);
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
window
.
ekey
);
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
pBlock
->
info
.
window
.
ekey
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录