Merge pull request #14162 from taosdata/szhou/feature/sort-group-2

fix: fix empty downstream input for group sort operator
This commit is contained in:
shenglian-zhou 2022-06-23 20:44:21 +08:00 committed by GitHub
commit e7d86e2c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -390,6 +390,10 @@ SSDataBlock* doGroupSort(SOperatorInfo* pOperator) {
pInfo->hasGroupId = true;
pInfo->prefetchedSortInput = pOperator->pDownstream[0]->fpSet.getNextFn(pOperator->pDownstream[0]);
if (pInfo->prefetchedSortInput == NULL) {
doSetOperatorCompleted(pOperator);
return NULL;
}
pInfo->currGroupId = pInfo->prefetchedSortInput->info.groupId;
pInfo->childOpStatus = CHILD_OP_NEW_GROUP;
beginSortGroup(pOperator);