This is an automated email from the ASF dual-hosted git repository.

MartijnVisser pushed a commit to branch release-2.3
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-2.3 by this push:
     new 5ab81a88301 [hotfix][docs] Fix temporal table function examples 
(#29717)
5ab81a88301 is described below

commit 5ab81a8830112b7f62b895081d3a0e9edc360774
Author: Martijn Visser <[email protected]>
AuthorDate: Sat Oct 31 20:15:38 2026 +0100

    [hotfix][docs] Fix temporal table function examples (#29717)
    
    createTemporalTableFunction only takes expressions since 1.16, the join
    examples referenced columns that do not exist, and the SQL example used
    the rates alias without declaring it. Fixed in both the EN and ZH pages.
    
    Co-authored-by: novakov-alexey 
<[email protected]>
    Generated-by: Claude Code (Claude Opus 5.5)
    (cherry picked from commit cd4c2ab77b7109a64605dba18758f682a181bd2e)
---
 .../sql-table-concepts/temporal_table_function.md  | 22 ++++++++++++++--------
 docs/content.zh/docs/dev/table/tableApi.md         |  6 +++---
 .../sql-table-concepts/temporal_table_function.md  | 22 ++++++++++++++--------
 docs/content/docs/dev/table/tableApi.md            |  6 +++---
 4 files changed, 34 insertions(+), 22 deletions(-)

diff --git 
a/docs/content.zh/docs/concepts/sql-table-concepts/temporal_table_function.md 
b/docs/content.zh/docs/concepts/sql-table-concepts/temporal_table_function.md
index c0ef280ff06..727aa5e08e8 100644
--- 
a/docs/content.zh/docs/concepts/sql-table-concepts/temporal_table_function.md
+++ 
b/docs/content.zh/docs/concepts/sql-table-concepts/temporal_table_function.md
@@ -62,16 +62,16 @@ the versioning time attribute.
 ```java
 TemporalTableFunction rates = tEnv
     .from("currency_rates")
-    .createTemporalTableFunction("update_time", "currency");
+    .createTemporalTableFunction($("update_time"), $("currency"));
  
 tEnv.createTemporarySystemFunction("rates", rates);                            
                               
 ```
 {{< /tab >}}
 {{< tab "Scala" >}}
 ```scala
-rates = tEnv
+val rates = tEnv
     .from("currency_rates")
-    .createTemporalTableFunction("update_time", "currency")
+    .createTemporalTableFunction($"update_time", $"currency")
  
 tEnv.createTemporarySystemFunction("rates", rates);                            
                               
 ```
@@ -112,23 +112,29 @@ SELECT
   SUM(amount * rate) AS amount
 FROM
   orders,
-  LATERAL TABLE (rates(order_time))
+  LATERAL TABLE (rates(order_time)) AS rates
 WHERE
   rates.currency = orders.currency
 ```
 {{< /tab >}}
 {{< tab "Java" >}}
 ```java
+Table orders = tEnv.from("orders");
 Table result = orders
-    .joinLateral(call("rates", $("o_proctime")), 
$("o_currency").isEqual($("r_currency")))
-    .select($("(o_amount").times($("r_rate")).sum().as("amount"));
+    .joinLateral(
+        call("rates", $("order_time")).as("r_update_time", "r_currency", 
"r_rate"),
+        $("currency").isEqual($("r_currency")))
+    .select($("amount").times($("r_rate")).sum().as("amount"));
 ```
 {{< /tab >}}
 {{< tab "Scala" >}}
 ```scala
+val orders = tEnv.from("orders")
 val result = orders
-    .joinLateral($"rates(order_time)", $"orders.currency = rates.currency")
-    .select($"(o_amount * r_rate).sum as amount"))
+    .joinLateral(
+        call("rates", $"order_time").as("r_update_time", "r_currency", 
"r_rate"),
+        $"currency" === $"r_currency")
+    .select(($"amount" * $"r_rate").sum as "amount")
 ```
 {{< /tab >}}
 {{< tab "Python" >}}
diff --git a/docs/content.zh/docs/dev/table/tableApi.md 
b/docs/content.zh/docs/dev/table/tableApi.md
index 2ed8f2e395b..8bfff8c6275 100644
--- a/docs/content.zh/docs/dev/table/tableApi.md
+++ b/docs/content.zh/docs/dev/table/tableApi.md
@@ -1124,8 +1124,8 @@ Table ratesHistory = tableEnv.from("RatesHistory");
 
 // 注册带有时间属性和主键的 temporal table function
 TemporalTableFunction rates = ratesHistory.createTemporalTableFunction(
-    "r_proctime",
-    "r_currency");
+    $("r_proctime"),
+    $("r_currency"));
 tableEnv.createTemporarySystemFunction("rates", rates);
 
 // 基于时间属性和键与“Orders”表关联
@@ -1144,7 +1144,7 @@ val rates = 
ratesHistory.createTemporalTableFunction($"r_proctime", $"r_currency
 // 基于时间属性和键与“Orders”表关联
 val orders = tableEnv.from("Orders")
 val result = orders
-    .joinLateral(rates($"o_rowtime"), $"r_currency" === $"o_currency")
+    .joinLateral(rates($"o_proctime"), $"r_currency" === $"o_currency")
 ```
 {{< /tab >}}
 {{< tab "Python" >}}
diff --git 
a/docs/content/docs/concepts/sql-table-concepts/temporal_table_function.md 
b/docs/content/docs/concepts/sql-table-concepts/temporal_table_function.md
index 90ae717f988..a46469c5678 100644
--- a/docs/content/docs/concepts/sql-table-concepts/temporal_table_function.md
+++ b/docs/content/docs/concepts/sql-table-concepts/temporal_table_function.md
@@ -62,16 +62,16 @@ the versioning time attribute.
 ```java
 TemporalTableFunction rates = tEnv
     .from("currency_rates")
-    .createTemporalTableFunction("update_time", "currency");
+    .createTemporalTableFunction($("update_time"), $("currency"));
  
 tEnv.createTemporarySystemFunction("rates", rates);                            
                            
 ```
 {{< /tab >}}
 {{< tab "Scala" >}}
 ```scala
-rates = tEnv
+val rates = tEnv
     .from("currency_rates")
-    .createTemporalTableFunction("update_time", "currency")
+    .createTemporalTableFunction($"update_time", $"currency")
  
 tEnv.createTemporarySystemFunction("rates", rates)
 ```
@@ -112,23 +112,29 @@ SELECT
   SUM(amount * rate) AS amount
 FROM
   orders,
-  LATERAL TABLE (rates(order_time))
+  LATERAL TABLE (rates(order_time)) AS rates
 WHERE
   rates.currency = orders.currency
 ```
 {{< /tab >}}
 {{< tab "Java" >}}
 ```java
+Table orders = tEnv.from("orders");
 Table result = orders
-    .joinLateral(call("rates", $("o_proctime")), 
$("o_currency").isEqual($("r_currency")))
-    .select($("(o_amount").times($("r_rate")).sum().as("amount"));
+    .joinLateral(
+        call("rates", $("order_time")).as("r_update_time", "r_currency", 
"r_rate"),
+        $("currency").isEqual($("r_currency")))
+    .select($("amount").times($("r_rate")).sum().as("amount"));
 ```
 {{< /tab >}}
 {{< tab "Scala" >}}
 ```scala
+val orders = tEnv.from("orders")
 val result = orders
-    .joinLateral($"rates(order_time)", $"orders.currency = rates.currency")
-    .select($"(o_amount * r_rate).sum as amount"))
+    .joinLateral(
+        call("rates", $"order_time").as("r_update_time", "r_currency", 
"r_rate"),
+        $"currency" === $"r_currency")
+    .select(($"amount" * $"r_rate").sum as "amount")
 ```
 {{< /tab >}}
 {{< tab "Python" >}}
diff --git a/docs/content/docs/dev/table/tableApi.md 
b/docs/content/docs/dev/table/tableApi.md
index 118befaaadd..7310b3a0672 100644
--- a/docs/content/docs/dev/table/tableApi.md
+++ b/docs/content/docs/dev/table/tableApi.md
@@ -1123,8 +1123,8 @@ Table ratesHistory = tableEnv.from("RatesHistory");
 
 // register temporal table function with a time attribute and primary key
 TemporalTableFunction rates = ratesHistory.createTemporalTableFunction(
-    "r_proctime",
-    "r_currency");
+    $("r_proctime"),
+    $("r_currency"));
 tableEnv.createTemporarySystemFunction("rates", rates);
 
 // join with "Orders" based on the time attribute and key
@@ -1143,7 +1143,7 @@ val rates = 
ratesHistory.createTemporalTableFunction($"r_proctime", $"r_currency
 // join with "Orders" based on the time attribute and key
 val orders = tableEnv.from("Orders")
 val result = orders
-    .joinLateral(rates($"o_rowtime"), $"r_currency" === $"o_currency")
+    .joinLateral(rates($"o_proctime"), $"r_currency" === $"o_currency")
 ```
 {{< /tab >}}
 {{< tab "Python" >}}

Reply via email to