Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
e5972650
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e5972650
编写于
7月 14, 2021
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
merge develop
上级
134a825d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
10 deletion
+6
-10
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+4
-8
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
e5972650
...
...
@@ -146,7 +146,7 @@ bool tscIsProjectionQueryOnSTable(SQueryInfo* pQueryInfo, int32_t tableIndex);
bool
tscIsProjectionQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscHasColumnFilter
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsTwoStageSTableQuery
(
S
SqlCmd
*
pCmd
,
S
QueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscIsTwoStageSTableQuery
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscQueryTags
(
SQueryInfo
*
pQueryInfo
);
bool
tscMultiRoundQuery
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscQueryBlockInfo
(
SQueryInfo
*
pQueryInfo
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
e5972650
...
...
@@ -8600,7 +8600,7 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
pQueryInfo
->
simpleAgg
=
isSimpleAggregateRv
(
pQueryInfo
);
pQueryInfo
->
onlyTagQuery
=
onlyTagPrjFunction
(
pQueryInfo
);
pQueryInfo
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQueryInfo
->
globalMerge
=
tscIsTwoStageSTableQuery
(
pCmd
,
pQueryInfo
,
0
);
//pQueryInfo->globalMerge = tscIsTwoStageSTableQuery(
pQueryInfo, 0);
pQueryInfo
->
arithmeticOnAgg
=
tsIsArithmeticQueryOnAggResult
(
pQueryInfo
);
pQueryInfo
->
orderProjectQuery
=
tscOrderedProjectionQueryOnSTable
(
pQueryInfo
,
0
);
...
...
src/client/src/tscUtil.c
浏览文件 @
e5972650
...
...
@@ -173,7 +173,7 @@ bool tscQueryBlockInfo(SQueryInfo* pQueryInfo) {
return
false
;
}
bool
tscIsTwoStageSTableQuery
(
S
SqlCmd
*
pCmd
,
S
QueryInfo
*
pQueryInfo
,
int32_t
tableIndex
)
{
bool
tscIsTwoStageSTableQuery
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
)
{
if
(
pQueryInfo
==
NULL
)
{
return
false
;
}
...
...
@@ -3069,7 +3069,6 @@ int32_t tscQueryInfoCopy(SQueryInfo* pQueryInfo, const SQueryInfo* pSrc) {
pQueryInfo
->
numOfTables
=
0
;
pQueryInfo
->
window
=
pSrc
->
window
;
pQueryInfo
->
sessionWindow
=
pSrc
->
sessionWindow
;
pQueryInfo
->
globalMerge
=
pSrc
->
globalMerge
;
pQueryInfo
->
pTableMetaInfo
=
NULL
;
pQueryInfo
->
bufLen
=
pSrc
->
bufLen
;
...
...
@@ -3421,8 +3420,6 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t
SSqlCmd
*
pnCmd
=
&
pNew
->
cmd
;
memcpy
(
pnCmd
,
pCmd
,
sizeof
(
SSqlCmd
));
pnCmd
->
subCmd
=
true
;
pnCmd
->
command
=
cmd
;
pnCmd
->
payload
=
NULL
;
pnCmd
->
allocSize
=
0
;
...
...
@@ -3468,7 +3465,6 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t
pNewQueryInfo
->
numOfTables
=
0
;
pNewQueryInfo
->
pTableMetaInfo
=
NULL
;
pNewQueryInfo
->
bufLen
=
pQueryInfo
->
bufLen
;
pNewQueryInfo
->
globalMerge
=
false
;
pNewQueryInfo
->
buf
=
malloc
(
pQueryInfo
->
bufLen
);
if
(
pNewQueryInfo
->
buf
==
NULL
)
{
...
...
@@ -3604,7 +3600,7 @@ void doExecuteQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) {
tscHandleMasterJoinQuery
(
pSql
);
}
else
if
(
tscMultiRoundQuery
(
pQueryInfo
,
0
)
&&
pQueryInfo
->
round
==
0
)
{
tscHandleFirstRoundStableQuery
(
pSql
);
// todo lock?
}
else
if
(
pQueryInfo
->
globalMerge
)
{
// super table query
}
else
if
(
tscIsTwoStageSTableQuery
(
pQueryInfo
,
0
)
)
{
// super table query
tscLockByThread
(
&
pSql
->
squeryLock
);
tscHandleMasterSTableQuery
(
pSql
);
tscUnlockByThread
(
&
pSql
->
squeryLock
);
...
...
@@ -4334,7 +4330,7 @@ int32_t createProjectionExpr(SQueryInfo* pQueryInfo, STableMetaInfo* pTableMetaI
}
static
int32_t
createGlobalAggregateExpr
(
SQueryAttr
*
pQueryAttr
,
SQueryInfo
*
pQueryInfo
)
{
assert
(
pQueryInfo
->
globalMerge
);
assert
(
tscIsTwoStageSTableQuery
(
pQueryInfo
,
0
)
);
pQueryAttr
->
numOfExpr3
=
(
int32_t
)
tscNumOfExprs
(
pQueryInfo
);
pQueryAttr
->
pExpr3
=
calloc
(
pQueryAttr
->
numOfExpr3
,
sizeof
(
SExprInfo
));
...
...
@@ -4504,7 +4500,7 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
}
// global aggregate query
if
(
pQueryAttr
->
stableQuery
&&
(
pQueryAttr
->
simpleAgg
||
pQueryAttr
->
interval
.
interval
>
0
)
&&
pQueryInfo
->
globalMerge
)
{
if
(
pQueryAttr
->
stableQuery
&&
(
pQueryAttr
->
simpleAgg
||
pQueryAttr
->
interval
.
interval
>
0
)
&&
tscIsTwoStageSTableQuery
(
pQueryInfo
,
0
)
)
{
createGlobalAggregateExpr
(
pQueryAttr
,
pQueryInfo
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录