fix: user tags scan filter produces zero row will not end the sys table scan operator
This commit is contained in:
parent
4e5315f1ac
commit
ff22c97d99
|
@ -2038,9 +2038,33 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
metaReaderClear(&smr);
|
metaReaderClear(&smr);
|
||||||
|
|
||||||
if (numOfRows >= pOperator->resultInfo.capacity) {
|
if (numOfRows >= pOperator->resultInfo.capacity) {
|
||||||
|
p->info.rows = numOfRows;
|
||||||
|
pInfo->pRes->info.rows = numOfRows;
|
||||||
|
|
||||||
|
relocateColumnData(pInfo->pRes, pInfo->scanCols, p->pDataBlock, false);
|
||||||
|
doFilterResult(pInfo);
|
||||||
|
|
||||||
|
blockDataCleanup(p);
|
||||||
|
numOfRows = 0;
|
||||||
|
|
||||||
|
if (pInfo->pRes->info.rows > 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOfRows > 0) {
|
||||||
|
p->info.rows = numOfRows;
|
||||||
|
pInfo->pRes->info.rows = numOfRows;
|
||||||
|
|
||||||
|
relocateColumnData(pInfo->pRes, pInfo->scanCols, p->pDataBlock, false);
|
||||||
|
doFilterResult(pInfo);
|
||||||
|
|
||||||
|
blockDataCleanup(p);
|
||||||
|
numOfRows = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockDataDestroy(p);
|
||||||
|
|
||||||
// todo temporarily free the cursor here, the true reason why the free is not valid needs to be found
|
// todo temporarily free the cursor here, the true reason why the free is not valid needs to be found
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@ -2049,14 +2073,6 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
doSetOperatorCompleted(pOperator);
|
doSetOperatorCompleted(pOperator);
|
||||||
}
|
}
|
||||||
|
|
||||||
p->info.rows = numOfRows;
|
|
||||||
pInfo->pRes->info.rows = numOfRows;
|
|
||||||
|
|
||||||
relocateColumnData(pInfo->pRes, pInfo->scanCols, p->pDataBlock, false);
|
|
||||||
doFilterResult(pInfo);
|
|
||||||
|
|
||||||
blockDataDestroy(p);
|
|
||||||
|
|
||||||
pInfo->loadInfo.totalRows += pInfo->pRes->info.rows;
|
pInfo->loadInfo.totalRows += pInfo->pRes->info.rows;
|
||||||
return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes;
|
return (pInfo->pRes->info.rows == 0) ? NULL : pInfo->pRes;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue