提交 06c2c828 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> add taos json key hash free function

上级 8c2598f2
......@@ -866,6 +866,7 @@ static STable *tsdbCreateTableFromCfg(STableCfg *pCfg, bool isSuper, STable *pST
tsdbFreeTable(pTable);
return NULL;
}
taosHashSetFreeFp(pTable->jsonKeyMap, (_hash_free_fn_t)taosArrayDestroy);
}else{
pTable->pIndex = tSkipListCreate(TSDB_SUPER_TABLE_SL_LEVEL, colType(pCol), (uint8_t)(colBytes(pCol)), NULL,
SL_ALLOW_DUP_KEY, getTagIndexKey);
......@@ -925,21 +926,6 @@ _err:
return NULL;
}
static void* tsdbDestroyTagJsonHashTable(SHashObj* hashObj) {
if (hashObj == NULL) {
return NULL;
}
SArray * p = taosHashIterate(hashObj, NULL);
while(p) {
taosArrayDestroy(p);
p = taosHashIterate(hashObj, p);
}
taosHashCleanup(hashObj);
return NULL;
}
static void tsdbFreeTable(STable *pTable) {
if (pTable) {
if (pTable->name != NULL)
......@@ -957,7 +943,7 @@ static void tsdbFreeTable(STable *pTable) {
kvRowFree(pTable->tagVal);
tSkipListDestroy(pTable->pIndex);
tsdbDestroyTagJsonHashTable(pTable->jsonKeyMap);
taosHashCleanup(pTable->jsonKeyMap);
taosTZfree(pTable->lastRow);
tfree(pTable->sql);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册