[Enhance] Modify the error message when mv column is transformed from base column in agg family table (#5084)
When user wants to create materialized view with a mv column which is transformed from original column in agg family table, Doris will throw a new error message "The mv column of agg or uniq table cannot be transformed from original column" instead of "column not exists".
This commit is contained in:
@ -444,6 +444,10 @@ public class MaterializedViewHandler extends AlterHandler {
|
||||
if (mvColumnItem.isKey()) {
|
||||
++numOfKeys;
|
||||
}
|
||||
if (baseColumn == null) {
|
||||
throw new DdlException("The mv column of agg or uniq table cannot be transformed "
|
||||
+ "from original column[" + mvColumnItem.getBaseColumnName() + "]");
|
||||
}
|
||||
Preconditions.checkNotNull(baseColumn, "Column[" + mvColumnName + "] does not exist");
|
||||
AggregateType baseAggregationType = baseColumn.getAggregationType();
|
||||
AggregateType mvAggregationType = mvColumnItem.getAggregationType();
|
||||
|
||||
Reference in New Issue
Block a user