Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
335cb651
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看板
提交
335cb651
编写于
10月 28, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
other:merge 3.0
上级
9ccf7add
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
22 deletion
+30
-22
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+1
-0
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+17
-16
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+6
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+4
-5
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+2
-0
未找到文件。
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
335cb651
...
...
@@ -671,6 +671,7 @@ static int32_t tdRSmaExecAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSma
while
(
1
)
{
uint64_t
ts
;
bool
hasMore
=
false
;
// ASSERT(0);
int32_t
code
=
qExecTaskOpt
(
taskInfo
,
pResList
,
&
ts
,
&
hasMore
,
NULL
);
if
(
code
<
0
)
{
if
(
code
==
TSDB_CODE_QRY_IN_EXEC
)
{
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
335cb651
...
...
@@ -340,21 +340,23 @@ typedef struct STableScanInfo {
}
STableScanInfo
;
typedef
struct
STableMergeScanInfo
{
STableListInfo
*
tableListInfo
;
int32_t
tableStartIndex
;
int32_t
tableEndIndex
;
bool
hasGroupId
;
uint64_t
groupId
;
SArray
*
dataReaders
;
// array of tsdbReaderT*
SReadHandle
readHandle
;
int32_t
bufPageSize
;
uint32_t
sortBufSize
;
// max buffer size for in-memory sort
SArray
*
pSortInfo
;
SSortHandle
*
pSortHandle
;
SSDataBlock
*
pSortInputBlock
;
int64_t
startTs
;
// sort start time
SArray
*
sortSourceParams
;
SLimitInfo
limitInfo
;
STableListInfo
*
tableListInfo
;
int32_t
tableStartIndex
;
int32_t
tableEndIndex
;
bool
hasGroupId
;
uint64_t
groupId
;
SArray
*
dataReaders
;
// array of tsdbReaderT*
SArray
*
queryConds
;
// array of queryTableDataCond
STsdbReader
*
pReader
;
SReadHandle
readHandle
;
int32_t
bufPageSize
;
uint32_t
sortBufSize
;
// max buffer size for in-memory sort
SArray
*
pSortInfo
;
SSortHandle
*
pSortHandle
;
SSDataBlock
*
pSortInputBlock
;
int64_t
startTs
;
// sort start time
SArray
*
sortSourceParams
;
SLimitInfo
limitInfo
;
SFileBlockLoadRecorder
readRecorder
;
int64_t
numOfRows
;
SScanInfo
scanInfo
;
...
...
@@ -371,7 +373,6 @@ typedef struct STableMergeScanInfo {
SQueryTableDataCond
cond
;
int32_t
scanFlag
;
// table scan flag to denote if it is a repeat/reverse/main scan
int32_t
dataBlockLoadFlag
;
STsdbReader
*
pReader
;
// if the upstream is an interval operator, the interval info is also kept here to get the time
// window to check if current data block needs to be loaded.
...
...
source/libs/executor/src/executil.c
浏览文件 @
335cb651
...
...
@@ -1681,9 +1681,14 @@ int32_t addTableIntoTableList(STableListInfo* pTableList, uint64_t uid, uint64_t
STableKeyInfo
keyInfo
=
{.
uid
=
uid
,
.
groupId
=
gid
};
taosArrayPush
(
pTableList
->
pTableList
,
&
keyInfo
);
if
(
pTableList
->
oneTableForEachGroup
||
pTableList
->
numOfOuputGroups
>
1
)
{
if
(
!
pTableList
->
oneTableForEachGroup
)
{
if
(
pTableList
->
map
==
NULL
)
{
pTableList
->
map
=
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_ENTRY_LOCK
);
}
taosHashPut
(
pTableList
->
map
,
&
uid
,
sizeof
(
uid
),
&
keyInfo
.
groupId
,
sizeof
(
keyInfo
.
groupId
));
}
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
335cb651
...
...
@@ -624,11 +624,6 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) {
ASSERT
(
binfo
.
uid
!=
0
);
pBlock
->
info
.
groupId
=
getTableGroupId
(
&
pTaskInfo
->
tableqinfoList
,
pBlock
->
info
.
uid
);
ASSERT
(
pBlock
->
info
.
groupId
!=
0
);
// uint64_t* groupId = taosHashGet(pTaskInfo->tableqinfoList.map, &pBlock->info.uid, sizeof(int64_t));
// if (groupId) {
// pBlock->info.groupId = *groupId;
// }
uint32_t
status
=
0
;
int32_t
code
=
loadDataBlock
(
pOperator
,
pTableScanInfo
,
pBlock
,
&
status
);
...
...
@@ -1570,6 +1565,7 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
if
(
groupIdPre
)
{
pInfo
->
pRes
->
info
.
groupId
=
*
groupIdPre
;
}
else
{
ASSERT
(
0
);
pInfo
->
pRes
->
info
.
groupId
=
0
;
}
...
...
@@ -4438,6 +4434,7 @@ static int32_t loadDataBlockFromOneTable(SOperatorInfo* pOperator, STableMergeSc
typedef
struct
STableMergeScanSortSourceParam
{
SOperatorInfo
*
pOperator
;
int32_t
readerIdx
;
int64_t
uid
;
SSDataBlock
*
inputBlock
;
}
STableMergeScanSortSourceParam
;
...
...
@@ -4514,8 +4511,10 @@ static SSDataBlock* getTableDataBlockTemp(void* param) {
}
tsdbReaderClose
(
pInfo
->
pReader
);
pInfo
->
pReader
=
NULL
;
return
NULL
;
}
static
SSDataBlock
*
getTableDataBlock2
(
void
*
param
)
{
STableMergeScanSortSourceParam
*
source
=
param
;
SOperatorInfo
*
pOperator
=
source
->
pOperator
;
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
335cb651
...
...
@@ -5384,6 +5384,8 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
maxTs
=
TMAX
(
maxTs
,
pBlock
->
info
.
window
.
ekey
);
minTs
=
TMIN
(
minTs
,
pBlock
->
info
.
window
.
skey
);
qDebug
(
"-------------------------groupId:%ld"
,
pBlock
->
info
.
groupId
);
doStreamIntervalAggImpl
(
pOperator
,
pBlock
,
pBlock
->
info
.
groupId
,
pUpdatedMap
);
}
pInfo
->
twAggSup
.
maxTs
=
TMAX
(
pInfo
->
twAggSup
.
maxTs
,
maxTs
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录