fix tag/json tag error

This commit is contained in:
yihaoDeng 2022-07-06 16:10:00 +08:00
parent 14cfbd7e45
commit 6e6721c6d4
1 changed files with 6 additions and 10 deletions

View File

@ -529,12 +529,10 @@ static int32_t sifExecOper(SOperatorNode *node, SIFCtx *ctx, SIFParam *output) {
SIFParam *params = NULL;
SIF_ERR_RET(sifInitOperParams(&params, node, ctx));
if (node->opType != OP_TYPE_JSON_CONTAINS) {
if (params[0].status == SFLT_NOT_INDEX || (nParam > 1 && params[1].status == SFLT_NOT_INDEX)) {
if (params[0].status == SFLT_NOT_INDEX && (nParam > 1 && params[1].status == SFLT_NOT_INDEX)) {
output->status = SFLT_NOT_INDEX;
return code;
}
}
// ugly code, refactor later
output->arg = ctx->arg;
@ -545,12 +543,10 @@ static int32_t sifExecOper(SOperatorNode *node, SIFCtx *ctx, SIFParam *output) {
SIF_ERR_RET(operFn(&params[0], nParam > 1 ? &params[1] : NULL, output));
} else {
// ugly code, refactor later
if (node->opType != OP_TYPE_JSON_CONTAINS) {
if (nParam > 1 && params[1].status == SFLT_NOT_INDEX) {
output->status = SFLT_NOT_INDEX;
return code;
}
}
SIF_ERR_RET(sifGetOperFn(node->opType, &operFn, &output->status));
}