Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
06bb551b
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
06bb551b
编写于
9月 28, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: query information_schema.ins_tags optimize
上级
48c93736
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
20 addition
and
3 deletion
+20
-3
source/libs/parser/src/parAstParser.c
source/libs/parser/src/parAstParser.c
+4
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+4
-1
source/libs/parser/test/parShowToUse.cpp
source/libs/parser/test/parShowToUse.cpp
+8
-2
source/libs/parser/test/parTestMain.cpp
source/libs/parser/test/parTestMain.cpp
+4
-0
未找到文件。
source/libs/parser/src/parAstParser.c
浏览文件 @
06bb551b
...
...
@@ -407,6 +407,10 @@ static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* p
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
reserveDbVgInfoInCache
(
pCxt
->
pParseCxt
->
acctId
,
((
SValueNode
*
)
pStmt
->
pDbName
)
->
literal
,
pCxt
->
pMetaCache
);
}
if
(
TSDB_CODE_SUCCESS
==
code
&&
NULL
!=
pStmt
->
pTbName
)
{
code
=
reserveTableVgroupInCache
(
pCxt
->
pParseCxt
->
acctId
,
((
SValueNode
*
)
pStmt
->
pDbName
)
->
literal
,
((
SValueNode
*
)
pStmt
->
pTbName
)
->
literal
,
pCxt
->
pMetaCache
);
}
return
code
;
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
06bb551b
...
...
@@ -2143,7 +2143,7 @@ static bool sysTableFromDnode(const char* pTable) { return 0 == strcmp(pTable, T
static
int32_t
getTagsTableVgroupListImpl
(
STranslateContext
*
pCxt
,
SName
*
pTargetName
,
SName
*
pName
,
SArray
**
pVgroupList
)
{
if
(
0
==
pTargetName
->
acctId
)
{
if
(
0
==
pTargetName
->
type
)
{
return
getDBVgInfoImpl
(
pCxt
,
pName
,
pVgroupList
);
}
...
...
@@ -2208,6 +2208,9 @@ static int32_t getTagsTableTargetNameFromCond(STranslateContext* pCxt, SLogicCon
SNode
*
pNode
=
NULL
;
FOREACH
(
pNode
,
pCond
->
pParameterList
)
{
getTagsTableTargetObjName
(
pCxt
,
pNode
,
pName
);
}
if
(
'\0'
==
pName
->
dbname
[
0
])
{
pName
->
type
=
0
;
}
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/parser/test/parShowToUse.cpp
浏览文件 @
06bb551b
...
...
@@ -196,6 +196,12 @@ TEST_F(ParserShowToUseTest, showTableDistributed) {
run
(
"SHOW TABLE DISTRIBUTED st1"
);
}
TEST_F
(
ParserShowToUseTest
,
showTags
)
{
useDb
(
"root"
,
"test"
);
run
(
"SHOW TAGS FROM st1s1"
);
}
// todo SHOW topics
TEST_F
(
ParserShowToUseTest
,
showUsers
)
{
...
...
@@ -213,9 +219,9 @@ TEST_F(ParserShowToUseTest, showVariables) {
TEST_F
(
ParserShowToUseTest
,
showVgroups
)
{
useDb
(
"root"
,
"test"
);
run
(
"SHOW
vgroups
"
);
run
(
"SHOW
VGROUPS
"
);
run
(
"SHOW test.
vgroups
"
);
run
(
"SHOW test.
VGROUPS
"
);
}
TEST_F
(
ParserShowToUseTest
,
showVnodes
)
{
...
...
source/libs/parser/test/parTestMain.cpp
浏览文件 @
06bb551b
...
...
@@ -86,6 +86,7 @@ static void parseArg(int argc, char* argv[]) {
{
"dump"
,
no_argument
,
NULL
,
'd'
},
{
"async"
,
required_argument
,
NULL
,
'a'
},
{
"skipSql"
,
required_argument
,
NULL
,
's'
},
{
"log"
,
required_argument
,
NULL
,
'l'
},
{
0
,
0
,
0
,
0
}
};
// clang-format on
...
...
@@ -100,6 +101,9 @@ static void parseArg(int argc, char* argv[]) {
case
's'
:
setSkipSqlNum
(
optarg
);
break
;
case
'l'
:
setLogLevel
(
optarg
);
break
;
default:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录