[Log](Alter) Print table's state when checkNormalStateForAlter() failed (#23358)

This commit is contained in:
bobhan1
2023-08-28 17:04:01 +08:00
committed by GitHub
parent 650cc25ea4
commit 2dff89a77a
2 changed files with 3 additions and 2 deletions

View File

@ -1548,7 +1548,8 @@ public class OlapTable extends Table {
public void checkNormalStateForAlter() throws DdlException {
if (state != OlapTableState.NORMAL) {
throw new DdlException("Table[" + name + "]'s state is not NORMAL. Do not allow doing ALTER ops");
throw new DdlException("Table[" + name + "]'s state(" + state.toString()
+ ") is not NORMAL. Do not allow doing ALTER ops");
}
}

View File

@ -35,7 +35,7 @@ suite("test_alter_table_status") {
// try alter table comment
test {
sql """ ALTER TABLE ${tbName1} MODIFY COMMENT 'test'; """
exception "Table[${tbName1}]'s state is not NORMAL. Do not allow doing ALTER ops"
exception "Table[alter_table_status]'s state(ROLLUP) is not NORMAL. Do not allow doing ALTER ops"
}
// set table state to NORMAL