diff --git a/fe/src/main/java/org/apache/doris/catalog/Column.java b/fe/src/main/java/org/apache/doris/catalog/Column.java index 6e076c3734..7ff5466441 100644 --- a/fe/src/main/java/org/apache/doris/catalog/Column.java +++ b/fe/src/main/java/org/apache/doris/catalog/Column.java @@ -260,6 +260,10 @@ public class Column implements Writable { } } + if (getDataType() == PrimitiveType.DATETIME && other.getDataType() == PrimitiveType.DATE) { + throw new DdlException("Cannot change from DATETIME to DATE"); + } + if (this.getPrecision() != other.getPrecision()) { throw new DdlException("Cannot change precision"); }