Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
39ad8042
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
39ad8042
编写于
1月 27, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/3.0_liaohj' into feature/tq
上级
16a68619
699b37cc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
16 deletion
+17
-16
source/dnode/vnode/inc/tsdb.h
source/dnode/vnode/inc/tsdb.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+10
-10
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+5
-4
未找到文件。
source/dnode/vnode/inc/tsdb.h
浏览文件 @
39ad8042
...
...
@@ -138,7 +138,7 @@ bool isTsdbCacheLastRow(tsdbReadHandleT* pTsdbReadHandle);
* @param reqId
* @return
*/
int32_t
tsdbQuerySTableByTagCond
(
STsdb
*
tsdb
,
uint64_t
uid
,
TSKEY
skey
,
const
char
*
pTagCond
,
size_t
len
,
int32_t
tsdbQuerySTableByTagCond
(
void
*
pMeta
,
uint64_t
uid
,
TSKEY
skey
,
const
char
*
pTagCond
,
size_t
len
,
int16_t
tagNameRelType
,
const
char
*
tbnameCond
,
STableGroupInfo
*
pGroupInfo
,
SColIndex
*
pColIndex
,
int32_t
numOfCols
,
uint64_t
reqId
,
uint64_t
taskId
);
/**
...
...
@@ -205,7 +205,7 @@ void tsdbDestroyTableGroup(STableGroupInfo *pGroupList);
* @param pGroupInfo the generated result
* @return
*/
int32_t
tsdbGetOneTableGroup
(
STsdb
*
tsdb
,
uint64_t
uid
,
TSKEY
startKey
,
STableGroupInfo
*
pGroupInfo
);
int32_t
tsdbGetOneTableGroup
(
void
*
pMeta
,
uint64_t
uid
,
TSKEY
startKey
,
STableGroupInfo
*
pGroupInfo
);
/**
*
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
39ad8042
...
...
@@ -3635,29 +3635,29 @@ SArray* createTableGroup(SArray* pTableList, SSchemaWrapper* pTagSchema, SColInd
// return TSDB_CODE_SUCCESS;
//}
int32_t
tsdbQuerySTableByTagCond
(
STsdb
*
tsdb
,
uint64_t
uid
,
TSKEY
skey
,
const
char
*
pTagCond
,
size_t
len
,
int32_t
tsdbQuerySTableByTagCond
(
void
*
pMeta
,
uint64_t
uid
,
TSKEY
skey
,
const
char
*
pTagCond
,
size_t
len
,
int16_t
tagNameRelType
,
const
char
*
tbnameCond
,
STableGroupInfo
*
pGroupInfo
,
SColIndex
*
pColIndex
,
int32_t
numOfCols
,
uint64_t
reqId
,
uint64_t
taskId
)
{
STbCfg
*
pTbCfg
=
metaGetTbInfoByUid
(
tsdb
->
pMeta
,
uid
);
STbCfg
*
pTbCfg
=
metaGetTbInfoByUid
(
pMeta
,
uid
);
if
(
pTbCfg
==
NULL
)
{
tsdbError
(
"%p failed to get stable, uid:%"
PRIu64
", TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
tsdb
,
uid
,
taskId
,
reqId
);
//
tsdbError("%p failed to get stable, uid:%"PRIu64", TID:0x%"PRIx64" QID:0x%"PRIx64, tsdb, uid, taskId, reqId);
terrno
=
TSDB_CODE_TDB_INVALID_TABLE_ID
;
goto
_error
;
}
if
(
pTbCfg
->
type
!=
META_SUPER_TABLE
)
{
tsdbError
(
"%p query normal tag not allowed, uid:%"
PRIu64
", TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
tsdb
,
uid
,
taskId
,
reqId
);
//
tsdbError("%p query normal tag not allowed, uid:%" PRIu64 ", TID:0x%"PRIx64" QID:0x%"PRIx64, tsdb, uid, taskId, reqId);
terrno
=
TSDB_CODE_OPS_NOT_SUPPORT
;
//basically, this error is caused by invalid sql issued by client
goto
_error
;
}
//NOTE: not add ref count for super table
SArray
*
res
=
taosArrayInit
(
8
,
sizeof
(
STableKeyInfo
));
SSchemaWrapper
*
pTagSchema
=
metaGetTableSchema
(
tsdb
->
pMeta
,
uid
,
0
,
true
);
SSchemaWrapper
*
pTagSchema
=
metaGetTableSchema
(
pMeta
,
uid
,
0
,
true
);
// no tags and tbname condition, all child tables of this stable are involved
if
(
tbnameCond
==
NULL
&&
(
pTagCond
==
NULL
||
len
==
0
))
{
int32_t
ret
=
getAllTableList
(
tsdb
->
pMeta
,
uid
,
res
);
int32_t
ret
=
getAllTableList
(
pMeta
,
uid
,
res
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
}
...
...
@@ -3665,8 +3665,8 @@ int32_t tsdbQuerySTableByTagCond(STsdb* tsdb, uint64_t uid, TSKEY skey, const ch
pGroupInfo
->
numOfTables
=
(
uint32_t
)
taosArrayGetSize
(
res
);
pGroupInfo
->
pGroupList
=
createTableGroup
(
res
,
pTagSchema
,
pColIndex
,
numOfCols
,
skey
);
tsdbDebug
(
"%p no table name/tag condition, all tables qualified, numOfTables:%u, group:%zu, TID:0x%"
PRIx64
" QID:0x%"
PRIx64
,
tsdb
,
pGroupInfo
->
numOfTables
,
taosArrayGetSize
(
pGroupInfo
->
pGroupList
),
taskId
,
reqId
);
//
tsdbDebug("%p no table name/tag condition, all tables qualified, numOfTables:%u, group:%zu, TID:0x%"PRIx64" QID:0x%"PRIx64, tsdb,
//
pGroupInfo->numOfTables, taosArrayGetSize(pGroupInfo->pGroupList), taskId, reqId);
taosArrayDestroy
(
res
);
return
ret
;
...
...
@@ -3722,8 +3722,8 @@ int32_t tsdbQuerySTableByTagCond(STsdb* tsdb, uint64_t uid, TSKEY skey, const ch
return
terrno
;
}
int32_t
tsdbGetOneTableGroup
(
STsdb
*
tsdb
,
uint64_t
uid
,
TSKEY
startKey
,
STableGroupInfo
*
pGroupInfo
)
{
STbCfg
*
pTbCfg
=
metaGetTbInfoByUid
(
tsdb
->
pMeta
,
uid
);
int32_t
tsdbGetOneTableGroup
(
void
*
pMeta
,
uint64_t
uid
,
TSKEY
startKey
,
STableGroupInfo
*
pGroupInfo
)
{
STbCfg
*
pTbCfg
=
metaGetTbInfoByUid
(
pMeta
,
uid
);
if
(
pTbCfg
==
NULL
)
{
terrno
=
TSDB_CODE_TDB_INVALID_TABLE_ID
;
goto
_error
;
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
39ad8042
...
...
@@ -7775,7 +7775,8 @@ SOperatorInfo* doCreateOperatorTreeNode(SPhyNode* pPhyNode, SExecTaskInfo* pTask
}
else
if
(
pPhyNode
->
info
.
type
==
OP_StreamScan
)
{
SScanPhyNode
*
pScanPhyNode
=
(
SScanPhyNode
*
)
pPhyNode
;
// simple child table.
STableGroupInfo
groupInfo
=
{
0
};
int32_t
code
=
doCreateTableGroup
(
readerHandle
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
&
groupInfo
,
queryId
,
taskId
);
int32_t
code
=
doCreateTableGroup
(((
STqReadHandle
*
)
readerHandle
)
->
pMeta
,
pScanPhyNode
->
tableType
,
pScanPhyNode
->
uid
,
&
groupInfo
,
queryId
,
taskId
);
SArray
*
pa
=
taosArrayGetP
(
groupInfo
.
pGroupList
,
0
);
ASSERT
(
taosArrayGetSize
(
groupInfo
.
pGroupList
)
==
1
);
...
...
@@ -7829,12 +7830,12 @@ static tsdbReadHandleT createDataReadHandle(STableScanPhyNode* pTableScanNode, S
return
tsdbQueryTables
(
readerHandle
,
&
cond
,
pGroupInfo
,
queryId
,
taskId
);
}
static
int32_t
doCreateTableGroup
(
void
*
reader
Handle
,
int32_t
tableType
,
uint64_t
tableUid
,
STableGroupInfo
*
pGroupInfo
,
uint64_t
queryId
,
uint64_t
taskId
)
{
static
int32_t
doCreateTableGroup
(
void
*
meta
Handle
,
int32_t
tableType
,
uint64_t
tableUid
,
STableGroupInfo
*
pGroupInfo
,
uint64_t
queryId
,
uint64_t
taskId
)
{
int32_t
code
=
0
;
if
(
tableType
==
TSDB_SUPER_TABLE
)
{
code
=
tsdbQuerySTableByTagCond
(
reader
Handle
,
tableUid
,
0
,
NULL
,
0
,
0
,
NULL
,
pGroupInfo
,
NULL
,
0
,
queryId
,
taskId
);
code
=
tsdbQuerySTableByTagCond
(
meta
Handle
,
tableUid
,
0
,
NULL
,
0
,
0
,
NULL
,
pGroupInfo
,
NULL
,
0
,
queryId
,
taskId
);
}
else
{
// Create one table group.
code
=
tsdbGetOneTableGroup
(
reader
Handle
,
tableUid
,
0
,
pGroupInfo
);
code
=
tsdbGetOneTableGroup
(
meta
Handle
,
tableUid
,
0
,
pGroupInfo
);
}
return
code
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录