fix: a problem of parser async
This commit is contained in:
parent
8a00b3ab86
commit
ac0c75ab2d
|
@ -110,7 +110,8 @@ static EDealRes collectMetaKeyFromFunction(SCollectMetaKeyFromExprCxt* pCxt, SFu
|
||||||
if (fmIsBuiltinFunc(pFunc->functionName)) {
|
if (fmIsBuiltinFunc(pFunc->functionName)) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
return reserveUdfInCache(pFunc->functionName, pCxt->pComCxt->pMetaCache);
|
pCxt->errCode = reserveUdfInCache(pFunc->functionName, pCxt->pComCxt->pMetaCache);
|
||||||
|
return TSDB_CODE_SUCCESS == pCxt->errCode ? DEAL_RES_CONTINUE : DEAL_RES_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, SRealTableNode* pRealTable,
|
static int32_t collectMetaKeyFromRealTableImpl(SCollectMetaKeyCxt* pCxt, SRealTableNode* pRealTable,
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SSchema* pSchema, uint
|
||||||
}
|
}
|
||||||
|
|
||||||
SSchema* pTagSchema = &pSchema[pCxt->tags.boundColumns[i]];
|
SSchema* pTagSchema = &pSchema[pCxt->tags.boundColumns[i]];
|
||||||
char* tmpTokenBuf = taosMemoryCalloc(1, sToken.n); //todo this can be optimize with parse column
|
char* tmpTokenBuf = taosMemoryCalloc(1, sToken.n); // todo this can be optimize with parse column
|
||||||
code = checkAndTrimValue(&sToken, tmpTokenBuf, &pCxt->msg);
|
code = checkAndTrimValue(&sToken, tmpTokenBuf, &pCxt->msg);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
taosMemoryFree(tmpTokenBuf);
|
taosMemoryFree(tmpTokenBuf);
|
||||||
|
@ -1018,7 +1018,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SSchema* pSchema, uint
|
||||||
taosMemoryFree(tmpTokenBuf);
|
taosMemoryFree(tmpTokenBuf);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if(isNullStr(&sToken)) {
|
if (isNullStr(&sToken)) {
|
||||||
code = tTagNew(pTagVals, 1, true, &pTag);
|
code = tTagNew(pTagVals, 1, true, &pTag);
|
||||||
} else {
|
} else {
|
||||||
code = parseJsontoTagData(sToken.z, pTagVals, &pTag, &pCxt->msg);
|
code = parseJsontoTagData(sToken.z, pTagVals, &pTag, &pCxt->msg);
|
||||||
|
@ -1530,10 +1530,13 @@ typedef struct SInsertParseSyntaxCxt {
|
||||||
} SInsertParseSyntaxCxt;
|
} SInsertParseSyntaxCxt;
|
||||||
|
|
||||||
static int32_t skipParentheses(SInsertParseSyntaxCxt* pCxt) {
|
static int32_t skipParentheses(SInsertParseSyntaxCxt* pCxt) {
|
||||||
SToken sToken;
|
SToken sToken;
|
||||||
|
int32_t expectRightParenthesis = 1;
|
||||||
while (1) {
|
while (1) {
|
||||||
NEXT_TOKEN(pCxt->pSql, sToken);
|
NEXT_TOKEN(pCxt->pSql, sToken);
|
||||||
if (TK_NK_RP == sToken.type) {
|
if (TK_NK_LP == sToken.type) {
|
||||||
|
++expectRightParenthesis;
|
||||||
|
} else if (TK_NK_RP == sToken.type && 0 == --expectRightParenthesis) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (0 == sToken.n) {
|
if (0 == sToken.n) {
|
||||||
|
|
Loading…
Reference in New Issue