Skip to content

Commit

Permalink
add filter test
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangXingBo committed May 17, 2021
1 parent 01cc8a6 commit 9fcb800
Show file tree
Hide file tree
Showing 2 changed files with 448 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,21 @@ public void testPythonTableFunction() {
+ "LEFT JOIN LATERAL TABLE(TableFunc(a * a, pyFunc(a, b))) AS T(x, y) ON TRUE";
util.verifyJsonPlan(sqlQuery);
}

@Test
public void testJoinWithFilter() {
String sinkTableDdl =
"CREATE TABLE MySink (\n"
+ " a int,\n"
+ " b int\n"
+ ") with (\n"
+ " 'connector' = 'values',\n"
+ " 'table-sink-class' = 'DEFAULT')";
tEnv.executeSql(sinkTableDdl);

String sqlQuery =
"INSERT INTO MySink SELECT x, y FROM MyTable, "
+ "LATERAL TABLE(TableFunc(a * a, pyFunc(a, b))) AS T(x, y) WHERE x = a and y + 1 = y * y";
util.verifyJsonPlan(sqlQuery);
}
}
Loading

0 comments on commit 9fcb800

Please sign in to comment.