remove invalid table
This commit is contained in:
parent
43841322ef
commit
1750b5cc92
|
@ -438,13 +438,12 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
|
|||
goto end;
|
||||
}
|
||||
}
|
||||
removeInvalidTable(uidList, tags);
|
||||
|
||||
int32_t rows = taosArrayGetSize(uidList);
|
||||
if (rows == 0) {
|
||||
goto end;
|
||||
}
|
||||
// int64_t stt1 = taosGetTimestampUs();
|
||||
// qDebug("generate tag meta rows:%d, cost:%ld us", rows, stt1-stt);
|
||||
|
||||
code = blockDataEnsureCapacity(pResBlock, rows);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
|
@ -452,7 +451,6 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
|
|||
goto end;
|
||||
}
|
||||
|
||||
// int64_t st = taosGetTimestampUs();
|
||||
for (int32_t i = 0; i < rows; i++) {
|
||||
int64_t* uid = taosArrayGet(uidList, i);
|
||||
for (int32_t j = 0; j < taosArrayGetSize(pResBlock->pDataBlock); j++) {
|
||||
|
@ -467,7 +465,9 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
|
|||
#endif
|
||||
} else {
|
||||
void* tag = taosHashGet(tags, uid, sizeof(int64_t));
|
||||
ASSERT(tag);
|
||||
if (tag == NULL) {
|
||||
continue;
|
||||
}
|
||||
STagVal tagVal = {0};
|
||||
tagVal.cid = pColInfo->info.colId;
|
||||
const char* p = metaGetTableTagVal(tag, pColInfo->info.type, &tagVal);
|
||||
|
@ -923,14 +923,14 @@ static int32_t optimizeTbnameInCondImpl(void* metaHandle, int64_t suid, SArray*
|
|||
return -1;
|
||||
}
|
||||
|
||||
SArray* pTbList = getTableNameList(pList);
|
||||
int32_t numOfTables = taosArrayGetSize(pTbList);
|
||||
SHashObj *uHash = NULL;
|
||||
SArray* pTbList = getTableNameList(pList);
|
||||
int32_t numOfTables = taosArrayGetSize(pTbList);
|
||||
SHashObj* uHash = NULL;
|
||||
size_t listlen = taosArrayGetSize(list); // len > 0 means there already have uids
|
||||
if (listlen > 0) {
|
||||
uHash = taosHashInit(32, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_NO_LOCK);
|
||||
for (int i = 0; i < listlen; i++) {
|
||||
int64_t *uid = taosArrayGet(list, i);
|
||||
int64_t* uid = taosArrayGet(list, i);
|
||||
taosHashPut(uHash, uid, sizeof(int64_t), &i, sizeof(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,9 +319,9 @@ SArray* taosArrayDup(const SArray* pSrc, __array_item_dup_fn_t fn) {
|
|||
} else {
|
||||
ASSERT(pSrc->elemSize == sizeof(void*));
|
||||
|
||||
for(int32_t i = 0; i < pSrc->size; ++i) {
|
||||
for (int32_t i = 0; i < pSrc->size; ++i) {
|
||||
void* p = fn(taosArrayGetP(pSrc, i));
|
||||
memcpy(((char*)dst->pData )+ i * dst->elemSize, &p, dst->elemSize);
|
||||
memcpy(((char*)dst->pData) + i * dst->elemSize, &p, dst->elemSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue