Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
16b6ce82
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
16b6ce82
编写于
7月 08, 2022
作者:
S
slzhou@taodata.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add filter to operator merge aligned interval agg
上级
7cb886e7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
6 deletion
+9
-6
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+1
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-1
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+7
-4
未找到文件。
source/libs/executor/inc/executorimpl.h
浏览文件 @
16b6ce82
...
...
@@ -806,7 +806,7 @@ SOperatorInfo* createMergeIntervalOperatorInfo(SOperatorInfo* downstream, SExprI
SOperatorInfo
*
createMergeAlignedIntervalOperatorInfo
(
SOperatorInfo
*
downstream
,
SExprInfo
*
pExprInfo
,
int32_t
numOfCols
,
SSDataBlock
*
pResBlock
,
SInterval
*
pInterval
,
int32_t
primaryTsSlotId
,
SExecTaskInfo
*
pTaskInfo
);
S
Node
*
pCondition
,
S
ExecTaskInfo
*
pTaskInfo
);
SOperatorInfo
*
createStreamFinalIntervalOperatorInfo
(
SOperatorInfo
*
downstream
,
SPhysiNode
*
pPhyNode
,
SExecTaskInfo
*
pTaskInfo
,
int32_t
numOfChild
);
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
16b6ce82
...
...
@@ -4449,7 +4449,7 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
.
precision
=
((
SColumnNode
*
)
pIntervalPhyNode
->
window
.
pTspk
)
->
node
.
resType
.
precision
};
int32_t
tsSlotId
=
((
SColumnNode
*
)
pIntervalPhyNode
->
window
.
pTspk
)
->
slotId
;
pOptr
=
createMergeAlignedIntervalOperatorInfo
(
ops
[
0
],
pExprInfo
,
num
,
pResBlock
,
&
interval
,
tsSlotId
,
pTaskInfo
);
pOptr
=
createMergeAlignedIntervalOperatorInfo
(
ops
[
0
],
pExprInfo
,
num
,
pResBlock
,
&
interval
,
tsSlotId
,
p
PhyNode
->
pConditions
,
p
TaskInfo
);
}
else
if
(
QUERY_NODE_PHYSICAL_PLAN_MERGE_INTERVAL
==
type
)
{
SMergeIntervalPhysiNode
*
pIntervalPhyNode
=
(
SMergeIntervalPhysiNode
*
)
pPhyNode
;
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
16b6ce82
...
...
@@ -4363,6 +4363,8 @@ typedef struct SMergeAlignedIntervalAggOperatorInfo {
uint64_t
groupId
;
SSDataBlock
*
prefetchedBlock
;
bool
inputBlocksFinished
;
SNode
*
pCondition
;
}
SMergeAlignedIntervalAggOperatorInfo
;
void
destroyMergeAlignedIntervalOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
...
...
@@ -4498,8 +4500,8 @@ static SSDataBlock* doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
getTableScanInfo
(
pOperator
,
&
iaInfo
->
order
,
&
scanFlag
);
setInputDataBlock
(
pOperator
,
pSup
->
pCtx
,
pBlock
,
iaInfo
->
order
,
scanFlag
,
true
);
doMergeAlignedIntervalAggImpl
(
pOperator
,
&
iaInfo
->
binfo
.
resultRowInfo
,
pBlock
,
scanFlag
,
pRes
);
if
(
pRes
->
info
.
rows
>
=
pOperator
->
resultInfo
.
threshold
)
{
doFilter
(
miaInfo
->
pCondition
,
pRes
);
if
(
pRes
->
info
.
rows
>
0
)
{
break
;
}
}
...
...
@@ -4507,7 +4509,7 @@ static SSDataBlock* doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
pRes
->
info
.
groupId
=
miaInfo
->
groupId
;
}
if
(
pRes
->
info
.
rows
==
0
)
{
if
(
miaInfo
->
inputBlocksFinished
)
{
doSetOperatorCompleted
(
pOperator
);
}
...
...
@@ -4518,7 +4520,7 @@ static SSDataBlock* doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
SOperatorInfo
*
createMergeAlignedIntervalOperatorInfo
(
SOperatorInfo
*
downstream
,
SExprInfo
*
pExprInfo
,
int32_t
numOfCols
,
SSDataBlock
*
pResBlock
,
SInterval
*
pInterval
,
int32_t
primaryTsSlotId
,
SExecTaskInfo
*
pTaskInfo
)
{
int32_t
primaryTsSlotId
,
S
Node
*
pCondition
,
S
ExecTaskInfo
*
pTaskInfo
)
{
SMergeAlignedIntervalAggOperatorInfo
*
miaInfo
=
taosMemoryCalloc
(
1
,
sizeof
(
SMergeAlignedIntervalAggOperatorInfo
));
SOperatorInfo
*
pOperator
=
taosMemoryCalloc
(
1
,
sizeof
(
SOperatorInfo
));
if
(
miaInfo
==
NULL
||
pOperator
==
NULL
)
{
...
...
@@ -4528,6 +4530,7 @@ SOperatorInfo* createMergeAlignedIntervalOperatorInfo(SOperatorInfo* downstream,
SIntervalAggOperatorInfo
*
iaInfo
=
&
miaInfo
->
intervalAggOperatorInfo
;
SExprSupp
*
pSup
=
&
pOperator
->
exprSupp
;
miaInfo
->
pCondition
=
pCondition
;
iaInfo
->
win
=
pTaskInfo
->
window
;
iaInfo
->
order
=
TSDB_ORDER_ASC
;
iaInfo
->
interval
=
*
pInterval
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录