Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
67d6ea93
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看板
提交
67d6ea93
编写于
12月 02, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: ins_table count optimize
上级
23337744
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
8 addition
and
2 deletion
+8
-2
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+8
-2
未找到文件。
source/libs/parser/src/parTranslater.c
浏览文件 @
67d6ea93
...
@@ -47,6 +47,7 @@ typedef struct STranslateContext {
...
@@ -47,6 +47,7 @@ typedef struct STranslateContext {
SParseMetaCache
*
pMetaCache
;
SParseMetaCache
*
pMetaCache
;
bool
createStream
;
bool
createStream
;
bool
stableQuery
;
bool
stableQuery
;
bool
showRewrite
;
}
STranslateContext
;
}
STranslateContext
;
typedef
struct
SFullDatabaseName
{
typedef
struct
SFullDatabaseName
{
...
@@ -2222,8 +2223,8 @@ static int32_t getVnodeSysTableVgroupListImpl(STranslateContext* pCxt, SName* pT
...
@@ -2222,8 +2223,8 @@ static int32_t getVnodeSysTableVgroupListImpl(STranslateContext* pCxt, SName* pT
if
(
TSDB_DB_NAME_T
==
pTargetName
->
type
)
{
if
(
TSDB_DB_NAME_T
==
pTargetName
->
type
)
{
int32_t
code
=
getDBVgInfoImpl
(
pCxt
,
pTargetName
,
pVgroupList
);
int32_t
code
=
getDBVgInfoImpl
(
pCxt
,
pTargetName
,
pVgroupList
);
if
(
TSDB_CODE_MND_DB_NOT_EXIST
==
code
||
TSDB_CODE_MND_DB_IN_CREATING
==
code
||
if
(
!
pCxt
->
showRewrite
&&
(
TSDB_CODE_MND_DB_NOT_EXIST
==
code
||
TSDB_CODE_MND_DB_IN_CREATING
==
code
||
TSDB_CODE_MND_DB_IN_DROPPING
==
code
)
{
TSDB_CODE_MND_DB_IN_DROPPING
==
code
)
)
{
// system table query should not report errors
// system table query should not report errors
code
=
TSDB_CODE_SUCCESS
;
code
=
TSDB_CODE_SUCCESS
;
}
}
...
@@ -6294,6 +6295,7 @@ static int32_t rewriteShow(STranslateContext* pCxt, SQuery* pQuery) {
...
@@ -6294,6 +6295,7 @@ static int32_t rewriteShow(STranslateContext* pCxt, SQuery* pQuery) {
code
=
createShowCondition
((
SShowStmt
*
)
pQuery
->
pRoot
,
pStmt
);
code
=
createShowCondition
((
SShowStmt
*
)
pQuery
->
pRoot
,
pStmt
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pCxt
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
nodesDestroyNode
(
pQuery
->
pRoot
);
nodesDestroyNode
(
pQuery
->
pRoot
);
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
...
@@ -6347,6 +6349,7 @@ static int32_t rewriteShowStableTags(STranslateContext* pCxt, SQuery* pQuery) {
...
@@ -6347,6 +6349,7 @@ static int32_t rewriteShowStableTags(STranslateContext* pCxt, SQuery* pQuery) {
code
=
createShowTableTagsProjections
(
&
pSelect
->
pProjectionList
,
&
pShow
->
pTags
);
code
=
createShowTableTagsProjections
(
&
pSelect
->
pProjectionList
,
&
pShow
->
pTags
);
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pCxt
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pSelect
->
tagScan
=
true
;
pSelect
->
tagScan
=
true
;
nodesDestroyNode
(
pQuery
->
pRoot
);
nodesDestroyNode
(
pQuery
->
pRoot
);
...
@@ -6377,6 +6380,7 @@ static int32_t rewriteShowDnodeVariables(STranslateContext* pCxt, SQuery* pQuery
...
@@ -6377,6 +6380,7 @@ static int32_t rewriteShowDnodeVariables(STranslateContext* pCxt, SQuery* pQuery
}
}
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pCxt
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
nodesDestroyNode
(
pQuery
->
pRoot
);
nodesDestroyNode
(
pQuery
->
pRoot
);
pQuery
->
pRoot
=
(
SNode
*
)
pSelect
;
pQuery
->
pRoot
=
(
SNode
*
)
pSelect
;
...
@@ -6396,6 +6400,7 @@ static int32_t rewriteShowVnodes(STranslateContext* pCxt, SQuery* pQuery) {
...
@@ -6396,6 +6400,7 @@ static int32_t rewriteShowVnodes(STranslateContext* pCxt, SQuery* pQuery) {
}
}
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pCxt
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
nodesDestroyNode
(
pQuery
->
pRoot
);
nodesDestroyNode
(
pQuery
->
pRoot
);
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
...
@@ -6437,6 +6442,7 @@ static int32_t rewriteShowTableDist(STranslateContext* pCxt, SQuery* pQuery) {
...
@@ -6437,6 +6442,7 @@ static int32_t rewriteShowTableDist(STranslateContext* pCxt, SQuery* pQuery) {
code
=
nodesListMakeStrictAppend
(
&
pStmt
->
pProjectionList
,
createBlockDistFunc
());
code
=
nodesListMakeStrictAppend
(
&
pStmt
->
pProjectionList
,
createBlockDistFunc
());
}
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pCxt
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
pQuery
->
showRewrite
=
true
;
nodesDestroyNode
(
pQuery
->
pRoot
);
nodesDestroyNode
(
pQuery
->
pRoot
);
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
pQuery
->
pRoot
=
(
SNode
*
)
pStmt
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录