add error
This commit is contained in:
parent
b8e63fa5f4
commit
9f0d6eddae
|
@ -1907,8 +1907,12 @@ SNode* createAlterTableAddModifyColOptions2(SAstCreateContext* pCxt, SNode* pRea
|
|||
COPY_STRING_FORM_ID_TOKEN(pStmt->colName, pColName);
|
||||
pStmt->dataType = dataType;
|
||||
|
||||
// if pOptions is NULL, it means that the column has no options
|
||||
if (pOptions != NULL) {
|
||||
pStmt->alterType = TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION;
|
||||
SColumnOptions* pOption = (SColumnOptions*)pOptions;
|
||||
if (strlen(pOption->compress) != 0 || strlen(pOption->compressLevel) || strlen(pOption->encode) != 0) {
|
||||
pStmt->alterType = TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION;
|
||||
}
|
||||
}
|
||||
pStmt->pColOptions = (SColumnOptions*)pOptions;
|
||||
return createAlterTableStmtFinalize(pRealTable, pStmt);
|
||||
|
|
Loading…
Reference in New Issue