You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/12/16 16:33:38 UTC
[incubator-doris] branch master updated: [Enhance] Modify the error
message when mv column is transformed from base column in agg family table
(#5084)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 9864a5d [Enhance] Modify the error message when mv column is transformed from base column in agg family table (#5084)
9864a5d is described below
commit 9864a5d818396e7a026f8cd8201878749cb6a4e3
Author: EmmyMiao87 <52...@qq.com>
AuthorDate: Thu Dec 17 00:33:27 2020 +0800
[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".
---
.../src/main/java/org/apache/doris/alter/MaterializedViewHandler.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java b/fe/fe-core/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java
index 1e0c14f..917e800 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/MaterializedViewHandler.java
@@ -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();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org