未验证 提交 bf916610 编写于 作者: dengyihao's avatar dengyihao 提交者: GitHub

Merge pull request #11213 from taosdata/feature/indexUpdate

handle except
......@@ -642,6 +642,9 @@ static const char* fstNodeState(FstNode* node) {
}
void fstNodeDestroy(FstNode* node) {
if (node == NULL) {
return;
}
fstSliceDestroy(&node->data);
taosMemoryFree(node);
}
......@@ -1247,7 +1250,10 @@ bool streamWithStateSeekMin(StreamWithState* sws, FstBoundWithData* min) {
// autState = sws->aut->accept(preState, b);
autState = automFuncs[aut->type].accept(aut, preState, b);
taosArrayPush(sws->inp, &b);
StreamState s = {.node = node, .trans = res + 1, .out = {.null = false, .out = out}, .autState = preState};
node = NULL;
taosArrayPush(sws->stack, &s);
out += trn.out;
node = fstGetNode(sws->fst, trn.addr);
......@@ -1271,6 +1277,9 @@ bool streamWithStateSeekMin(StreamWithState* sws, FstBoundWithData* min) {
return true;
}
}
fstNodeDestroy(node);
uint32_t sz = taosArrayGetSize(sws->stack);
if (sz != 0) {
StreamState* s = taosArrayGet(sws->stack, sz - 1);
......
......@@ -480,6 +480,15 @@ void checkFstCheckIteratorRange2() {
assert(result.size() == 4);
automCtxDestroy(ctx);
}
{
// range search
std::vector<uint64_t> result;
AutomationCtx* ctx = automCtxCreate((void*)"he", AUTOMATION_ALWAYS);
// [b, e)
m->SearchRange(ctx, "bb", GE, "ed", LT, result);
assert(result.size() == 3);
automCtxDestroy(ctx);
}
{
// range search
std::vector<uint64_t> result;
......@@ -635,11 +644,11 @@ int main(int argc, char* argv[]) {
// path suid colName ver
// iterTFileReader(argv[1], argv[2], argv[3], argv[4]);
//}
// checkFstCheckIterator1();
// checkFstCheckIterator2();
// checkFstCheckIteratorPrefix();
// checkFstCheckIteratorRange1();
// checkFstCheckIteratorRange2();
checkFstCheckIterator1();
checkFstCheckIterator2();
checkFstCheckIteratorPrefix();
checkFstCheckIteratorRange1();
checkFstCheckIteratorRange2();
checkFstCheckIteratorRange3();
// checkFstLongTerm();
// checkFstPrefixSearch();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册