wangbo commented on a change in pull request #3396:
URL: https://github.com/apache/incubator-doris/pull/3396#discussion_r417758359



##########
File path: fe/src/test/java/org/apache/doris/planner/QueryPlanTest.java
##########
@@ -504,4 +504,106 @@ public void testDateTypeEquality() throws Exception {
         
Catalog.getCurrentCatalog().getLoadManager().createLoadJobV1FromStmt(loadStmt, 
EtlJobType.HADOOP,
                 System.currentTimeMillis());
     }
+
+    private SelectStmt getAnalyzedAndRewritedStmt(String sql) throws Exception 
{
+        SelectStmt selectStmt =
+                (SelectStmt) UtFrameUtils.parseAndAnalyzeStmt(sql, 
connectContext);
+        selectStmt = (SelectStmt) UtFrameUtils.rewriteStmt(selectStmt, 
connectContext);
+        selectStmt = (SelectStmt) UtFrameUtils.reAnalyze(selectStmt, 
connectContext);
+        return selectStmt;
+    }
+
+    @Test
+    public void testConvertCaseWhenToConstant() throws Exception {

Review comment:
       ```case when expr``` rewrite more complicate than ```convert  a function 
to constants```,it will change the query plan structure and dependency real 
doris table, so I think put UT in QueryPlanTest is better




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



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

Reply via email to