MartijnVisser commented on code in PR #26817:
URL: https://github.com/apache/flink/pull/26817#discussion_r4782461748


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/table/AsyncCorrelateITCase.java:
##########
@@ -269,6 +271,35 @@ public void testRetries() {
                 .hasRootCauseMessage("Error 9");
     }
 
+    @Test
+    public void testGroupBy() {
+        Table t1 = tEnv.fromValues(row(1, 1), row(2, 4), row(1, 2)).as("f1", 
"f2");
+        tEnv.createTemporaryView("t1", t1);
+        tEnv.createTemporarySystemFunction("func", new Add10TableFunction(-1));
+        final List<Row> results =
+                executeSql(
+                        "select f1, res FROM (SELECT f1, SUM(f2) as thesum 
FROM t1 group by f1), LATERAL TABLE(func(thesum)) t(res)");
+        final List<Row> expectedRows =
+                Arrays.asList(
+                        Row.of(1, 11),
+                        Row.of(2, 14),
+                        Row.ofKind(RowKind.UPDATE_BEFORE, 1, 11),
+                        Row.ofKind(RowKind.UPDATE_AFTER, 1, 13));
+        assertThat(results).containsSequence(expectedRows);
+    }
+
+    @Test
+    public void testLeftJoin() {
+        Table t1 = tEnv.fromValues(row(1), row(2), row(1)).as("f1");
+        tEnv.createTemporaryView("t1", t1);
+        tEnv.createTemporarySystemFunction("func", new Add10TableFunction(1));
+        final List<Row> results =
+                executeSql("select * FROM t1 LEFT OUTER JOIN LATERAL 
TABLE(func(f1)) ON TRUE");

Review Comment:
   On master the `TABLE(...)` wrapper is optional, `LEFT JOIN LATERAL func(f1) 
ON TRUE` reads closer to the docs.



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

Reply via email to