From ab6e36e950c00c18158d38404c8f3a75ce9114e4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 27 May 2021 11:22:48 +0800 Subject: [PATCH] [td-4372] refactor. --- src/tsdb/src/tsdbMeta.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index b074b04522..0a4ea5e153 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -924,15 +924,7 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) { STable *pSTable = pTable->pSuper; ASSERT(pSTable != NULL); - STSchema *pSchema = tsdbGetTableTagSchema(pTable); - STColumn *pCol = schemaColAt(pSchema, DEFAULT_TAG_INDEX_COLUMN); - - char * key = tdGetKVRowValOfCol(pTable->tagVal, pCol->colId); - if (key == NULL) { - // treat the column as NULL if we cannot find it - key = getNullValue(pCol->type); - } - + char* key = getTagIndexKey(pTable); SArray *res = tSkipListGet(pSTable->pIndex, key); size_t size = taosArrayGetSize(res);