godfreyhe commented on a change in pull request #8868:
[FLINK-12972][table-planner-blink] Ensure calling open/close in join condition
of generated functions for blink
URL: https://github.com/apache/flink/pull/8868#discussion_r297452220
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/runtime/stream/sql/JoinITCase.scala
##########
@@ -1106,4 +1108,23 @@ class JoinITCase(state: StateBackendMode) extends
StreamingWithStateTestBase(sta
val expected = List("500")
assertEquals(expected.sorted, sink.getRetractResults.sorted)
}
+
+ @Test
+ def testJoinWithUDFFilter(): Unit = {
+ val ds1 = failingDataSource(TestData.smallTupleData3).toTable(tEnv, 'a,
'b, 'c)
+ val ds2 = failingDataSource(TestData.tupleData5).toTable(tEnv, 'd, 'e, 'f,
'g, 'h)
+
+ tEnv.registerTable("T3", ds1)
+ tEnv.registerTable("T5", ds2)
+ tEnv.registerFunction("funcWithOpen", new FuncWithOpen)
+
+ val sql = "SELECT c, g FROM T3 join T5 on funcWithOpen(a + d) where b = e"
Review comment:
@KurtYoung , `a` is from join left side (`T3`), while `d` is from join right
side (`T5`). `funcWithOpen(a + d)` could not be pushed into left side or right
side as a `Project`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services