Merge pull request #9045 from taosdata/feature/fst
update fst search frame
This commit is contained in:
commit
f45083c6aa
|
@ -275,6 +275,7 @@ FstNode* fstGetRoot(Fst *fst);
|
|||
FstType fstGetType(Fst *fst);
|
||||
CompiledAddr fstGetRootAddr(Fst *fst);
|
||||
Output fstEmptyFinalOutput(Fst *fst, bool *null);
|
||||
|
||||
bool fstVerify(Fst *fst);
|
||||
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ typedef struct AutomationFunc {
|
|||
} AutomationFunc;
|
||||
|
||||
AutomationCtx *automCtxCreate(void *data, AutomationType type);
|
||||
void autoCtxDestroy(AutomationCtx *ctx);
|
||||
|
||||
extern AutomationFunc automFuncs[];
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1072,7 +1072,6 @@ bool fstGet(Fst *fst, FstSlice *b, Output *out) {
|
|||
tOut += trn.out;
|
||||
root = fstGetNode(fst, trn.addr);
|
||||
taosArrayPush(nodes, &root);
|
||||
//fstNodeDestroy(root);
|
||||
}
|
||||
if (!FST_NODE_IS_FINAL(root)) {
|
||||
return false;
|
||||
|
|
|
@ -75,6 +75,7 @@ AutomationFunc automFuncs[] = {{
|
|||
patternAccept,
|
||||
patternAcceptEof
|
||||
}
|
||||
// add more search type
|
||||
};
|
||||
|
||||
AutomationCtx* automCtxCreate(void *data, AutomationType type) {
|
||||
|
@ -82,8 +83,15 @@ AutomationCtx* automCtxCreate(void *data, AutomationType type) {
|
|||
if (ctx == NULL) { return NULL; }
|
||||
|
||||
ctx->type = type;
|
||||
if (type == AUTOMATION_PREFIX) {
|
||||
if (ctx->type == AUTOMATION_PREFIX) {
|
||||
|
||||
}
|
||||
}
|
||||
} else if (ctx->type == AUTMMATION_MATCH) {
|
||||
|
||||
} else {
|
||||
// add more search type
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
void autoCtxDestroy(AutomationCtx *ctx) {
|
||||
free(ctx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue