Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e7e34456
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看板
提交
e7e34456
编写于
12月 09, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix mem leak
上级
c5db51f4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
17 addition
and
7 deletion
+17
-7
source/dnode/vnode/src/meta/metaCache.c
source/dnode/vnode/src/meta/metaCache.c
+1
-0
source/libs/executor/src/groupoperator.c
source/libs/executor/src/groupoperator.c
+16
-7
未找到文件。
source/dnode/vnode/src/meta/metaCache.c
浏览文件 @
e7e34456
...
...
@@ -472,6 +472,7 @@ int32_t metaGetCachedTableUidList(SMeta* pMeta, tb_uid_t suid, const uint8_t* pK
for
(
int32_t
i
=
0
;
i
<
s
;
++
i
)
{
SListNode
**
p1
=
taosArrayGet
(
pList
,
i
);
tdListPopNode
(
&
(
*
pEntry
)
->
list
,
*
p1
);
taosMemoryFree
(
*
p1
);
}
(
*
pEntry
)
->
qTimes
=
0
;
// reset the query times
...
...
source/libs/executor/src/groupoperator.c
浏览文件 @
e7e34456
...
...
@@ -314,7 +314,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
}
int32_t
rowIndex
=
j
-
num
;
applyAggFunctionOnPartialTuples
(
pTaskInfo
,
pCtx
,
NULL
,
rowIndex
,
num
,
pBlock
->
info
.
rows
,
pOperator
->
exprSupp
.
numOfExprs
);
applyAggFunctionOnPartialTuples
(
pTaskInfo
,
pCtx
,
NULL
,
rowIndex
,
num
,
pBlock
->
info
.
rows
,
pOperator
->
exprSupp
.
numOfExprs
);
// assign the group keys or user input constant values if required
doAssignGroupKeys
(
pCtx
,
pOperator
->
exprSupp
.
numOfExprs
,
pBlock
->
info
.
rows
,
rowIndex
);
...
...
@@ -331,7 +332,8 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
}
int32_t
rowIndex
=
pBlock
->
info
.
rows
-
num
;
applyAggFunctionOnPartialTuples
(
pTaskInfo
,
pCtx
,
NULL
,
rowIndex
,
num
,
pBlock
->
info
.
rows
,
pOperator
->
exprSupp
.
numOfExprs
);
applyAggFunctionOnPartialTuples
(
pTaskInfo
,
pCtx
,
NULL
,
rowIndex
,
num
,
pBlock
->
info
.
rows
,
pOperator
->
exprSupp
.
numOfExprs
);
doAssignGroupKeys
(
pCtx
,
pOperator
->
exprSupp
.
numOfExprs
,
pBlock
->
info
.
rows
,
rowIndex
);
}
}
...
...
@@ -469,8 +471,8 @@ SOperatorInfo* createGroupOperatorInfo(SOperatorInfo* downstream, SAggPhysiNode*
initResultRowInfo
(
&
pInfo
->
binfo
.
resultRowInfo
);
setOperatorInfo
(
pOperator
,
"GroupbyAggOperator"
,
0
,
true
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
hashGroupbyAggregate
,
NULL
,
destroyGroupOperatorInfo
,
optrDefaultBufFn
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
hashGroupbyAggregate
,
NULL
,
destroyGroupOperatorInfo
,
optrDefaultBufFn
,
NULL
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
_error
;
...
...
@@ -776,6 +778,12 @@ static void destroyPartitionOperatorInfo(void* param) {
taosArrayDestroy
(
pInfo
->
pGroupColVals
);
taosMemoryFree
(
pInfo
->
keyBuf
);
int32_t
size
=
taosArrayGetSize
(
pInfo
->
sortedGroupArray
);
for
(
int32_t
i
=
0
;
i
<
size
;
i
++
)
{
SDataGroupInfo
*
pGp
=
taosArrayGet
(
pInfo
->
sortedGroupArray
,
i
);
taosArrayDestroy
(
pGp
->
pPageList
);
}
taosArrayDestroy
(
pInfo
->
sortedGroupArray
);
void
*
pGroupIter
=
taosHashIterate
(
pInfo
->
pGroupSet
,
NULL
);
...
...
@@ -850,7 +858,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pOperator
->
exprSupp
.
pExprInfo
=
pExprInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
hashPartition
,
NULL
,
destroyPartitionOperatorInfo
,
optrDefaultBufFn
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
hashPartition
,
NULL
,
destroyPartitionOperatorInfo
,
optrDefaultBufFn
,
NULL
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
return
pOperator
;
...
...
@@ -1141,8 +1150,8 @@ SOperatorInfo* createStreamPartitionOperatorInfo(SOperatorInfo* downstream, SStr
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pOperator
->
exprSupp
.
pExprInfo
=
pExprInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
doStreamHashPartition
,
NULL
,
destroyStreamPartitionOperatorInfo
,
optrDefaultBufFn
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
optrDummyOpenFn
,
doStreamHashPartition
,
NULL
,
destroyStreamPartitionOperatorInfo
,
optrDefaultBufFn
,
NULL
);
initParDownStream
(
downstream
,
&
pInfo
->
partitionSup
,
&
pInfo
->
scalarSup
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录