Merge pull request #25478 from taosdata/fix/TD-29781-3.0
fix: sys scan user tags
This commit is contained in:
commit
e6db086365
|
@ -720,7 +720,6 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
pAPI->metaFn.resumeTableMetaCursor(pInfo->pCur, 0, 0);
|
pAPI->metaFn.resumeTableMetaCursor(pInfo->pCur, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool blockFull = false;
|
|
||||||
while ((ret = pAPI->metaFn.cursorNext(pInfo->pCur, TSDB_SUPER_TABLE)) == 0) {
|
while ((ret = pAPI->metaFn.cursorNext(pInfo->pCur, TSDB_SUPER_TABLE)) == 0) {
|
||||||
if (pInfo->pCur->mr.me.type != TSDB_CHILD_TABLE) {
|
if (pInfo->pCur->mr.me.type != TSDB_CHILD_TABLE) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -743,25 +742,19 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((smrSuperTable.me.stbEntry.schemaTag.nCols + numOfRows) > pOperator->resultInfo.capacity) {
|
if ((smrSuperTable.me.stbEntry.schemaTag.nCols + numOfRows) > pOperator->resultInfo.capacity) {
|
||||||
blockFull = true;
|
|
||||||
} else {
|
|
||||||
sysTableUserTagsFillOneTableTags(pInfo, &smrSuperTable, &pInfo->pCur->mr, dbname, tableName, &numOfRows,
|
|
||||||
dataBlock);
|
|
||||||
}
|
|
||||||
|
|
||||||
pAPI->metaReaderFn.clearReader(&smrSuperTable);
|
|
||||||
|
|
||||||
if (blockFull || numOfRows >= pOperator->resultInfo.capacity) {
|
|
||||||
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
||||||
numOfRows = 0;
|
numOfRows = 0;
|
||||||
|
|
||||||
if (pInfo->pRes->info.rows > 0) {
|
if (pInfo->pRes->info.rows > 0) {
|
||||||
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
||||||
|
pAPI->metaReaderFn.clearReader(&smrSuperTable);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
blockFull = false;
|
sysTableUserTagsFillOneTableTags(pInfo, &smrSuperTable, &pInfo->pCur->mr, dbname, tableName, &numOfRows,
|
||||||
|
dataBlock);
|
||||||
}
|
}
|
||||||
|
pAPI->metaReaderFn.clearReader(&smrSuperTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfRows > 0) {
|
if (numOfRows > 0) {
|
||||||
|
|
Loading…
Reference in New Issue