diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 74b8afde823d4b769202dc19687928684a81d9ee..dded4a11ca0c8c2a2d21d764a30eddee0e857e8b 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -3398,7 +3398,7 @@ void setTagValue(SOperatorInfo* pOperatorInfo, void *pTable, SQLFunctionCtx* pCt SQueryAttr *pQueryAttr = pRuntimeEnv->pQueryAttr; SExprInfo* pExprInfo = &pExpr[0]; - if (pQueryAttr->numOfOutput == 2 && pExprInfo->base.functionId == TSDB_FUNC_TS_COMP && pQueryAttr->stableQuery) { + if (pQueryAttr->numOfOutput == 1 && pExprInfo->base.functionId == TSDB_FUNC_TS_COMP && pQueryAttr->stableQuery) { assert(pExprInfo->base.numOfParams == 2); int16_t tagColId = (int16_t)pExprInfo->base.param[1].i64; diff --git a/src/util/src/tcompare.c b/src/util/src/tcompare.c index 59727d0584c4fd751bd81282a4bab07c8d848e9d..29178ef6d44b94d976662b5f00489cb1f9c20947 100644 --- a/src/util/src/tcompare.c +++ b/src/util/src/tcompare.c @@ -488,7 +488,8 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { break; } - case TSDB_DATA_TYPE_NCHAR: { + case TSDB_DATA_TYPE_NCHAR: + case TSDB_DATA_TYPE_JSON:{ if (optr == TSDB_RELATION_MATCH) { comparFn = compareStrRegexCompMatch; } else if (optr == TSDB_RELATION_NMATCH) {