Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1840949a
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看板
提交
1840949a
编写于
11月 05, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix commit issue
上级
7c1c3e50
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
18 addition
and
42 deletion
+18
-42
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+18
-42
未找到文件。
src/query/src/qExecutor.c
浏览文件 @
1840949a
...
...
@@ -6243,18 +6243,15 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
pRes
->
info
.
rows
=
0
;
if
(
!
pEveryInfo
->
groupDone
)
{
qDebug
(
"0"
);
updateOutputBuf
(
&
pEveryInfo
->
binfo
,
&
pEveryInfo
->
bufCapacity
,
0
);
doTimeEveryImpl
(
pOperator
,
pInfo
->
pCtx
,
pEveryInfo
->
lastBlock
,
false
);
if
(
pRes
->
info
.
rows
>=
pRuntimeEnv
->
resultInfo
.
threshold
)
{
copyTsColoum
(
pRes
,
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
clearNumOfRes
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
qDebug
(
"1"
);
return
pInfo
->
pRes
;
}
if
(
pRes
->
info
.
rows
>
0
)
{
qDebug
(
"2"
);
copyTsColoum
(
pRes
,
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
clearNumOfRes
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
return
pInfo
->
pRes
;
...
...
@@ -6262,7 +6259,6 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
}
if
(
pEveryInfo
->
allDone
)
{
qDebug
(
"3"
);
setQueryStatus
(
pRuntimeEnv
,
QUERY_COMPLETED
);
return
NULL
;
}
...
...
@@ -6270,7 +6266,6 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
if
(
pEveryInfo
->
existDataBlock
)
{
// TODO refactor
STableQueryInfo
*
pTableQueryInfo
=
pRuntimeEnv
->
current
;
qDebug
(
"4"
);
SSDataBlock
*
pBlock
=
pEveryInfo
->
existDataBlock
;
pEveryInfo
->
existDataBlock
=
NULL
;
...
...
@@ -6288,16 +6283,10 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
doTimeEveryImpl
(
pOperator
,
pInfo
->
pCtx
,
pBlock
,
*
newgroup
);
if
(
pEveryInfo
->
groupDone
&&
pOperator
->
upstream
[
0
]
->
notify
)
{
qDebug
(
"5"
);
pOperator
->
upstream
[
0
]
->
notify
(
pOperator
->
upstream
[
0
],
OPTION_SWITCH_TABLE
);
}
qDebug
(
"6"
);
if
(
pRes
->
info
.
rows
>=
pRuntimeEnv
->
resultInfo
.
threshold
)
{
qDebug
(
"7"
);
copyTsColoum
(
pRes
,
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
clearNumOfRes
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
return
pRes
;
...
...
@@ -6315,26 +6304,19 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
if
(
pBlock
==
NULL
)
{
if
(
!
pEveryInfo
->
groupDone
)
{
pEveryInfo
->
allDone
=
true
;
qDebug
(
"8"
);
updateOutputBuf
(
&
pEveryInfo
->
binfo
,
&
pEveryInfo
->
bufCapacity
,
0
);
doTimeEveryImpl
(
pOperator
,
pInfo
->
pCtx
,
NULL
,
false
);
if
(
pRes
->
info
.
rows
>=
pRuntimeEnv
->
resultInfo
.
threshold
)
{
qDebug
(
"9"
);
break
;
}
assert
(
pEveryInfo
->
groupDone
);
qDebug
(
"10"
);
if
(
pRes
->
info
.
rows
>
0
)
{
qDebug
(
"11"
);
break
;
}
}
qDebug
(
"12"
);
*
newgroup
=
prevVal
;
setQueryStatus
(
pRuntimeEnv
,
QUERY_COMPLETED
);
...
...
@@ -6343,30 +6325,18 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
// Return result of the previous group in the firstly.
if
(
*
newgroup
)
{
qDebug
(
"13"
);
if
(
!
pEveryInfo
->
groupDone
)
{
qDebug
(
"14"
);
updateOutputBuf
(
&
pEveryInfo
->
binfo
,
&
pEveryInfo
->
bufCapacity
,
0
);
doTimeEveryImpl
(
pOperator
,
pInfo
->
pCtx
,
NULL
,
false
);
if
(
pRes
->
info
.
rows
>=
pRuntimeEnv
->
resultInfo
.
threshold
)
{
qDebug
(
"15"
);
pEveryInfo
->
existDataBlock
=
pBlock
;
break
;
}
qDebug
(
"16"
);
assert
(
pEveryInfo
->
groupDone
);
}
qDebug
(
"17"
);
if
(
pRes
->
info
.
rows
>
0
)
{
qDebug
(
"18"
);
pEveryInfo
->
existDataBlock
=
pBlock
;
break
;
}
else
{
// init output buffer for a new group data
...
...
@@ -6375,8 +6345,6 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
}
initCtxOutputBuffer
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
pEveryInfo
->
groupDone
=
false
;
qDebug
(
"19"
);
}
}
...
...
@@ -6395,28 +6363,19 @@ static SSDataBlock* doTimeEvery(void* param, bool* newgroup) {
// the pDataBlock are always the same one, no need to call this again
setInputDataBlock
(
pOperator
,
pInfo
->
pCtx
,
pBlock
,
order
);
updateOutputBuf
(
&
pEveryInfo
->
binfo
,
&
pEveryInfo
->
bufCapacity
,
pBlock
->
info
.
rows
);
qDebug
(
"20"
);
pEveryInfo
->
groupDone
=
false
;
doTimeEveryImpl
(
pOperator
,
pInfo
->
pCtx
,
pBlock
,
*
newgroup
);
if
(
pEveryInfo
->
groupDone
&&
pOperator
->
upstream
[
0
]
->
notify
)
{
qDebug
(
"21"
);
pOperator
->
upstream
[
0
]
->
notify
(
pOperator
->
upstream
[
0
],
OPTION_SWITCH_TABLE
);
}
if
(
pRes
->
info
.
rows
>=
pRuntimeEnv
->
resultInfo
.
threshold
)
{
qDebug
(
"22"
);
break
;
}
qDebug
(
"23"
);
}
qDebug
(
"24"
);
copyTsColoum
(
pRes
,
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
clearNumOfRes
(
pInfo
->
pCtx
,
pOperator
->
numOfOutput
);
return
(
pInfo
->
pRes
->
info
.
rows
>
0
)
?
pInfo
->
pRes
:
NULL
;
...
...
@@ -9323,4 +9282,21 @@ void freeQueryAttr(SQueryAttr* pQueryAttr) {
pQueryAttr
->
pFilterInfo
=
doDestroyFilterInfo
(
pQueryAttr
->
pFilterInfo
,
pQueryAttr
->
numOfFilterCols
);
pQueryAttr
->
pExpr1
=
destroyQueryFuncExpr
(
p
\ No newline at end of file
pQueryAttr
->
pExpr1
=
destroyQueryFuncExpr
(
pQueryAttr
->
pExpr1
,
pQueryAttr
->
numOfOutput
);
pQueryAttr
->
pExpr2
=
destroyQueryFuncExpr
(
pQueryAttr
->
pExpr2
,
pQueryAttr
->
numOfExpr2
);
pQueryAttr
->
pExpr3
=
destroyQueryFuncExpr
(
pQueryAttr
->
pExpr3
,
pQueryAttr
->
numOfExpr3
);
tfree
(
pQueryAttr
->
tagColList
);
tfree
(
pQueryAttr
->
pFilterInfo
);
pQueryAttr
->
tableCols
=
freeColumnInfo
(
pQueryAttr
->
tableCols
,
pQueryAttr
->
numOfCols
);
if
(
pQueryAttr
->
pGroupbyExpr
!=
NULL
)
{
taosArrayDestroy
(
pQueryAttr
->
pGroupbyExpr
->
columnInfo
);
tfree
(
pQueryAttr
->
pGroupbyExpr
);
}
filterFreeInfo
(
pQueryAttr
->
pFilters
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录