fix: return null when there are no input stream blocks for priority queue sort
This commit is contained in:
parent
a205eba2ab
commit
ca2ad71bb8
|
@ -1405,6 +1405,9 @@ static int32_t tsortOpenForPQSort(SSortHandle* pHandle) {
|
|||
}
|
||||
|
||||
static STupleHandle* tsortPQSortNextTuple(SSortHandle* pHandle) {
|
||||
if (pHandle->pDataBlock == NULL) { // when no input stream datablock
|
||||
return NULL;
|
||||
}
|
||||
blockDataCleanup(pHandle->pDataBlock);
|
||||
blockDataEnsureCapacity(pHandle->pDataBlock, 1);
|
||||
// abandon the top tuple if queue size bigger than max size
|
||||
|
|
Loading…
Reference in New Issue