Details
-
Technical Debt
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.16.1
Description
In the java documentation for the Temporal Table Function, there are two issues with the APIs as-is.
- Defining the temporal table calls `tEnv.registerFunction` which is a deprecated API since v1.11, favoring `createTemporarySystemFunction` instead.
- In the Temporal Table Function Join syntax, calling `joinLateral($("rates(order_time)")` elicits the following error:
Cannot resolve field [rates(order_time)]
For point 1, I am proposing we replace `tEnv.registerFunction()` with `tEnv.createTemporarySystemFunction`.
For point 2, I am proposing we replace:
Table result = orders.joinLateral($("rates(order_time)"), $("orders.currency = rates.currency")).select($("(o_amount * r_rate).sum as amount"));
with
Table result = orders.joinLateral(call("rates", $("o_proctime")), $("o_currency").isEqual($("r_currency"))).select($("(o_amount").times($("r_rate")).sum().as("amount"));
Sources for corrections:
- https://nightlies.apache.org/flink/flink-docs-release-1.11/api/java/org/apache/flink/table/api/TableEnvironment.html#registerFunction-java.lang.String-org.apache.flink.table.functions.ScalarFunction-
- https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/tableapi/#join-with-temporal-table{}
Attachments
Issue Links
- links to