From 065351396844ea276023abad2a8d20c9672930ee Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 29 Mar 2022 15:06:28 +0800 Subject: [PATCH] fst query --- source/libs/index/src/index_fst.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/source/libs/index/src/index_fst.c b/source/libs/index/src/index_fst.c index 12f3b37749..eaefaca887 100644 --- a/source/libs/index/src/index_fst.c +++ b/source/libs/index/src/index_fst.c @@ -645,10 +645,6 @@ void fstNodeDestroy(FstNode* node) { fstSliceDestroy(&node->data); taosMemoryFree(node); } -void fstNodeDestroyP(void* node) { - FstNode* n = (FstNode*)(*(FstNode**)node); - fstNodeDestroy(n); -}; FstTransitions* fstNodeTransitions(FstNode* node) { FstTransitions* t = taosMemoryMalloc(sizeof(FstTransitions)); if (NULL == t) { @@ -1359,7 +1355,7 @@ StreamWithStateResult* streamWithStateNextWith(StreamWithState* sws, StreamCallb sws->stack = (SArray*)taosArrayInit(256, sizeof(StreamState)); taosMemoryFreeClear(buf); fstSliceDestroy(&slice); - taosArrayDestroyEx(nodes, NULL); + taosArrayDestroy(nodes); return NULL; } if (FST_NODE_IS_FINAL(nextNode) && isMatch) { @@ -1367,20 +1363,14 @@ StreamWithStateResult* streamWithStateNextWith(StreamWithState* sws, StreamCallb StreamWithStateResult* result = swsResultCreate(&slice, fOutput, tState); taosMemoryFreeClear(buf); fstSliceDestroy(&slice); - taosArrayDestroyEx(nodes, NULL); + taosArrayDestroy(nodes); nodes = NULL; return result; } taosMemoryFreeClear(buf); fstSliceDestroy(&slice); }; - taosArrayDestroyEx(nodes, NULL); - // taosArrayDestroyEx(nodes, ); - // for (size_t i = 0; i < taosArrayGetSize(nodes); i++) { - // FstNode** node = (FstNode**)taosArrayGet(nodes, i); - // fstNodeDestroy(*node); - //} - // taosArrayDestroy(nodes); + taosArrayDestroy(nodes); return NULL; } -- GitLab