Merge pull request #28005 from taosdata/fix/TD-32196-3.0
fix(query)[TD-32196]. Fix error code handling in group sort
This commit is contained in:
commit
3a7c03e2d8
|
@ -735,7 +735,10 @@ int32_t doGroupSort(SOperatorInfo* pOperator, SSDataBlock** pResBlock) {
|
|||
|
||||
code = getGroupSortedBlockData(pInfo->pCurrSortHandle, pInfo->binfo.pRes, pOperator->resultInfo.capacity,
|
||||
pInfo->matchInfo.pList, pInfo, &pBlock);
|
||||
if (pBlock != NULL && (code == 0)) {
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
return code;
|
||||
}
|
||||
if (pBlock != NULL) {
|
||||
pBlock->info.id.groupId = pInfo->currGroupId;
|
||||
pOperator->resultInfo.totalRows += pBlock->info.rows;
|
||||
*pResBlock = pBlock;
|
||||
|
@ -745,6 +748,9 @@ int32_t doGroupSort(SOperatorInfo* pOperator, SSDataBlock** pResBlock) {
|
|||
(void) finishSortGroup(pOperator);
|
||||
pInfo->currGroupId = pInfo->prefetchedSortInput->info.id.groupId;
|
||||
code = beginSortGroup(pOperator);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
} else if (pInfo->childOpStatus == CHILD_OP_FINISHED) {
|
||||
(void) finishSortGroup(pOperator);
|
||||
setOperatorCompleted(pOperator);
|
||||
|
|
Loading…
Reference in New Issue