YuvalItzchakov commented on a change in pull request #17845: URL: https://github.com/apache/flink/pull/17845#discussion_r754823553
########## File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/join/LookupJoinTest.scala ########## @@ -525,7 +525,21 @@ class LookupJoinTest(legacyTableSource: Boolean) extends TableTestBase with Seri verifyTranslationSuccess(sql) } - // ========================================================================================== + @Test + def testJoinTemporalTableWithCTE(): Unit = { + val sql = + """ + |WITH MyLookupTable AS (SELECT * FROM MyTable), + |OtherLookupTable AS (SELECT * FROM LookupTable) + |SELECT MyLookupTable.b FROM MyLookupTable + |JOIN OtherLookupTable FOR SYSTEM_TIME AS OF MyLookupTable.proctime AS D + |ON MyLookupTable.a = D.id AND D.age = 10 + """.stripMargin + + verifyTranslationSuccess(sql) Review comment: @tsreaper I can add an additional test that verifies to exec plan, as it was similar before and after my change (I originally tried using it in my test, but the `NullPointerException` did not reproduce using it). -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org