Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f93af4d2
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看板
提交
f93af4d2
编写于
7月 16, 2023
作者:
S
slzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enhance: pass simple test
上级
8b6d7db7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
14 deletion
+6
-14
source/libs/executor/inc/executorInt.h
source/libs/executor/inc/executorInt.h
+1
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+5
-14
未找到文件。
source/libs/executor/inc/executorInt.h
浏览文件 @
f93af4d2
...
...
@@ -238,6 +238,7 @@ typedef struct STableMergeScanInfo {
SArray
*
pSortInfo
;
SSortHandle
*
pSortHandle
;
SSDataBlock
*
pSortInputBlock
;
SSDataBlock
*
pReaderBlock
;
int64_t
startTs
;
// sort start time
SArray
*
sortSourceParams
;
SLimitInfo
limitInfo
;
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
f93af4d2
...
...
@@ -53,7 +53,6 @@ typedef struct STableMergeScanSortSourceParam {
SOperatorInfo
*
pOperator
;
int32_t
readerIdx
;
uint64_t
uid
;
SSDataBlock
*
inputBlock
;
}
STableMergeScanSortSourceParam
;
typedef
struct
STableCountScanOperatorInfo
{
...
...
@@ -2735,7 +2734,7 @@ static SSDataBlock* getTableDataBlockImpl(void* param) {
SStorageAPI
*
pAPI
=
&
pTaskInfo
->
storageAPI
;
int32_t
readIdx
=
source
->
readerIdx
;
SSDataBlock
*
pBlock
=
source
->
input
Block
;
SSDataBlock
*
pBlock
=
pInfo
->
pReader
Block
;
int32_t
code
=
0
;
int64_t
st
=
taosGetTimestampUs
();
...
...
@@ -2753,6 +2752,7 @@ static SSDataBlock* getTableDataBlockImpl(void* param) {
}
else
if
(
pInfo
->
readIdx
!=
readIdx
+
pInfo
->
tableStartIndex
)
{
pAPI
->
tsdReader
.
tsdSetQueryTableList
(
pInfo
->
base
.
dataReader
,
p
,
1
);
pAPI
->
tsdReader
.
tsdReaderResetStatus
(
pInfo
->
base
.
dataReader
,
&
pInfo
->
base
.
cond
);
pInfo
->
readIdx
=
readIdx
+
pInfo
->
tableStartIndex
;
}
STsdbReader
*
reader
=
pInfo
->
base
.
dataReader
;
...
...
@@ -2802,8 +2802,6 @@ static SSDataBlock* getTableDataBlockImpl(void* param) {
return
pBlock
;
}
blockDataDestroy
(
source
->
inputBlock
);
source
->
inputBlock
=
NULL
;
return
NULL
;
}
...
...
@@ -2872,7 +2870,6 @@ int32_t startGroupTableMergeScan(SOperatorInfo* pOperator) {
STableMergeScanSortSourceParam
param
=
{
0
};
param
.
readerIdx
=
i
;
param
.
pOperator
=
pOperator
;
param
.
inputBlock
=
createOneDataBlock
(
pInfo
->
pResBlock
,
false
);
taosArrayPush
(
pInfo
->
sortSourceParams
,
&
param
);
}
...
...
@@ -2906,10 +2903,6 @@ int32_t stopGroupTableMergeScan(SOperatorInfo* pOperator) {
pInfo
->
sortExecInfo
.
readBytes
+=
sortExecInfo
.
readBytes
;
pInfo
->
sortExecInfo
.
writeBytes
+=
sortExecInfo
.
writeBytes
;
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pInfo
->
sortSourceParams
);
++
i
)
{
STableMergeScanSortSourceParam
*
param
=
taosArrayGet
(
pInfo
->
sortSourceParams
,
i
);
blockDataDestroy
(
param
->
inputBlock
);
}
taosArrayClear
(
pInfo
->
sortSourceParams
);
tsortDestroySortHandle
(
pInfo
->
pSortHandle
);
...
...
@@ -3014,11 +3007,6 @@ void destroyTableMergeScanOperatorInfo(void* param) {
int32_t
numOfTable
=
taosArrayGetSize
(
pTableScanInfo
->
sortSourceParams
);
for
(
int32_t
i
=
0
;
i
<
numOfTable
;
i
++
)
{
STableMergeScanSortSourceParam
*
p
=
taosArrayGet
(
pTableScanInfo
->
sortSourceParams
,
i
);
blockDataDestroy
(
p
->
inputBlock
);
}
pTableScanInfo
->
base
.
readerAPI
.
tsdReaderClose
(
pTableScanInfo
->
base
.
dataReader
);
pTableScanInfo
->
base
.
dataReader
=
NULL
;
...
...
@@ -3030,6 +3018,7 @@ void destroyTableMergeScanOperatorInfo(void* param) {
pTableScanInfo
->
pResBlock
=
blockDataDestroy
(
pTableScanInfo
->
pResBlock
);
pTableScanInfo
->
pSortInputBlock
=
blockDataDestroy
(
pTableScanInfo
->
pSortInputBlock
);
pTableScanInfo
->
pReaderBlock
=
blockDataDestroy
(
pTableScanInfo
->
pReaderBlock
);
taosArrayDestroy
(
pTableScanInfo
->
pSortInfo
);
taosMemoryFreeClear
(
param
);
...
...
@@ -3115,6 +3104,8 @@ SOperatorInfo* createTableMergeScanOperatorInfo(STableScanPhysiNode* pTableScanN
pInfo
->
pSortInputBlock
=
createOneDataBlock
(
pInfo
->
pResBlock
,
false
);
initLimitInfo
(
pTableScanNode
->
scan
.
node
.
pLimit
,
pTableScanNode
->
scan
.
node
.
pSlimit
,
&
pInfo
->
limitInfo
);
pInfo
->
pReaderBlock
=
createOneDataBlock
(
pInfo
->
pResBlock
,
false
);
int32_t
rowSize
=
pInfo
->
pResBlock
->
info
.
rowSize
;
uint32_t
nCols
=
taosArrayGetSize
(
pInfo
->
pResBlock
->
pDataBlock
);
pInfo
->
bufPageSize
=
getProperSortPageSize
(
rowSize
,
nCols
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录