Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
896b269f
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看板
提交
896b269f
编写于
2月 13, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818] refactor.
上级
1ae36227
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+13
-13
未找到文件。
source/libs/executor/src/executorimpl.c
浏览文件 @
896b269f
...
@@ -3990,7 +3990,7 @@ static int32_t doCopyToSDataBlock(STaskRuntimeEnv* pRuntimeEnv, SGroupResInfo* p
...
@@ -3990,7 +3990,7 @@ static int32_t doCopyToSDataBlock(STaskRuntimeEnv* pRuntimeEnv, SGroupResInfo* p
return
0
;
return
0
;
}
}
static
void
toS
SDataB
lock
(
SGroupResInfo
*
pGroupResInfo
,
STaskRuntimeEnv
*
pRuntimeEnv
,
SSDataBlock
*
pBlock
)
{
static
void
toS
Datab
lock
(
SGroupResInfo
*
pGroupResInfo
,
STaskRuntimeEnv
*
pRuntimeEnv
,
SSDataBlock
*
pBlock
)
{
assert
(
pGroupResInfo
->
currentGroup
<=
pGroupResInfo
->
totalGroup
);
assert
(
pGroupResInfo
->
currentGroup
<=
pGroupResInfo
->
totalGroup
);
pBlock
->
info
.
rows
=
0
;
pBlock
->
info
.
rows
=
0
;
...
@@ -6167,7 +6167,7 @@ static SSDataBlock* doMultiTableAggregate(void* param, bool* newgroup) {
...
@@ -6167,7 +6167,7 @@ static SSDataBlock* doMultiTableAggregate(void* param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
pRes
);
if
(
pInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6221,7 +6221,7 @@ static SSDataBlock* doMultiTableAggregate(void* param, bool* newgroup) {
...
@@ -6221,7 +6221,7 @@ static SSDataBlock* doMultiTableAggregate(void* param, bool* newgroup) {
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pInfo
->
resultRowInfo
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pInfo
->
resultRowInfo
);
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
pRes
);
if
(
pInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
}
}
...
@@ -6411,7 +6411,7 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
...
@@ -6411,7 +6411,7 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
}
}
...
@@ -6451,7 +6451,7 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
...
@@ -6451,7 +6451,7 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
finalizeQueryResult
(
pOperator
,
pIntervalInfo
->
pCtx
,
&
pIntervalInfo
->
resultRowInfo
,
pIntervalInfo
->
rowCellInfoOffset
);
finalizeQueryResult
(
pOperator
,
pIntervalInfo
->
pCtx
,
&
pIntervalInfo
->
resultRowInfo
,
pIntervalInfo
->
rowCellInfoOffset
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pIntervalInfo
->
resultRowInfo
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pIntervalInfo
->
resultRowInfo
);
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
...
@@ -6470,7 +6470,7 @@ static SSDataBlock* doAllIntervalAgg(void* param, bool* newgroup) {
...
@@ -6470,7 +6470,7 @@ static SSDataBlock* doAllIntervalAgg(void* param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
...
@@ -6511,7 +6511,7 @@ static SSDataBlock* doAllIntervalAgg(void* param, bool* newgroup) {
...
@@ -6511,7 +6511,7 @@ static SSDataBlock* doAllIntervalAgg(void* param, bool* newgroup) {
finalizeQueryResult
(
pOperator
,
pIntervalInfo
->
pCtx
,
&
pIntervalInfo
->
resultRowInfo
,
pIntervalInfo
->
rowCellInfoOffset
);
finalizeQueryResult
(
pOperator
,
pIntervalInfo
->
pCtx
,
&
pIntervalInfo
->
resultRowInfo
,
pIntervalInfo
->
rowCellInfoOffset
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pIntervalInfo
->
resultRowInfo
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pIntervalInfo
->
resultRowInfo
);
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6725,7 +6725,7 @@ static SSDataBlock* doStateWindowAgg(void *param, bool* newgroup) {
...
@@ -6725,7 +6725,7 @@ static SSDataBlock* doStateWindowAgg(void *param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6763,7 +6763,7 @@ static SSDataBlock* doStateWindowAgg(void *param, bool* newgroup) {
...
@@ -6763,7 +6763,7 @@ static SSDataBlock* doStateWindowAgg(void *param, bool* newgroup) {
finalizeQueryResult
(
pOperator
,
pBInfo
->
pCtx
,
&
pBInfo
->
resultRowInfo
,
pBInfo
->
rowCellInfoOffset
);
finalizeQueryResult
(
pOperator
,
pBInfo
->
pCtx
,
&
pBInfo
->
resultRowInfo
,
pBInfo
->
rowCellInfoOffset
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pBInfo
->
resultRowInfo
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pBInfo
->
resultRowInfo
);
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6784,7 +6784,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
...
@@ -6784,7 +6784,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6823,7 +6823,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
...
@@ -6823,7 +6823,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
finalizeQueryResult
(
pOperator
,
pBInfo
->
pCtx
,
&
pBInfo
->
resultRowInfo
,
pBInfo
->
rowCellInfoOffset
);
finalizeQueryResult
(
pOperator
,
pBInfo
->
pCtx
,
&
pBInfo
->
resultRowInfo
,
pBInfo
->
rowCellInfoOffset
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pBInfo
->
resultRowInfo
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pBInfo
->
resultRowInfo
);
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6842,7 +6842,7 @@ static SSDataBlock* hashGroupbyAggregate(void* param, bool* newgroup) {
...
@@ -6842,7 +6842,7 @@ static SSDataBlock* hashGroupbyAggregate(void* param, bool* newgroup) {
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STaskRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
if
(
pInfo
->
binfo
.
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pInfo
->
binfo
.
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
@@ -6886,7 +6886,7 @@ static SSDataBlock* hashGroupbyAggregate(void* param, bool* newgroup) {
...
@@ -6886,7 +6886,7 @@ static SSDataBlock* hashGroupbyAggregate(void* param, bool* newgroup) {
sortGroupResByOrderList
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
sortGroupResByOrderList
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
}
}
toS
SDataB
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
toS
Datab
lock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
binfo
.
pRes
);
if
(
pInfo
->
binfo
.
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
if
(
pInfo
->
binfo
.
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
pOperator
->
status
=
OP_EXEC_DONE
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录