From 21ecacf40e04412eab7ca6a5875e2150e20d46c2 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 26 Jan 2022 15:53:08 +0800 Subject: [PATCH] [td-13288]fix crash when querying empty child table. --- source/libs/executor/src/executorimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 1322ec6b83..836b17a868 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -5896,7 +5896,7 @@ static SSDataBlock* doAggregate(void* param, bool* newgroup) { finalizeQueryResult(pOperator, pInfo->pCtx, &pInfo->resultRowInfo, pInfo->rowCellInfoOffset); pInfo->pRes->info.rows = getNumOfResult(pInfo->pCtx, pOperator->numOfOutput); - return pInfo->pRes; + return (pInfo->pRes->info.rows != 0)? pInfo->pRes:NULL; } static SSDataBlock* doSTableAggregate(void* param, bool* newgroup) {