Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
51760f7a
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
51760f7a
编写于
8月 28, 2021
作者:
H
Haojun Liao
提交者:
GitHub
8月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7668 from taosdata/fix/query
Fix/query
上级
28b52221
18fd493d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
20 deletion
+20
-20
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-0
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+18
-20
未找到文件。
src/client/src/tscServer.c
浏览文件 @
51760f7a
...
...
@@ -3011,6 +3011,8 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
return
getTableMetaFromMnode
(
pSql
,
pTableMetaInfo
,
autocreate
);
}
}
tscDebug
(
"0x%"
PRIx64
" %s retrieve tableMeta from cache, numOfCols:%d, numOfTags:%d"
,
pSql
->
self
,
name
,
pMeta
->
tableInfo
.
numOfColumns
,
pMeta
->
tableInfo
.
numOfTags
);
return
TSDB_CODE_SUCCESS
;
}
...
...
src/query/src/qExecutor.c
浏览文件 @
51760f7a
...
...
@@ -231,6 +231,12 @@ static void destroyStateWindowOperatorInfo(void* param, int32_t numOfOutput);
static
void
destroyAggOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyOperatorInfo
(
SOperatorInfo
*
pOperator
);
static
void
doSetOperatorCompleted
(
SOperatorInfo
*
pOperator
)
{
pOperator
->
status
=
OP_EXEC_DONE
;
if
(
pOperator
->
pRuntimeEnv
!=
NULL
)
{
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
}
}
static
int32_t
doCopyToSDataBlock
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SGroupResInfo
*
pGroupResInfo
,
int32_t
orderType
,
SSDataBlock
*
pBlock
);
...
...
@@ -5493,8 +5499,7 @@ static SSDataBlock* doSort(void* param, bool* newgroup) {
// start to flush data into disk and try do multiway merge sort
if
(
pBlock
==
NULL
)
{
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
break
;
}
...
...
@@ -5605,8 +5610,7 @@ static SSDataBlock* doAggregate(void* param, bool* newgroup) {
doAggregateImpl
(
pOperator
,
pQueryAttr
->
window
.
skey
,
pInfo
->
pCtx
,
pBlock
);
}
pOperator
->
status
=
OP_EXEC_DONE
;
setQueryStatus
(
pRuntimeEnv
,
QUERY_COMPLETED
);
doSetOperatorCompleted
(
pOperator
);
finalizeQueryResult
(
pOperator
,
pInfo
->
pCtx
,
&
pInfo
->
resultRowInfo
,
pInfo
->
rowCellInfoOffset
);
pInfo
->
pRes
->
info
.
rows
=
getNumOfResult
(
pRuntimeEnv
,
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
...
...
@@ -5682,7 +5686,7 @@ static SSDataBlock* doSTableAggregate(void* param, bool* newgroup) {
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pInfo
->
pRes
);
if
(
pInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
)
;
}
return
pInfo
->
pRes
;
...
...
@@ -5800,8 +5804,7 @@ static SSDataBlock* doLimit(void* param, bool* newgroup) {
publishOperatorProfEvent
(
pOperator
->
upstream
[
0
],
QUERY_PROF_AFTER_OPERATOR_EXEC
);
if
(
pBlock
==
NULL
)
{
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
return
NULL
;
}
...
...
@@ -5829,8 +5832,7 @@ static SSDataBlock* doLimit(void* param, bool* newgroup) {
pBlock
->
info
.
rows
=
(
int32_t
)(
pInfo
->
limit
-
pInfo
->
total
);
pInfo
->
total
=
pInfo
->
limit
;
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
}
else
{
pInfo
->
total
+=
pBlock
->
info
.
rows
;
}
...
...
@@ -5865,8 +5867,7 @@ static SSDataBlock* doFilter(void* param, bool* newgroup) {
}
}
setQueryStatus
(
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
return
NULL
;
}
...
...
@@ -5881,9 +5882,8 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
SQueryRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
)
;
}
return
pIntervalInfo
->
pRes
;
...
...
@@ -5924,7 +5924,7 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
)
;
}
return
pIntervalInfo
->
pRes
->
info
.
rows
==
0
?
NULL
:
pIntervalInfo
->
pRes
;
...
...
@@ -5943,7 +5943,7 @@ static SSDataBlock* doAllIntervalAgg(void* param, bool* newgroup) {
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pIntervalInfo
->
pRes
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
)
;
}
return
pIntervalInfo
->
pRes
;
...
...
@@ -6002,7 +6002,7 @@ static SSDataBlock* doSTableIntervalAgg(void* param, bool* newgroup) {
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
copyToSDataBlock
(
pRuntimeEnv
,
3000
,
pIntervalInfo
->
pRes
,
pIntervalInfo
->
rowCellInfoOffset
);
if
(
pIntervalInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainData
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
)
;
}
return
pIntervalInfo
->
pRes
;
...
...
@@ -7250,13 +7250,11 @@ static SSDataBlock* hashDistinct(void* param, bool* newgroup) {
publishOperatorProfEvent
(
pOperator
->
upstream
[
0
],
QUERY_PROF_AFTER_OPERATOR_EXEC
);
if
(
pBlock
==
NULL
)
{
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
break
;
}
if
(
!
initMultiDistinctInfo
(
pInfo
,
pOperator
,
pBlock
))
{
setQueryStatus
(
pOperator
->
pRuntimeEnv
,
QUERY_COMPLETED
);
pOperator
->
status
=
OP_EXEC_DONE
;
doSetOperatorCompleted
(
pOperator
);
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录