提交 46e1438c 编写于 作者: H Haojun Liao

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

上级 b3915310
...@@ -1641,11 +1641,16 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) { ...@@ -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); initGroupedResultInfo(&pAggInfo->groupResInfo, pAggInfo->aggSup.pResultRowHashTable, 0);
OPTR_SET_OPENED(pOperator); OPTR_SET_OPENED(pOperator);
pOperator->cost.openCost = (taosGetTimestampUs() - st) / 1000.0; pOperator->cost.openCost = (taosGetTimestampUs() - st) / 1000.0;
return TSDB_CODE_SUCCESS; return pTaskInfo->code;
} }
static SSDataBlock* getAggregateResult(SOperatorInfo* pOperator) { static SSDataBlock* getAggregateResult(SOperatorInfo* pOperator) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册