refactor:do internal refactor.
This commit is contained in:
parent
985d9a638a
commit
be08ccaedc
|
@ -47,9 +47,9 @@ int32_t tsdbRetrieveLastRow(void* pVnode, const SArray* pTableIdList, int32_t ty
|
||||||
int64_t lastKey = INT64_MIN;
|
int64_t lastKey = INT64_MIN;
|
||||||
bool internalResult = false;
|
bool internalResult = false;
|
||||||
for (int32_t i = 0; i < numOfTables; ++i) {
|
for (int32_t i = 0; i < numOfTables; ++i) {
|
||||||
tb_uid_t* uid = taosArrayGet(pTableIdList, i);
|
STableKeyInfo* pKeyInfo = taosArrayGet(pTableIdList, i);
|
||||||
|
|
||||||
int32_t code = tsdbCacheGetLastrow(pv->pTsdb->lruCache, *uid, pv->pTsdb, &pRow);
|
int32_t code = tsdbCacheGetLastrow(pv->pTsdb->lruCache, pKeyInfo->uid, pv->pTsdb, &pRow);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4177,6 +4177,17 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
|
||||||
// return NULL;
|
// return NULL;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
if (pScanNode->tableType == TSDB_SUPER_TABLE) {
|
||||||
|
int32_t code = vnodeGetAllTableList(pHandle->meta, pScanNode->uid, pTableListInfo->pTableList);
|
||||||
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
pTaskInfo->code = terrno;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else { // Create one table group.
|
||||||
|
STableKeyInfo info = {.lastKey = 0, .uid = pScanNode->uid, .groupId = 0};
|
||||||
|
taosArrayPush(pTableListInfo->pTableList, &info);
|
||||||
|
}
|
||||||
|
|
||||||
return createLastrowScanOperator(pScanNode, pHandle, pTableListInfo->pTableList, pTaskInfo);
|
return createLastrowScanOperator(pScanNode, pHandle, pTableListInfo->pTableList, pTaskInfo);
|
||||||
} else {
|
} else {
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|
Loading…
Reference in New Issue