[td-988]
This commit is contained in:
parent
cf509b85e1
commit
e2196d6f80
|
@ -316,17 +316,20 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh
|
||||||
|
|
||||||
assert(pCheckInfo->iter == NULL && pCheckInfo->iiter == NULL);
|
assert(pCheckInfo->iter == NULL && pCheckInfo->iiter == NULL);
|
||||||
|
|
||||||
// TODO: add uid check
|
if (pHandle->mem && pCheckInfo->tableId.tid < pHandle->mem->maxTables) {
|
||||||
if (pHandle->mem && pCheckInfo->tableId.tid < pHandle->mem->maxTables &&
|
STableData* ptd = pHandle->mem->tData[pCheckInfo->tableId.tid];
|
||||||
pHandle->mem->tData[pCheckInfo->tableId.tid] != NULL) {
|
if (ptd != NULL && ptd->uid == pCheckInfo->tableId.uid) { // check uid
|
||||||
pCheckInfo->iter = tSkipListCreateIterFromVal(pHandle->mem->tData[pCheckInfo->tableId.tid]->pData,
|
pCheckInfo->iter =
|
||||||
(const char*)&pCheckInfo->lastKey, TSDB_DATA_TYPE_TIMESTAMP, order);
|
tSkipListCreateIterFromVal(ptd->pData, (const char*)&pCheckInfo->lastKey, TSDB_DATA_TYPE_TIMESTAMP, order);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pHandle->imem && pCheckInfo->tableId.tid < pHandle->imem->maxTables &&
|
if (pHandle->imem && pCheckInfo->tableId.tid < pHandle->imem->maxTables) {
|
||||||
pHandle->imem->tData[pCheckInfo->tableId.tid] != NULL) {
|
STableData* ptd = pHandle->imem->tData[pCheckInfo->tableId.tid];
|
||||||
pCheckInfo->iiter = tSkipListCreateIterFromVal(pHandle->imem->tData[pCheckInfo->tableId.tid]->pData,
|
if (ptd != NULL && ptd->uid == pCheckInfo->tableId.uid) { // check uid
|
||||||
(const char*)&pCheckInfo->lastKey, TSDB_DATA_TYPE_TIMESTAMP, order);
|
pCheckInfo->iiter =
|
||||||
|
tSkipListCreateIterFromVal(ptd->pData, (const char*)&pCheckInfo->lastKey, TSDB_DATA_TYPE_TIMESTAMP, order);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// both iterators are NULL, no data in buffer right now
|
// both iterators are NULL, no data in buffer right now
|
||||||
|
|
Loading…
Reference in New Issue