morningman commented on a change in pull request #3150: Support non-correlated 
subquery in having clause
URL: https://github.com/apache/incubator-doris/pull/3150#discussion_r396197288
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/StmtRewriter.java
 ##########
 @@ -43,47 +45,52 @@
      * Rewrite the statement of an analysis result. The unanalyzed rewritten
      * statement is returned.
      */
-    public static void rewrite(Analyzer analyzer, StatementBase parsedStmt)
+    public static StatementBase rewrite(Analyzer analyzer, StatementBase 
parsedStmt)
             throws AnalysisException {
         if (parsedStmt instanceof QueryStmt) {
             QueryStmt analyzedStmt = (QueryStmt) parsedStmt;
             Preconditions.checkNotNull(analyzedStmt.analyzer);
-            rewriteQueryStatement(analyzedStmt, analyzer);
+            parsedStmt = rewriteQueryStatement(analyzedStmt, analyzer);
 
 Review comment:
   Better to use a new local variable and return it. Not to return a 
`parameter` variable.
   And I think you can just return here.
   
   ```
   return rewriteQueryStatement(analyzedStmt, analyzer);
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to