From af5a16b129040dd953a79ec73bcebdf80f76c317 Mon Sep 17 00:00:00 2001 From: slzhou Date: Fri, 7 Apr 2023 18:54:37 +0800 Subject: [PATCH] fix: set block allocated to false for each call to downstream operator --- source/libs/executor/src/aggregateoperator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/aggregateoperator.c b/source/libs/executor/src/aggregateoperator.c index d5fc507b94..ec8060348d 100644 --- a/source/libs/executor/src/aggregateoperator.c +++ b/source/libs/executor/src/aggregateoperator.c @@ -172,9 +172,9 @@ int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) { int32_t scanFlag = MAIN_SCAN; bool hasValidBlock = false; - bool blockAllocated = false; while (1) { + bool blockAllocated = false; SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); if (pBlock == NULL) { if (!hasValidBlock) { @@ -570,4 +570,4 @@ void functionCtxRestore(SqlFunctionCtx* pCtx, SFunctionCtxStatus* pStatus) { pCtx->input.colDataSMAIsSet = pStatus->hasAgg; pCtx->input.numOfRows = pStatus->numOfRows; pCtx->input.startRowIndex = pStatus->startOffset; -} \ No newline at end of file +}