Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
74bea443
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看板
提交
74bea443
编写于
6月 20, 2023
作者:
L
liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stream op transform
上级
aafbdcb4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
29 addition
and
3 deletion
+29
-3
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+10
-2
source/libs/executor/inc/executorInt.h
source/libs/executor/inc/executorInt.h
+2
-0
source/libs/executor/src/executorInt.c
source/libs/executor/src/executorInt.c
+14
-0
source/libs/executor/src/filloperator.c
source/libs/executor/src/filloperator.c
+1
-0
source/libs/executor/src/groupoperator.c
source/libs/executor/src/groupoperator.c
+1
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-1
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
74bea443
...
...
@@ -779,8 +779,12 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) {
if
(
pTask
->
info
.
taskLevel
==
TASK_LEVEL__SOURCE
)
{
SStreamTask
*
pSateTask
=
pTask
;
SStreamTask
task
=
{
0
};
if
(
pTask
->
info
.
fillHistory
)
{
pSateTask
=
*
(
SStreamTask
**
)
taosHashGet
(
pTq
->
pStreamMeta
->
pTasks
,
&
pTask
->
streamTaskId
.
taskId
,
sizeof
(
int32_t
));
task
.
id
=
pTask
->
streamTaskId
;
SStreamMeta
meta
=
{
0
};
task
.
pMeta
=
pTask
->
pMeta
;
pSateTask
=
&
task
;
}
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pSateTask
,
false
,
-
1
,
-
1
);
if
(
pTask
->
pState
==
NULL
)
{
...
...
@@ -798,8 +802,12 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) {
qSetTaskId
(
pTask
->
exec
.
pExecutor
,
pTask
->
id
.
taskId
,
pTask
->
id
.
streamId
);
}
else
if
(
pTask
->
info
.
taskLevel
==
TASK_LEVEL__AGG
)
{
SStreamTask
*
pSateTask
=
pTask
;
SStreamTask
task
=
{
0
};
if
(
pTask
->
info
.
fillHistory
)
{
pSateTask
=
*
(
SStreamTask
**
)
taosHashGet
(
pTq
->
pStreamMeta
->
pTasks
,
&
pTask
->
streamTaskId
.
taskId
,
sizeof
(
int32_t
));
task
.
id
=
pTask
->
streamTaskId
;
SStreamMeta
meta
=
{
0
};
task
.
pMeta
=
pTask
->
pMeta
;
pSateTask
=
&
task
;
}
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pSateTask
,
false
,
-
1
,
-
1
);
if
(
pTask
->
pState
==
NULL
)
{
...
...
source/libs/executor/inc/executorInt.h
浏览文件 @
74bea443
...
...
@@ -682,6 +682,8 @@ void doUpdateNumOfRows(SqlFunctionCtx* pCtx, SResultRow* pRow, int32_t numOfExpr
void
doClearBufferedBlocks
(
SStreamScanInfo
*
pInfo
);
uint64_t
calcGroupId
(
char
*
pData
,
int32_t
len
);
void
streamOpReleaseState
(
struct
SOperatorInfo
*
pOperator
);
void
streamOpReloadState
(
struct
SOperatorInfo
*
pOperator
);
#ifdef __cplusplus
}
...
...
source/libs/executor/src/executorInt.c
浏览文件 @
74bea443
...
...
@@ -1086,3 +1086,17 @@ void qStreamCloseTsdbReader(void* task) {
}
}
}
void
streamOpReleaseState
(
SOperatorInfo
*
pOperator
)
{
SOperatorInfo
*
downstream
=
pOperator
->
pDownstream
[
0
];
if
(
downstream
->
fpSet
.
releaseStreamStateFn
)
{
downstream
->
fpSet
.
releaseStreamStateFn
(
downstream
);
}
}
void
streamOpReloadState
(
SOperatorInfo
*
pOperator
)
{
SOperatorInfo
*
downstream
=
pOperator
->
pDownstream
[
0
];
if
(
downstream
->
fpSet
.
reloadStreamStateFn
)
{
downstream
->
fpSet
.
reloadStreamStateFn
(
downstream
);
}
}
source/libs/executor/src/filloperator.c
浏览文件 @
74bea443
...
...
@@ -1560,6 +1560,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
doStreamFill
,
NULL
,
destroyStreamFillOperatorInfo
,
optrDefaultBufFn
,
NULL
);
setOperatorStreamStateFn
(
pOperator
,
streamOpReleaseState
,
streamOpReloadState
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
source/libs/executor/src/groupoperator.c
浏览文件 @
74bea443
...
...
@@ -1326,6 +1326,7 @@ SOperatorInfo* createStreamPartitionOperatorInfo(SOperatorInfo* downstream, SStr
pOperator
->
exprSupp
.
pExprInfo
=
pExprInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
doStreamHashPartition
,
NULL
,
destroyStreamPartitionOperatorInfo
,
optrDefaultBufFn
,
NULL
);
setOperatorStreamStateFn
(
pOperator
,
streamOpReleaseState
,
streamOpReloadState
);
initParDownStream
(
downstream
,
&
pInfo
->
partitionSup
,
&
pInfo
->
scalarSup
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
74bea443
...
...
@@ -2531,12 +2531,12 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
setOperatorInfo
(
pOperator
,
STREAM_SCAN_OP_NAME
,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorStreamStateFn
(
pOperator
,
streamScanReleaseState
,
streamScanReloadState
);
pOperator
->
exprSupp
.
numOfExprs
=
taosArrayGetSize
(
pInfo
->
pRes
->
pDataBlock
);
__optr_fn_t
nextFn
=
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
)
?
doStreamScan
:
doQueueScan
;
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
nextFn
,
NULL
,
destroyStreamScanOperatorInfo
,
optrDefaultBufFn
,
NULL
);
setOperatorStreamStateFn
(
pOperator
,
streamScanReleaseState
,
streamScanReloadState
);
return
pOperator
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录