Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0d108957
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看板
提交
0d108957
编写于
7月 02, 2022
作者:
5
54liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): project ignore retrive datablock
上级
c9f133a5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
3 deletion
+28
-3
include/common/tcommon.h
include/common/tcommon.h
+2
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+1
-0
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+4
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+18
-0
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+2
-2
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
未找到文件。
include/common/tcommon.h
浏览文件 @
0d108957
...
...
@@ -56,7 +56,8 @@ typedef enum EStreamType {
STREAM_CLEAR
,
STREAM_INVALID
,
STREAM_GET_ALL
,
STREAM_DELETE
,
STREAM_DELETE_RESULT
,
STREAM_DELETE_DATA
,
STREAM_RETRIEVE
,
STREAM_PULL_DATA
,
STREAM_PULL_OVER
,
...
...
source/common/src/tdatablock.c
浏览文件 @
0d108957
...
...
@@ -1259,6 +1259,7 @@ int32_t copyDataBlock(SSDataBlock* dst, const SSDataBlock* src) {
dst
->
info
.
rows
=
src
->
info
.
rows
;
dst
->
info
.
window
=
src
->
info
.
window
;
dst
->
info
.
type
=
src
->
info
.
type
;
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
0d108957
...
...
@@ -3253,6 +3253,10 @@ static SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
doSetOperatorCompleted
(
pOperator
);
break
;
}
if
(
pBlock
->
info
.
type
==
STREAM_RETRIEVE
)
{
// for stream interval
return
pBlock
;
}
// the pDataBlock are always the same one, no need to call this again
int32_t
code
=
getTableScanInfo
(
pOperator
->
pDownstream
[
0
],
&
order
,
&
scanFlag
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
0d108957
...
...
@@ -807,6 +807,23 @@ static bool isStateWindow(SStreamBlockScanInfo* pInfo) {
return
pInfo
->
sessionSup
.
parentType
==
QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE
;
}
static
void
setGroupId
(
SStreamBlockScanInfo
*
pInfo
,
SSDataBlock
*
pBlock
,
int32_t
groupColIndex
,
int32_t
rowIndex
)
{
ASSERT
(
rowIndex
<
pBlock
->
info
.
rows
);
switch
(
pBlock
->
info
.
type
)
{
case
STREAM_RETRIEVE
:
{
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
groupColIndex
);
uint64_t
*
groupCol
=
(
uint64_t
*
)
pColInfo
->
pData
;
pInfo
->
groupId
=
groupCol
[
rowIndex
];
}
break
;
case
STREAM_DELETE_DATA
:
break
;
default:
break
;
}
}
static
bool
prepareDataScan
(
SStreamBlockScanInfo
*
pInfo
,
SSDataBlock
*
pSDB
,
int32_t
tsColIndex
,
int32_t
*
pRowIndex
)
{
STimeWindow
win
=
{
.
skey
=
INT64_MIN
,
...
...
@@ -829,6 +846,7 @@ static bool prepareDataScan(SStreamBlockScanInfo* pInfo, SSDataBlock* pSDB, int3
}
else
{
win
=
getActiveTimeWindow
(
NULL
,
&
dumyInfo
,
tsCols
[(
*
pRowIndex
)],
&
pInfo
->
interval
,
pInfo
->
interval
.
precision
,
NULL
);
setGroupId
(
pInfo
,
pSDB
,
2
,
*
pRowIndex
);
(
*
pRowIndex
)
+=
getNumOfRowsInTimeWindow
(
&
pSDB
->
info
,
tsCols
,
(
*
pRowIndex
),
win
.
ekey
,
binarySearchForKey
,
NULL
,
TSDB_ORDER_ASC
);
}
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
0d108957
...
...
@@ -2852,7 +2852,7 @@ SOperatorInfo* createStreamSessionAggOperatorInfo(SOperatorInfo* downstream, SPh
pInfo
->
pStDeleted
=
taosHashInit
(
64
,
hashFn
,
true
,
HASH_NO_LOCK
);
pInfo
->
pDelIterator
=
NULL
;
pInfo
->
pDelRes
=
createOneDataBlock
(
pResBlock
,
false
);
pInfo
->
pDelRes
->
info
.
type
=
STREAM_DELETE
;
pInfo
->
pDelRes
->
info
.
type
=
STREAM_DELETE
_RESULT
;
blockDataEnsureCapacity
(
pInfo
->
pDelRes
,
64
);
pInfo
->
pChildren
=
NULL
;
pInfo
->
isFinal
=
false
;
...
...
@@ -3980,7 +3980,7 @@ SOperatorInfo* createStreamStateAggOperatorInfo(SOperatorInfo* downstream, SPhys
pInfo
->
pSeDeleted
=
taosHashInit
(
64
,
hashFn
,
true
,
HASH_NO_LOCK
);
pInfo
->
pDelIterator
=
NULL
;
pInfo
->
pDelRes
=
createOneDataBlock
(
pResBlock
,
false
);
pInfo
->
pDelRes
->
info
.
type
=
STREAM_DELETE
;
pInfo
->
pDelRes
->
info
.
type
=
STREAM_DELETE
_RESULT
;
blockDataEnsureCapacity
(
pInfo
->
pDelRes
,
64
);
pInfo
->
pChildren
=
NULL
;
pInfo
->
ignoreExpiredData
=
pStateNode
->
window
.
igExpired
;
...
...
tests/script/jenkins/basic.txt
浏览文件 @
0d108957
...
...
@@ -105,6 +105,7 @@
./test.sh -f tsim/stream/partitionby1.sim
./test.sh -f tsim/stream/schedSnode.sim
./test.sh -f tsim/stream/windowClose.sim
./test.sh -f tsim/stream/ignoreExpiredData.sim
# ---- transaction
./test.sh -f tsim/trans/lossdata1.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录