chore: code optimization
This commit is contained in:
parent
40205541a6
commit
0d26c186f0
|
@ -6949,11 +6949,10 @@ static int32_t translateCreateNormalIndex(STranslateContext* pCxt, SCreateIndexS
|
||||||
|
|
||||||
SNode* pNode = NULL;
|
SNode* pNode = NULL;
|
||||||
FOREACH(pNode, pStmt->pCols) {
|
FOREACH(pNode, pStmt->pCols) {
|
||||||
SColumnNode* p = (SColumnNode*)pNode;
|
const SSchema* pSchema = getTagSchema(pMeta, ((SColumnNode*)pNode)->colName);
|
||||||
const SSchema* pSchema = getTagSchema(pMeta, p->colName);
|
|
||||||
if (!pSchema) {
|
if (!pSchema) {
|
||||||
taosMemoryFree(pMeta);
|
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)) {
|
if (IS_IDX_ON(pSchema)) {
|
||||||
code = TSDB_CODE_MND_TAG_INDEX_ALREADY_EXIST;
|
code = TSDB_CODE_MND_TAG_INDEX_ALREADY_EXIST;
|
||||||
|
|
Loading…
Reference in New Issue