fix error not reported in sort operator

This commit is contained in:
wangjiaming0909 2024-08-22 19:09:25 +08:00
parent cf645f4cdf
commit 9ae951621b
2 changed files with 6 additions and 0 deletions

View File

@ -973,6 +973,9 @@ int32_t blockDataToBuf(char* buf, const SSDataBlock* pBlock) {
int32_t blockDataFromBuf(SSDataBlock* pBlock, const char* buf) {
int32_t numOfRows = *(int32_t*)buf;
if (numOfRows == 0) {
return TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
}
int32_t code = blockDataEnsureCapacity(pBlock, numOfRows);
if (code) {
return code;

View File

@ -295,6 +295,9 @@ static int32_t getSortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock,
break;
}
}
if (TSDB_CODE_SUCCESS != code) {
return code;
}
if (p->info.rows > 0) {
code = blockDataEnsureCapacity(pDataBlock, capacity);