Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dbd8c300
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看板
提交
dbd8c300
编写于
6月 27, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do tsdbread refactor.
上级
ce15ee0e
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
989 addition
and
783 deletion
+989
-783
include/common/tcommon.h
include/common/tcommon.h
+5
-5
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+4
-5
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+974
-760
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+1
-12
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+5
-1
未找到文件。
include/common/tcommon.h
浏览文件 @
dbd8c300
...
...
@@ -101,17 +101,17 @@ typedef struct SColumnInfoData {
}
SColumnInfoData
;
typedef
struct
SQueryTableDataCond
{
// STimeWindow twindow;
uint64_t
suid
;
int32_t
order
;
// desc|asc order to iterate the data block
int32_t
numOfCols
;
SColumnInfo
*
colList
;
bool
loadExternalRows
;
// load external rows or not
int32_t
type
;
// data block load type:
int32_t
type
;
// data block load type:
int32_t
numOfTWindows
;
STimeWindow
*
twindows
;
int64_t
startVersion
;
int64_t
endVersion
;
int32_t
numOfTables
;
// number of tables
uint64_t
*
uidList
;
// table uid list
int64_t
startVersion
;
// start version
int64_t
endVersion
;
// end version
}
SQueryTableDataCond
;
void
*
blockDataDestroy
(
SSDataBlock
*
pBlock
);
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
dbd8c300
...
...
@@ -116,12 +116,11 @@ int32_t metaTbCursorNext(SMTbCursor *pTbCur);
// typedef struct STsdb STsdb;
typedef
struct
STsdbReader
STsdbReader
;
#define BLOCK_LOAD_OFFSET_
SEQ_ORDER
1
#define BLOCK_LOAD_TABLE
_
SEQ_ORDER 2
#define BLOCK_LOAD_
TABLE_RR_ORDER
3
#define BLOCK_LOAD_OFFSET_
ORDER
1
#define BLOCK_LOAD_TABLESEQ_ORDER 2
#define BLOCK_LOAD_
EXTERN_ORDER
3
int32_t
tsdbReaderOpen
(
SVnode
*
pVnode
,
SQueryTableDataCond
*
pCond
,
STableListInfo
*
tableInfoGroup
,
uint64_t
qId
,
uint64_t
taskId
,
STsdbReader
**
ppReader
);
int32_t
tsdbReaderOpen
(
SVnode
*
pVnode
,
SQueryTableDataCond
*
pCond
,
STableListInfo
*
pTableList
,
uint64_t
qId
,
uint64_t
taskId
,
STsdbReader
**
ppReader
);
void
tsdbReaderClose
(
STsdbReader
*
pReader
);
bool
tsdbNextDataBlock
(
STsdbReader
*
pReader
);
void
tsdbRetrieveDataBlockInfo
(
STsdbReader
*
pReader
,
SDataBlockInfo
*
pDataBlockInfo
);
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
dbd8c300
此差异已折叠。
点击以展开。
source/libs/executor/src/executil.c
浏览文件 @
dbd8c300
...
...
@@ -620,8 +620,6 @@ SColumn extractColumnFromColumnNode(SColumnNode* pColNode) {
}
int32_t
initQueryTableDataCond
(
SQueryTableDataCond
*
pCond
,
const
STableScanPhysiNode
*
pTableScanNode
)
{
pCond
->
loadExternalRows
=
false
;
pCond
->
order
=
pTableScanNode
->
scanSeq
[
0
]
>
0
?
TSDB_ORDER_ASC
:
TSDB_ORDER_DESC
;
pCond
->
numOfCols
=
LIST_LENGTH
(
pTableScanNode
->
scan
.
pScanCols
);
pCond
->
colList
=
taosMemoryCalloc
(
pCond
->
numOfCols
,
sizeof
(
SColumnInfo
));
...
...
@@ -647,15 +645,7 @@ int32_t initQueryTableDataCond(SQueryTableDataCond* pCond, const STableScanPhysi
}
#endif
for
(
int32_t
i
=
0
;
i
<
pCond
->
numOfTWindows
;
++
i
)
{
if
((
pCond
->
order
==
TSDB_ORDER_ASC
&&
pCond
->
twindows
[
i
].
skey
>
pCond
->
twindows
[
i
].
ekey
)
||
(
pCond
->
order
==
TSDB_ORDER_DESC
&&
pCond
->
twindows
[
i
].
skey
<
pCond
->
twindows
[
i
].
ekey
))
{
TSWAP
(
pCond
->
twindows
[
i
].
skey
,
pCond
->
twindows
[
i
].
ekey
);
}
}
taosqsort
(
pCond
->
twindows
,
pCond
->
numOfTWindows
,
sizeof
(
STimeWindow
),
pCond
,
compareTimeWindow
);
pCond
->
type
=
BLOCK_LOAD_OFFSET_SEQ_ORDER
;
pCond
->
type
=
BLOCK_LOAD_OFFSET_ORDER
;
// pCond->type = pTableScanNode->scanFlag;
int32_t
j
=
0
;
...
...
@@ -677,6 +667,5 @@ int32_t initQueryTableDataCond(SQueryTableDataCond* pCond, const STableScanPhysi
}
void
cleanupQueryTableDataCond
(
SQueryTableDataCond
*
pCond
)
{
taosMemoryFree
(
pCond
->
twindows
);
taosMemoryFree
(
pCond
->
colList
);
}
\ No newline at end of file
source/libs/executor/src/executorimpl.c
浏览文件 @
dbd8c300
...
...
@@ -4306,7 +4306,11 @@ STsdbReader* doCreateDataReader(STableScanPhysiNode* pTableScanNode, SReadHandle
}
STsdbReader
*
pReader
;
tsdbReaderOpen
(
pHandle
->
vnode
,
&
cond
,
pTableListInfo
,
queryId
,
taskId
,
&
pReader
);
code
=
tsdbReaderOpen
(
pHandle
->
vnode
,
&
cond
,
pTableListInfo
,
queryId
,
taskId
,
&
pReader
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
cleanupQueryTableDataCond
(
&
cond
);
return
pReader
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录