jackwener commented on a change in pull request #7487:
URL: https://github.com/apache/incubator-doris/pull/7487#discussion_r775215625



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ShowProcStmt.java
##########
@@ -46,14 +46,9 @@ public ProcNodeInterface getNode() {
     @Override
     public void analyze(Analyzer analyzer) throws AnalysisException {
         if 
(!Catalog.getCurrentCatalog().getAuth().checkGlobalPriv(ConnectContext.get(), 
PrivPredicate.ADMIN)) {
-            
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
-                                                "ADMIN");
+            
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, 
"ADMIN");
         }
-
         node = ProcService.getInstance().open(path);
-        if (node == null) {
-            ErrorReport.reportAnalysisException(ErrorCode.ERR_WRONG_PROC_PATH, 
path);
-        }
     }
 
     @Override

Review comment:
       Could you replace code line 56-58 by the way, it includes redundant code.
   ```java
   StringBuilder sb = new StringBuilder();
           sb.append("SHOW PROC '").append(path).append("'");
           return sb.toString();
   ```
   with 
   
   ```java
           return "SHOW PROC '" + path + "'";
   ```




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to