From 06d9a74bcc9ec456f2a8bd8fa03c21443e81e78f Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 13 Apr 2023 19:38:47 +0800 Subject: [PATCH] fix: optimizing 'alter table drop tag' error reporting --- source/libs/parser/src/parTranslater.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 41ae0cef25..1c731144dc 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5178,7 +5178,7 @@ static int32_t checkAlterSuperTableBySchema(STranslateContext* pCxt, SAlterTable } if ((TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES == pStmt->alterType || - TSDB_ALTER_TABLE_DROP_COLUMN == pStmt->alterType) && + TSDB_ALTER_TABLE_UPDATE_TAG_BYTES == pStmt->alterType) && (!IS_VAR_DATA_TYPE(pSchema->type) || pSchema->type != pStmt->dataType.type || pSchema->bytes >= calcTypeBytes(pStmt->dataType))) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_MODIFY_COL);