fix: code optimization

This commit is contained in:
kailixu 2024-01-02 00:28:30 +08:00
parent 0d26c186f0
commit ecf3a7b6d3
1 changed files with 2 additions and 2 deletions

View File

@ -6939,12 +6939,12 @@ static int32_t translateCreateNormalIndex(STranslateContext* pCxt, SCreateIndexS
}
if (TSDB_SUPER_TABLE != pMeta->tableType) {
taosMemoryFree(pMeta);
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, "Only supertable table can be used");
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, "Only super table is allowed");
}
if (LIST_LENGTH(pStmt->pCols) != 1) {
taosMemoryFree(pMeta);
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_NUM, "Only 1 tag is allowed");
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAGS_NUM, "Only one tag is allowed");
}
SNode* pNode = NULL;