fix(query): check the error code, if the downstream is an exchange operator.

This commit is contained in:
Haojun Liao 2022-11-25 18:16:27 +08:00
parent b39153101a
commit 46e1438c2a
1 changed files with 6 additions and 1 deletions

View File

@ -1641,11 +1641,16 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) {
}
}
// the downstream operator may return with error code, so let's check the code before generating results.
if (pTaskInfo->code != TSDB_CODE_SUCCESS) {
T_LONG_JMP(pTaskInfo->env, pTaskInfo->code);
}
initGroupedResultInfo(&pAggInfo->groupResInfo, pAggInfo->aggSup.pResultRowHashTable, 0);
OPTR_SET_OPENED(pOperator);
pOperator->cost.openCost = (taosGetTimestampUs() - st) / 1000.0;
return TSDB_CODE_SUCCESS;
return pTaskInfo->code;
}
static SSDataBlock* getAggregateResult(SOperatorInfo* pOperator) {