This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 122509487337659f5b9085a8207064c5a89ae58d 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 a78528fdec..75e62afbad 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 @@ -244,6 +244,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]
