jnh5y commented on code in PR #24253:
URL: https://github.com/apache/flink/pull/24253#discussion_r1481662098


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/TemporalJoinTestPrograms.java:
##########
@@ -84,6 +130,36 @@ public class TemporalJoinTestPrograms {
                                     + "ON o.currency = r.currency ")
                     .build();
 
+    static final TableTestProgram TEMPORAL_JOIN_TABLE_JOIN_NESTED_KEY =
+            TableTestProgram.of(
+                            "temporal-join-table-join-nested-key",
+                            "validates temporal join with a table when the 
join keys comes from a nested row")
+                    .setupTableSource(ORDERS_WITH_NESTED_ID)
+                    .setupTableSource(RATES)
+                    .setupTableSink(AMOUNTS)
+                    .runSql(
+                            "INSERT INTO MySink "
+                                    + "SELECT amount * r.rate "
+                                    + "FROM OrdersNestedId AS o "
+                                    + "JOIN RatesHistory FOR SYSTEM_TIME AS OF 
o.rowtime AS r "
+                                    + "ON o.nested_row.currency = r.currency ")
+                    .build();
+
+    static final TableTestProgram TEMPORAL_JOIN_TABLE_JOIN_KEY_FROM_MAP =
+            TableTestProgram.of(
+                            "temporal-join-table-join-key-from-map",
+                            "validates temporal join with a table when the 
join key comes from a map value")
+                    .setupTableSource(ORDERS_WITH_NESTED_ID)
+                    .setupTableSource(RATES)
+                    .setupTableSink(AMOUNTS)
+                    .runSql(
+                            "INSERT INTO MySink "
+                                    + "SELECT amount * r.rate "
+                                    + "FROM OrdersNestedId AS o "
+                                    + "JOIN RatesHistory FOR SYSTEM_TIME AS OF 
o.rowtime AS r "
+                                    + "ON o.nested_map['currency'] = 
r.currency ")

Review Comment:
   Tests are added for covering what happens with the left-hand side of the 
join.  
   
   Do we need to verify anything for the right-hand side and/or both sides?
   
   Also, can join on the output of a function call?  (E.g., `ON 
UPPERCASE(o.nested_map['currency']) = r.currency`?)



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

Reply via email to