Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
9359d738
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看板
提交
9359d738
编写于
3月 10, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/scheduler
上级
9f140cec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
54 addition
and
28 deletion
+54
-28
source/common/src/tmsg.c
source/common/src/tmsg.c
+34
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+20
-27
未找到文件。
source/common/src/tmsg.c
浏览文件 @
9359d738
无法预览此类型文件
source/libs/executor/src/executorimpl.c
浏览文件 @
9359d738
...
...
@@ -8098,8 +8098,7 @@ static tsdbReaderT doCreateDataReader(STableScanPhysiNode* pTableScanNode, SRead
static
int32_t
doCreateTableGroup
(
void
*
metaHandle
,
int32_t
tableType
,
uint64_t
tableUid
,
STableGroupInfo
*
pGroupInfo
,
uint64_t
queryId
,
uint64_t
taskId
);
int32_t
doCreateOperatorTreeNode
(
SPhysiNode
*
pPhyNode
,
SExecTaskInfo
*
pTaskInfo
,
SReadHandle
*
pHandle
,
uint64_t
queryId
,
uint64_t
taskId
,
STableGroupInfo
*
pTableGroupInfo
,
SQueryErrorInfo
*
errInfo
)
{
int32_t
code
=
0
;
SOperatorInfo
*
doCreateOperatorTreeNode
(
SPhysiNode
*
pPhyNode
,
SExecTaskInfo
*
pTaskInfo
,
SReadHandle
*
pHandle
,
uint64_t
queryId
,
uint64_t
taskId
,
STableGroupInfo
*
pTableGroupInfo
,
SQueryErrorInfo
*
errInfo
)
{
if
(
nodeType
(
pPhyNode
)
==
QUERY_NODE_PHYSICAL_PLAN_PROJECT
)
{
// ignore the project node
pPhyNode
=
nodesListGetNode
(
pPhyNode
->
pChildren
,
0
);
}
...
...
@@ -8111,18 +8110,18 @@ int32_t doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo,
char
tableFName
[
TSDB_TABLE_FNAME_LEN
];
tNameExtractFullName
(
&
pScanPhyNode
->
tableName
,
tableFName
);
code
=
vnodeValidateTableHash
(
pHandle
->
config
,
tableFName
);
int32_t
code
=
vnodeValidateTableHash
(
pHandle
->
config
,
tableFName
);
if
(
code
)
{
errInfo
->
code
=
code
;
errInfo
->
tableName
=
pScanPhyNode
->
tableName
;
return
code
;
return
NULL
;
}
size_t
numOfCols
=
LIST_LENGTH
(
pScanPhyNode
->
pScanCols
);
tsdbReaderT
pDataReader
=
doCreateDataReader
((
STableScanPhysiNode
*
)
pPhyNode
,
pHandle
,
(
uint64_t
)
queryId
,
taskId
);
code
=
doCreateTableGroup
(
pHandle
->
meta
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
pTableGroupInfo
,
queryId
,
taskId
);
pTaskInfo
->
pRoot
=
createTableScanOperatorInfo
(
pDataReader
,
pScanPhyNode
->
order
,
numOfCols
,
pScanPhyNode
->
count
,
return
createTableScanOperatorInfo
(
pDataReader
,
pScanPhyNode
->
order
,
numOfCols
,
pScanPhyNode
->
count
,
pScanPhyNode
->
reverse
,
pTaskInfo
);
}
else
if
(
QUERY_NODE_PHYSICAL_PLAN_EXCHANGE
==
nodeType
(
pPhyNode
))
{
SExchangePhysiNode
*
pExchange
=
(
SExchangePhysiNode
*
)
pPhyNode
;
...
...
@@ -8132,11 +8131,7 @@ int32_t doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo,
SScanPhysiNode
*
pScanPhyNode
=
(
SScanPhysiNode
*
)
pPhyNode
;
// simple child table.
STableGroupInfo
groupInfo
=
{
0
};
code
=
doCreateTableGroup
(
pHandle
->
meta
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
&
groupInfo
,
queryId
,
taskId
);
if
(
code
)
{
return
code
;
}
int32_t
code
=
doCreateTableGroup
(
pHandle
->
meta
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
&
groupInfo
,
queryId
,
taskId
);
SArray
*
idList
=
NULL
;
if
(
groupInfo
.
numOfTables
>
0
)
{
...
...
@@ -8155,11 +8150,9 @@ int32_t doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo,
idList
=
taosArrayInit
(
4
,
sizeof
(
uint64_t
));
}
// SOperatorInfo* pOperator = createStreamScanOperatorInfo(pHandle->reader, pScanPhyNode->pScanCols, idList, pTaskInfo);
// taosArrayDestroy(idList);
// //TODO destroy groupInfo
// return pOperator;
// SOperatorInfo* pOperator = createStreamScanOperatorInfo(pHandle->reader, pScanPhyNode->pScanCols, idList, pTaskInfo);
taosArrayDestroy
(
idList
);
// return pOperator;
}
}
...
...
@@ -8169,14 +8162,14 @@ int32_t doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo,
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
SPhysiNode
*
pChildNode
=
(
SPhysiNode
*
)
nodesListGetNode
(
pPhyNode
->
pChildren
,
i
);
code
=
doCreateOperatorTreeNode
(
pChildNode
,
pTaskInfo
,
pHandle
,
queryId
,
taskId
,
pTableGroupInfo
,
errInfo
);
if
(
code
)
{
return
code
;
SOperatorInfo
*
op
=
doCreateOperatorTreeNode
(
pChildNode
,
pTaskInfo
,
pHandle
,
queryId
,
taskId
,
pTableGroupInfo
,
errInfo
);
if
(
errInfo
->
code
)
{
return
NULL
;
}
SArray
*
pExprInfo
=
createExprInfo
((
SAggPhysiNode
*
)
pPhyNode
);
SSDataBlock
*
pResBlock
=
createOutputBuf_rv1
(
pPhyNode
->
pOutputDataBlockDesc
);
pTaskInfo
->
pRoot
=
createAggregateOperatorInfo
(
pTaskInfo
->
pRoot
,
pExprInfo
,
pResBlock
,
pTaskInfo
,
pTableGroupInfo
);
return
createAggregateOperatorInfo
(
op
,
pExprInfo
,
pResBlock
,
pTaskInfo
,
pTableGroupInfo
);
}
}
/*else if (pPhyNode->info.type == OP_MultiTableAggregate) {
size_t size = taosArrayGetSize(pPhyNode->pChildren);
...
...
@@ -8188,12 +8181,6 @@ int32_t doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo,
return createMultiTableAggOperatorInfo(op, pPhyNode->pTargets, pTaskInfo, pTableGroupInfo);
}
}*/
if
(
pTaskInfo
->
pRoot
==
NULL
)
{
code
=
TSDB_CODE_QRY_OUT_OF_MEMORY
;
}
return
code
;
}
static
tsdbReaderT
createDataReaderImpl
(
STableScanPhysiNode
*
pTableScanNode
,
STableGroupInfo
*
pGroupInfo
,
void
*
readHandle
,
uint64_t
queryId
,
uint64_t
taskId
)
{
...
...
@@ -8267,8 +8254,14 @@ int32_t createExecTaskInfoImpl(SSubplan* pPlan, SExecTaskInfo** pTaskInfo, SRead
}
STableGroupInfo
group
=
{
0
};
code
=
doCreateOperatorTreeNode
(
pPlan
->
pNode
,
*
pTaskInfo
,
pHandle
,
queryId
,
taskId
,
&
group
,
errInfo
);
if
(
code
)
{
(
*
pTaskInfo
)
->
pRoot
=
doCreateOperatorTreeNode
(
pPlan
->
pNode
,
*
pTaskInfo
,
pHandle
,
queryId
,
taskId
,
&
group
,
errInfo
);
if
(
errInfo
->
code
)
{
code
=
errInfo
->
code
;
goto
_complete
;
}
if
((
*
pTaskInfo
)
->
pRoot
==
NULL
)
{
code
=
TSDB_CODE_QRY_OUT_OF_MEMORY
;
goto
_complete
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录