[Fix] (schema change) forbid adding time type column (#28751)

This commit is contained in:
Luwei
2023-12-21 10:27:50 +08:00
committed by GitHub
parent e4a58b7407
commit 5bf77c8f74
2 changed files with 59 additions and 0 deletions

View File

@ -951,6 +951,10 @@ public class SchemaChangeHandler extends AlterHandler {
}
}
if (newColumn.getType().isTime() || newColumn.getType().isTimeV2()) {
throw new DdlException("Time type is not supported for olap table");
}
// hll must be used in agg_keys
if (newColumn.getType().isHllType() && KeysType.AGG_KEYS != olapTable.getKeysType()) {
throw new DdlException("HLL type column can only be in Aggregation data model table: " + newColName);