提交 e2196d6f 编写于 作者: H Haojun Liao

[td-988]

上级 cf509b85
...@@ -316,17 +316,20 @@ static bool initTableMemIterator(STsdbQueryHandle* pHandle, STableCheckInfo* pCh ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册