chore: code optimization

This commit is contained in:
kailixu 2024-01-02 00:23:19 +08:00
parent 40205541a6
commit 0d26c186f0
1 changed files with 2 additions and 3 deletions

View File

@ -6949,11 +6949,10 @@ static int32_t translateCreateNormalIndex(STranslateContext* pCxt, SCreateIndexS
SNode* pNode = NULL;
FOREACH(pNode, pStmt->pCols) {
SColumnNode* p = (SColumnNode*)pNode;
const SSchema* pSchema = getTagSchema(pMeta, p->colName);
const SSchema* pSchema = getTagSchema(pMeta, ((SColumnNode*)pNode)->colName);
if (!pSchema) {
taosMemoryFree(pMeta);
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, p->colName);
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, ((SColumnNode*)pNode)->colName);
}
if (IS_IDX_ON(pSchema)) {
code = TSDB_CODE_MND_TAG_INDEX_ALREADY_EXIST;