Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ff5f1aa1
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
ff5f1aa1
编写于
7月 10, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(stream)
上级
5640036f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
76 deletion
+6
-76
source/dnode/vnode/src/tq/tqExec.c
source/dnode/vnode/src/tq/tqExec.c
+0
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+6
-75
未找到文件。
source/dnode/vnode/src/tq/tqExec.c
浏览文件 @
ff5f1aa1
...
...
@@ -94,7 +94,6 @@ int64_t tqScan(STQ* pTq, const STqExecHandle* pExec, SMqDataRsp* pRsp, STqOffset
rowCnt
+=
pDataBlock
->
info
.
rows
;
if
(
rowCnt
<=
4096
)
continue
;
}
continue
;
}
void
*
meta
=
qStreamExtractMetaMsg
(
task
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
ff5f1aa1
...
...
@@ -1234,9 +1234,6 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
doFilter
(
pInfo
->
pCondition
,
pInfo
->
pRes
);
blockDataUpdateTsWindow
(
pInfo
->
pRes
,
pInfo
->
primaryTsIndex
);
if
(
pBlockInfo
->
rows
>
0
)
{
return
0
;
}
return
0
;
}
...
...
@@ -1262,7 +1259,9 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
/*pTaskInfo->streamInfo.lastStatus = ret.offset;*/
if
(
pInfo
->
pRes
->
info
.
rows
>
0
)
{
return
pInfo
->
pRes
;
/*} else {*/
}
else
{
// data is filtered out, do clean
/*tDeleteSSDataBlock(&ret.data);*/
}
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__META
)
{
...
...
@@ -1271,14 +1270,8 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
pTaskInfo
->
streamInfo
.
metaBlk
=
ret
.
meta
;
return
NULL
;
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__NONE
)
{
/*if (ret.offset.version == -1) {*/
/*pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__LOG;*/
/*pTaskInfo->streamInfo.lastStatus.version = pTaskInfo->streamInfo.prepareStatus.version - 1;*/
/*} else {*/
pTaskInfo
->
streamInfo
.
lastStatus
=
ret
.
offset
;
/*pTaskInfo->streamInfo.lastScanUid */
ASSERT
(
pTaskInfo
->
streamInfo
.
lastStatus
.
version
+
1
>=
pTaskInfo
->
streamInfo
.
prepareStatus
.
version
);
/*}*/
return
NULL
;
}
else
{
ASSERT
(
0
);
...
...
@@ -1398,72 +1391,8 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
return
NULL
;
}
pInfo
->
pRes
->
info
.
rows
=
block
.
info
.
rows
;
pInfo
->
pRes
->
info
.
uid
=
block
.
info
.
uid
;
pInfo
->
pRes
->
info
.
type
=
STREAM_NORMAL
;
pInfo
->
pRes
->
info
.
capacity
=
block
.
info
.
rows
;
uint64_t
*
groupIdPre
=
taosHashGet
(
pOperator
->
pTaskInfo
->
tableqinfoList
.
map
,
&
block
.
info
.
uid
,
sizeof
(
int64_t
));
if
(
groupIdPre
)
{
pInfo
->
pRes
->
info
.
groupId
=
*
groupIdPre
;
}
else
{
pInfo
->
pRes
->
info
.
groupId
=
0
;
}
// for generating rollup SMA result, each time is an independent time serie.
// TODO temporarily used, when the statement of "partition by tbname" is ready, remove this
if
(
pInfo
->
assignBlockUid
)
{
pInfo
->
pRes
->
info
.
groupId
=
block
.
info
.
uid
;
}
// todo extract method
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pInfo
->
pColMatchInfo
);
++
i
)
{
SColMatchInfo
*
pColMatchInfo
=
taosArrayGet
(
pInfo
->
pColMatchInfo
,
i
);
if
(
!
pColMatchInfo
->
output
)
{
continue
;
}
bool
colExists
=
false
;
for
(
int32_t
j
=
0
;
j
<
blockDataGetNumOfCols
(
&
block
);
++
j
)
{
SColumnInfoData
*
pResCol
=
bdGetColumnInfoData
(
&
block
,
j
);
if
(
pResCol
->
info
.
colId
==
pColMatchInfo
->
colId
)
{
taosArraySet
(
pInfo
->
pRes
->
pDataBlock
,
pColMatchInfo
->
targetSlotId
,
pResCol
);
colExists
=
true
;
break
;
}
}
// the required column does not exists in submit block, let's set it to be all null value
if
(
!
colExists
)
{
SColumnInfoData
*
pDst
=
taosArrayGet
(
pInfo
->
pRes
->
pDataBlock
,
pColMatchInfo
->
targetSlotId
);
colDataAppendNNULL
(
pDst
,
0
,
pBlockInfo
->
rows
);
}
}
taosArrayDestroy
(
block
.
pDataBlock
);
ASSERT
(
pInfo
->
pRes
->
pDataBlock
!=
NULL
);
#if 0
if (pInfo->pRes->pDataBlock == NULL) {
// TODO add log
updateInfoDestoryColseWinSBF(pInfo->pUpdateInfo);
pOperator->status = OP_EXEC_DONE;
pTaskInfo->code = terrno;
return NULL;
}
#endif
// currently only the tbname pseudo column
if
(
pInfo
->
numOfPseudoExpr
>
0
)
{
code
=
addTagPseudoColumnData
(
&
pInfo
->
readHandle
,
pInfo
->
pPseudoExpr
,
pInfo
->
numOfPseudoExpr
,
pInfo
->
pRes
,
GET_TASKID
(
pTaskInfo
));
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
longjmp
(
pTaskInfo
->
env
,
code
);
}
}
setBlockIntoRes
(
pInfo
,
&
block
);
doFilter
(
pInfo
->
pCondition
,
pInfo
->
pRes
);
blockDataUpdateTsWindow
(
pInfo
->
pRes
,
pInfo
->
primaryTsIndex
);
if
(
pBlockInfo
->
rows
>
0
)
{
break
;
}
...
...
@@ -1493,12 +1422,14 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
return
(
pBlockInfo
->
rows
==
0
)
?
NULL
:
pInfo
->
pRes
;
#if 0
} else if (pInfo->blockType == STREAM_INPUT__TABLE_SCAN) {
ASSERT(0);
// check reader last status
// if not match, reset status
SSDataBlock* pResult = doTableScan(pInfo->pTableScanOp);
return pResult && pResult->info.rows > 0 ? pResult : NULL;
#endif
}
else
{
ASSERT
(
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录