xy720 commented on a change in pull request #6466:
URL: https://github.com/apache/incubator-doris/pull/6466#discussion_r716055451



##########
File path: fe/fe-core/src/test/java/org/apache/doris/planner/PlannerTest.java
##########
@@ -338,4 +344,28 @@ public void testAccessingVisibleColumnWithoutPartition() 
throws Exception {
         Assert.assertNotNull(stmtExecutor.planner());
     }
 
+    @Test
+    public void testAnalyticLeftJoin() throws Exception {
+        String sql = "SELECT a.k1, a.k3, SUM(COUNT(t.k2)) OVER (PARTITION BY 
a.k3 ORDER BY a.k1) AS c\n" +
+                "FROM ( SELECT k1, k3 FROM db1.tbl3) a\n" +
+                "LEFT JOIN (SELECT 1 AS line, k1, k2, k3 FROM db1.tbl3) t\n" +
+                "ON t.k1 = a.k1 AND t.k3 = a.k3\n" +
+                "GROUP BY a.k1, a.k3";
+        StmtExecutor stmtExecutor = new StmtExecutor(ctx, sql);
+        stmtExecutor.execute();
+        Assert.assertNotNull(stmtExecutor.planner());
+        Planner planner = stmtExecutor.planner();
+        List<PlanFragment> fragments = planner.getFragments();
+        Assert.assertTrue(fragments.size() > 0);
+        PlanNode node = fragments.get(0).getPlanRoot().getChild(0);
+        Assert.assertTrue(node.getChildren().size() > 0);
+        Assert.assertTrue(node instanceof SortNode);
+        SortNode sortNode = (SortNode) node;

Review comment:
       ok, done.




-- 
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: commits-unsubscr...@doris.apache.org

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