Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
36aedfbb
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
36aedfbb
编写于
2月 17, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818] create streamscan operator when no tables created.
上级
ef3b41e2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
11 deletion
+23
-11
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+3
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+20
-10
未找到文件。
source/dnode/vnode/inc/vnode.h
浏览文件 @
36aedfbb
...
...
@@ -215,13 +215,15 @@ static FORCE_INLINE void tqReadHandleSetColIdList(STqReadHandle *pReadHandle, SA
static
FORCE_INLINE
int
tqReadHandleSetTbUidList
(
STqReadHandle
*
pHandle
,
const
SArray
*
tbUidList
)
{
pHandle
->
tbIdHash
=
taosHashInit
(
64
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BIGINT
),
true
,
HASH_NO_LOCK
);
if
(
pHandle
->
tbIdHash
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
for
(
int
i
=
0
;
i
<
taosArrayGetSize
(
tbUidList
);
i
++
)
{
int64_t
*
pKey
=
(
int64_t
*
)
taosArrayGet
(
tbUidList
,
i
);
taosHashPut
(
pHandle
->
tbIdHash
,
pKey
,
sizeof
(
int64_t
),
NULL
,
0
);
// pHandle->tbUid = tbUid;
}
return
0
;
}
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
36aedfbb
...
...
@@ -5447,7 +5447,12 @@ SOperatorInfo* createStreamScanOperatorInfo(void *streamReadHandle, SArray* pExp
// set the extract column id to streamHandle
tqReadHandleSetColIdList
((
STqReadHandle
*
)
streamReadHandle
,
pColList
);
tqReadHandleSetTbUidList
(
streamReadHandle
,
pTableIdList
);
int32_t
code
=
tqReadHandleSetTbUidList
(
streamReadHandle
,
pTableIdList
);
if
(
code
!=
0
)
{
tfree
(
pInfo
);
tfree
(
pOperator
);
return
NULL
;
}
pInfo
->
readerHandle
=
streamReadHandle
;
...
...
@@ -5462,7 +5467,6 @@ SOperatorInfo* createStreamScanOperatorInfo(void *streamReadHandle, SArray* pExp
return
pOperator
;
}
void
setTableScanFilterOperatorInfo
(
STableScanInfo
*
pTableScanInfo
,
SOperatorInfo
*
pDownstream
)
{
assert
(
pTableScanInfo
!=
NULL
&&
pDownstream
!=
NULL
);
...
...
@@ -8186,16 +8190,22 @@ SOperatorInfo* doCreateOperatorTreeNode(SPhyNode* pPhyNode, SExecTaskInfo* pTask
STableGroupInfo
groupInfo
=
{
0
};
int32_t
code
=
doCreateTableGroup
(
pHandle
->
meta
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
&
groupInfo
,
queryId
,
taskId
);
SArray
*
idList
=
NULL
;
if
(
groupInfo
.
numOfTables
>
0
)
{
SArray
*
pa
=
taosArrayGetP
(
groupInfo
.
pGroupList
,
0
);
ASSERT
(
taosArrayGetSize
(
groupInfo
.
pGroupList
)
==
1
);
SArray
*
pa
=
taosArrayGetP
(
groupInfo
.
pGroupList
,
0
);
ASSERT
(
taosArrayGetSize
(
groupInfo
.
pGroupList
)
==
1
);
// Transfer the Array of STableKeyInfo into uid list.
size_t
numOfTables
=
taosArrayGetSize
(
pa
);
for
(
int32_t
i
=
0
;
i
<
numOfTables
;
++
i
)
{
STableKeyInfo
*
pkeyInfo
=
taosArrayGet
(
pa
,
i
);
taosArrayPush
(
idList
,
&
pkeyInfo
->
uid
);
}
// Transfer the Array of STableKeyInfo into uid list.
size_t
numOfTables
=
taosArrayGetSize
(
pa
);
SArray
*
idList
=
taosArrayInit
(
numOfTables
,
sizeof
(
uint64_t
));
for
(
int32_t
i
=
0
;
i
<
numOfTables
;
++
i
)
{
STableKeyInfo
*
pkeyInfo
=
taosArrayGet
(
pa
,
i
);
taosArrayPush
(
idList
,
&
pkeyInfo
->
uid
);
idList
=
taosArrayInit
(
numOfTables
,
sizeof
(
uint64_t
));
}
else
{
idList
=
taosArrayInit
(
4
,
sizeof
(
uint64_t
));
}
SOperatorInfo
*
pOperator
=
createStreamScanOperatorInfo
(
pHandle
->
reader
,
pPhyNode
->
pTargets
,
idList
,
pTaskInfo
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录