[td-13288]fix crash when querying empty child table.

This commit is contained in:
Haojun Liao 2022-01-26 15:53:08 +08:00
parent ac567bac9b
commit 21ecacf40e
1 changed files with 1 additions and 1 deletions

View File

@ -5896,7 +5896,7 @@ static SSDataBlock* doAggregate(void* param, bool* newgroup) {
finalizeQueryResult(pOperator, pInfo->pCtx, &pInfo->resultRowInfo, pInfo->rowCellInfoOffset); finalizeQueryResult(pOperator, pInfo->pCtx, &pInfo->resultRowInfo, pInfo->rowCellInfoOffset);
pInfo->pRes->info.rows = getNumOfResult(pInfo->pCtx, pOperator->numOfOutput); 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) { static SSDataBlock* doSTableAggregate(void* param, bool* newgroup) {