This is an automated email from the ASF dual-hosted git repository.

panxiaolei 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 ec7b1790f9 [Improvement](ddl) make create table with mv column name 
report error msg more readable (#24349)
ec7b1790f9 is described below

commit ec7b1790f98cff0a54a2eb8c290b81887353c520
Author: Pxl <[email protected]>
AuthorDate: Thu Sep 14 14:18:49 2023 +0800

    [Improvement](ddl) make create table with mv column name report error msg 
more readable (#24349)
    
    make create table with mv column name report error msg more readable
---
 .../src/main/java/org/apache/doris/common/FeNameFormat.java   | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/FeNameFormat.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/FeNameFormat.java
index 970344f8e6..f108dd782d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/FeNameFormat.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/FeNameFormat.java
@@ -87,13 +87,10 @@ public class FeNameFormat {
             
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_COLUMN_NAME,
                     columnName, getColumnNameRegex());
         }
-        if 
(columnName.startsWith(CreateMaterializedViewStmt.MATERIALIZED_VIEW_NAME_PREFIX))
 {
-            
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_COLUMN_NAME,
-                    columnName, FeNameFormat.COLUMN_NAME_REGEX);
-        }
-        if 
(columnName.startsWith(CreateMaterializedViewStmt.MATERIALIZED_VIEW_AGGREGATE_NAME_PREFIX))
 {
-            
ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_COLUMN_NAME,
-                    columnName, FeNameFormat.COLUMN_NAME_REGEX);
+        if 
(columnName.startsWith(CreateMaterializedViewStmt.MATERIALIZED_VIEW_NAME_PREFIX)
+                || 
columnName.startsWith(CreateMaterializedViewStmt.MATERIALIZED_VIEW_AGGREGATE_NAME_PREFIX))
 {
+            throw new AnalysisException(
+                    "Incorrect column name " + columnName + ", column name 
can't start with 'mv_'/'mva_'");
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to