This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 1164611393 [enhancement](planner) fix unclear exception msg when
create mv (#17537)
1164611393 is described below
commit 116461139385c57142170ac238a15e66b3ffee61
Author: mch_ucchi <[email protected]>
AuthorDate: Sat Mar 25 11:36:40 2023 +0800
[enhancement](planner) fix unclear exception msg when create mv (#17537)
a materialized view's from clause can only be a single table and not
sub-query, but the exception msg is npe. The pr change it to a clear msg.
---
.../java/org/apache/doris/analysis/CreateMaterializedViewStmt.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
index a08480fadc..27545496c5 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
@@ -250,6 +250,10 @@ public class CreateMaterializedViewStmt extends DdlStmt {
throw new AnalysisException("The materialized view only support
one table in from clause.");
}
TableName tableName = tableRefList.get(0).getName();
+ if (tableName == null) {
+ throw new AnalysisException("table in from clause is invalid,
please check if it's single table "
+ + "and not sub-query");
+ }
baseIndexName = tableName.getTbl();
dbName = tableName.getDb();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]