xy720 commented on a change in pull request #2641: CreateViewStmt/AlterViewStmt 
support cte and fix bug
URL: https://github.com/apache/incubator-doris/pull/2641#discussion_r363559114
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/CreateViewStmt.java
 ##########
 @@ -55,21 +55,17 @@ public String getComment() {
 
     @Override
     public void analyze(Analyzer analyzer) throws AnalysisException, 
UserException {
-        if (cols != null) {
-            cloneStmt = viewDefStmt.clone();
-        }
         tableName.analyze(analyzer);
         viewDefStmt.setNeedToSql(true);
-        // Analyze view define statement
-        Analyzer viewAnalyzer = new Analyzer(analyzer);
-        viewDefStmt.analyze(viewAnalyzer);
 
         // check privilege
         if 
(!Catalog.getCurrentCatalog().getAuth().checkTblPriv(ConnectContext.get(), 
tableName.getDb(),
                                                                 
tableName.getTbl(), PrivPredicate.CREATE)) {
             
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, 
"CREATE");
         }
 
+        // Analyze view define statement
+        viewDefStmt.analyze(analyzer);
 
 Review comment:
   fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to