add error

This commit is contained in:
Yihao Deng 2024-05-31 11:38:55 +00:00
parent 69e402d547
commit ac2d9ab276
1 changed files with 4 additions and 4 deletions

View File

@ -1911,13 +1911,13 @@ SNode* createAlterTableAddModifyColOptions2(SAstCreateContext* pCxt, SNode* pRea
if (pOptions != NULL) {
SColumnOptions* pOption = (SColumnOptions*)pOptions;
if (pOption->bPrimaryKey == false || pOption->commentNull == true) {
if (pOption->bPrimaryKey == false && pOption->commentNull == true) {
if (strlen(pOption->compress) != 0 || strlen(pOption->compressLevel) || strlen(pOption->encode) != 0) {
pStmt->alterType = TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION;
} else {
pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
"not support alter column with option except compress");
return NULL;
// pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
// "not support alter column with option except compress");
// return NULL;
}
} else {
pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,