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

fhueske pushed a commit to branch 
fhueske-FLINK-39780-Make-TABLE-keyword-optional-in-LATERAL-context
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 4302ee3ed2778e9a7de3e357bc626d448cc82a81
Author: Fabian Hueske <[email protected]>
AuthorDate: Fri May 29 10:20:04 2026 +0200

    [FLINK-39780][docs] Adjust documentation to implicit LATERAL table function 
calls
---
 .../sql-table-concepts/temporal_table_function.md        |  2 +-
 docs/content.zh/docs/dev/table/functions/udfs.md         | 16 ++++++++--------
 docs/content.zh/docs/sql/reference/queries/joins.md      |  8 ++++----
 docs/content.zh/docs/sql/reference/queries/overview.md   |  3 ++-
 .../docs/sql/reference/queries/vector-search.md          | 16 ++++++++--------
 .../sql-table-concepts/temporal_table_function.md        |  2 +-
 docs/content/docs/dev/table/functions/udfs.md            | 16 ++++++++--------
 docs/content/docs/sql/reference/queries/joins.md         |  8 ++++----
 docs/content/docs/sql/reference/queries/overview.md      |  3 ++-
 docs/content/docs/sql/reference/queries/vector-search.md | 16 ++++++++--------
 10 files changed, 46 insertions(+), 44 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..c4d3c405280 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
@@ -112,7 +112,7 @@ SELECT
   SUM(amount * rate) AS amount
 FROM
   orders,
-  LATERAL TABLE (rates(order_time))
+  LATERAL rates(order_time)
 WHERE
   rates.currency = orders.currency
 ```
diff --git a/docs/content.zh/docs/dev/table/functions/udfs.md 
b/docs/content.zh/docs/dev/table/functions/udfs.md
index 273bd8c57c5..79fd1ba19ff 100644
--- a/docs/content.zh/docs/dev/table/functions/udfs.md
+++ b/docs/content.zh/docs/dev/table/functions/udfs.md
@@ -1088,7 +1088,7 @@ env.sqlQuery("SELECT GetBeverageName(beverageId) FROM 
Beverages");
 
 在 Table API 中,表值函数是通过 `.joinLateral(...)` 或者 `.leftOuterJoinLateral(...)` 
来使用的。`joinLateral` 算子会把外表(算子左侧的表)的每一行跟跟表值函数返回的所有行(位于算子右侧)进行 
(cross)join。`leftOuterJoinLateral` 
算子也是把外表(算子左侧的表)的每一行跟表值函数返回的所有行(位于算子右侧)进行(cross)join,并且如果表值函数返回 0 行也会保留外表的这一行。
 
-在 SQL 里面用 `JOIN` 或者 以 `ON TRUE` 为条件的 `LEFT JOIN` 来配合 `LATERAL 
TABLE(<TableFunction>)` 的使用。
+在 SQL 里面用 `JOIN` 或者 以 `ON TRUE` 为条件的 `LEFT JOIN` 来配合 `LATERAL 
<TableFunction>(...)` 的使用(等价的写法为 `LATERAL TABLE(<TableFunction>(...))`)。
 
 下面的例子展示了如何实现一个分隔函数并在查询里调用它,详情可参考[开发指南](#开发指南):
 
@@ -1147,17 +1147,17 @@ env
 // 在 SQL 里调用注册好的函数
 env.sqlQuery(
   "SELECT myField, word, length " +
-  "FROM MyTable, LATERAL TABLE(SplitFunction(myField))");
+  "FROM MyTable, LATERAL SplitFunction(myField)");
 env.sqlQuery(
   "SELECT myField, word, length " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) ON TRUE");
+  "LEFT JOIN LATERAL SplitFunction(myField) ON TRUE");
 
 // 在 SQL 里重命名函数字段
 env.sqlQuery(
   "SELECT myField, newWord, newLength " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) AS T(newWord, newLength) ON 
TRUE");
+  "LEFT JOIN LATERAL SplitFunction(myField) AS T(newWord, newLength) ON TRUE");
 
 ```
 {{< /tab >}}
@@ -1212,17 +1212,17 @@ env
 // 在 SQL 里调用注册好的函数
 env.sqlQuery(
   "SELECT myField, word, length " +
-  "FROM MyTable, LATERAL TABLE(SplitFunction(myField))");
+  "FROM MyTable, LATERAL SplitFunction(myField)");
 env.sqlQuery(
   "SELECT myField, word, length " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) ON TRUE")
+  "LEFT JOIN LATERAL SplitFunction(myField) ON TRUE")
 
 // 在 SQL 里重命名函数字段
 env.sqlQuery(
   "SELECT myField, newWord, newLength " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) AS T(newWord, newLength) ON 
TRUE")
+  "LEFT JOIN LATERAL SplitFunction(myField) AS T(newWord, newLength) ON TRUE")
 
 ```
 {{< /tab >}}
@@ -1312,7 +1312,7 @@ env.from("MyTable")
         .select($("*"))
 
 // 在 SQL 中调用已注册的函数
-env.sqlQuery("SELECT * FROM MyTable, LATERAL 
TABLE(BackgroundFunction(myField))");
+env.sqlQuery("SELECT * FROM MyTable, LATERAL BackgroundFunction(myField)");
 
 ```
 
diff --git a/docs/content.zh/docs/sql/reference/queries/joins.md 
b/docs/content.zh/docs/sql/reference/queries/joins.md
index a97312e9100..c69a8318367 100644
--- a/docs/content.zh/docs/sql/reference/queries/joins.md
+++ b/docs/content.zh/docs/sql/reference/queries/joins.md
@@ -259,7 +259,7 @@ SELECT
   o_amount, r_rate
 FROM
   Orders,
-  LATERAL TABLE (Rates(o_proctime))
+  LATERAL Rates(o_proctime)
 WHERE
   r_currency = o_currency
 ```
@@ -285,7 +285,7 @@ SELECT
   o_amount, r_rate
 FROM
   Orders,
-  LATERAL TABLE (Rates(o_proctime))
+  LATERAL Rates(o_proctime)
 WHERE
   r_currency = o_currency
 ```
@@ -455,7 +455,7 @@ Table Function
 ```sql
 SELECT order_id, res
 FROM Orders,
-LATERAL TABLE(table_func(order_id)) t(res)
+LATERAL table_func(order_id) t(res)
 ```
 
 ### LEFT OUTER JOIN
@@ -465,7 +465,7 @@ LATERAL TABLE(table_func(order_id)) t(res)
 ```sql
 SELECT order_id, res
 FROM Orders
-LEFT OUTER JOIN LATERAL TABLE(table_func(order_id)) t(res)
+LEFT OUTER JOIN LATERAL table_func(order_id) t(res)
   ON TRUE
 ```
 
diff --git a/docs/content.zh/docs/sql/reference/queries/overview.md 
b/docs/content.zh/docs/sql/reference/queries/overview.md
index 7373700ab52..18aba399c61 100644
--- a/docs/content.zh/docs/sql/reference/queries/overview.md
+++ b/docs/content.zh/docs/sql/reference/queries/overview.md
@@ -316,7 +316,8 @@ tableReference:
 
 tablePrimary:
     [ TABLE ] tablePath [ dynamicTableOptions ] [systemTimePeriod] [[AS] 
correlationName]
-  | LATERAL TABLE '(' functionName '(' expression [, expression ]* ')' ')'
+  | [ LATERAL ] functionName '(' expression [, expression ]* ')'
+  | [ LATERAL ] TABLE '(' functionName '(' expression [, expression ]* ')' ')'
   | [ LATERAL ] '(' query ')'
   | UNNEST '(' expression ')'
 
diff --git a/docs/content.zh/docs/sql/reference/queries/vector-search.md 
b/docs/content.zh/docs/sql/reference/queries/vector-search.md
index 415004cd5dc..978568932b9 100644
--- a/docs/content.zh/docs/sql/reference/queries/vector-search.md
+++ b/docs/content.zh/docs/sql/reference/queries/vector-search.md
@@ -35,13 +35,13 @@ Flink SQL 提供了 `VECTOR_SEARCH` 表值函数 (TVF) 来在 SQL 查询中执
 ### 语法
 
 ```sql
-SELECT * FROM input_table, LATERAL TABLE(VECTOR_SEARCH(
+SELECT * FROM input_table, LATERAL VECTOR_SEARCH(
    TABLE vector_table, 
    input_table.vector_column, 
    DESCRIPTOR(index_column),
    top_k,
    [CONFIG => MAP['key', 'value']]
-   ))
+   )
 ```
 
 ### 参数
@@ -64,32 +64,32 @@ SELECT * FROM input_table, LATERAL TABLE(VECTOR_SEARCH(
 ```sql
 -- 基本用法
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   TABLE vector_table,
   input_table.vector_column,
   DESCRIPTOR(index_column),
   10
-));
+);
 
 -- 带配置选项
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   TABLE vector_table,
   input_table.vector_column,
   DESCRIPTOR(index_column),
   10,
   MAP['async', 'true', 'timeout', '100s']
-));
+);
 
 -- 使用命名参数
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   SEARCH_TABLE => TABLE vector_table,
   COLUMN_TO_QUERY => input_table.vector_column,
   COLUMN_TO_SEARCH => DESCRIPTOR(index_column),
   TOP_K => 10,
   CONFIG => MAP['async', 'true', 'timeout', '100s']
-));
+);
 
 -- 使用常量值搜索
 SELECT * FROM TABLE(VECTOR_SEARCH(
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..1f87a57512f 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
@@ -112,7 +112,7 @@ SELECT
   SUM(amount * rate) AS amount
 FROM
   orders,
-  LATERAL TABLE (rates(order_time))
+  LATERAL rates(order_time)
 WHERE
   rates.currency = orders.currency
 ```
diff --git a/docs/content/docs/dev/table/functions/udfs.md 
b/docs/content/docs/dev/table/functions/udfs.md
index 405e0631e49..bd600e16cb3 100644
--- a/docs/content/docs/dev/table/functions/udfs.md
+++ b/docs/content/docs/dev/table/functions/udfs.md
@@ -1130,7 +1130,7 @@ In order to define a table function, one has to extend 
the base class `TableFunc
 
 In the Table API, a table function is used with `.joinLateral(...)` or 
`.leftOuterJoinLateral(...)`. The `joinLateral` operator (cross) joins each row 
from the outer table (table on the left of the operator) with all rows produced 
by the table-valued function (which is on the right side of the operator). The 
`leftOuterJoinLateral` operator joins each row from the outer table (table on 
the left of the operator) with all rows produced by the table-valued function 
(which is on the right sid [...]
 
-In SQL, use `LATERAL TABLE(<TableFunction>)` with `JOIN` or `LEFT JOIN` with 
an `ON TRUE` join condition.
+In SQL, use `LATERAL <TableFunction>(...)` (or the equivalent `LATERAL 
TABLE(<TableFunction>(...))`) with `JOIN` or `LEFT JOIN` with an `ON TRUE` join 
condition.
 
 The following example shows how to define your own split function and call it 
in a query. See the [Implementation Guide](#implementation-guide) for more 
details.
 
@@ -1189,17 +1189,17 @@ env
 // call registered function in SQL
 env.sqlQuery(
   "SELECT myField, word, length " +
-  "FROM MyTable, LATERAL TABLE(SplitFunction(myField))");
+  "FROM MyTable, LATERAL SplitFunction(myField)");
 env.sqlQuery(
   "SELECT myField, word, length " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) ON TRUE");
+  "LEFT JOIN LATERAL SplitFunction(myField) ON TRUE");
 
 // rename fields of the function in SQL
 env.sqlQuery(
   "SELECT myField, newWord, newLength " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) AS T(newWord, newLength) ON 
TRUE");
+  "LEFT JOIN LATERAL SplitFunction(myField) AS T(newWord, newLength) ON TRUE");
 
 ```
 {{< /tab >}}
@@ -1254,17 +1254,17 @@ env
 // call registered function in SQL
 env.sqlQuery(
   "SELECT myField, word, length " +
-  "FROM MyTable, LATERAL TABLE(SplitFunction(myField))")
+  "FROM MyTable, LATERAL SplitFunction(myField)")
 env.sqlQuery(
   "SELECT myField, word, length " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) ON TRUE")
+  "LEFT JOIN LATERAL SplitFunction(myField) ON TRUE")
 
 // rename fields of the function in SQL
 env.sqlQuery(
   "SELECT myField, newWord, newLength " +
   "FROM MyTable " +
-  "LEFT JOIN LATERAL TABLE(SplitFunction(myField)) AS T(newWord, newLength) ON 
TRUE")
+  "LEFT JOIN LATERAL SplitFunction(myField) AS T(newWord, newLength) ON TRUE")
 
 ```
 {{< /tab >}}
@@ -1354,7 +1354,7 @@ env.from("MyTable")
         .select($("*"))
 
 // call registered function in SQL
-env.sqlQuery("SELECT * FROM MyTable, LATERAL 
TABLE(BackgroundFunction(myField))");
+env.sqlQuery("SELECT * FROM MyTable, LATERAL BackgroundFunction(myField)");
 
 ```
 
diff --git a/docs/content/docs/sql/reference/queries/joins.md 
b/docs/content/docs/sql/reference/queries/joins.md
index c323554d37b..74645e18976 100644
--- a/docs/content/docs/sql/reference/queries/joins.md
+++ b/docs/content/docs/sql/reference/queries/joins.md
@@ -264,7 +264,7 @@ SELECT
   o_amount, r_rate
 FROM
   Orders,
-  LATERAL TABLE (Rates(o_proctime))
+  LATERAL Rates(o_proctime)
 WHERE
   r_currency = o_currency
 ```
@@ -290,7 +290,7 @@ SELECT
   o_amount, r_rate
 FROM
   Orders,
-  LATERAL TABLE (Rates(o_proctime))
+  LATERAL Rates(o_proctime)
 WHERE
   r_currency = o_currency
 ```
@@ -546,7 +546,7 @@ The row of the left (outer) table is dropped, if its table 
function call returns
 ```sql
 SELECT order_id, res
 FROM Orders,
-LATERAL TABLE(table_func(order_id)) t(res)
+LATERAL table_func(order_id) t(res)
 ```
 
 ### LEFT OUTER JOIN
@@ -556,7 +556,7 @@ If a table function call returns an empty result, the 
corresponding outer row is
 ```sql
 SELECT order_id, res
 FROM Orders
-LEFT OUTER JOIN LATERAL TABLE(table_func(order_id)) t(res)
+LEFT OUTER JOIN LATERAL table_func(order_id) t(res)
   ON TRUE
 ```
 
diff --git a/docs/content/docs/sql/reference/queries/overview.md 
b/docs/content/docs/sql/reference/queries/overview.md
index 1b607d96815..e5346941eab 100644
--- a/docs/content/docs/sql/reference/queries/overview.md
+++ b/docs/content/docs/sql/reference/queries/overview.md
@@ -316,7 +316,8 @@ tableReference:
 
 tablePrimary:
     [ TABLE ] tablePath [ dynamicTableOptions ] [systemTimePeriod] [[AS] 
correlationName]
-  | LATERAL TABLE '(' functionName '(' expression [, expression ]* ')' ')'
+  | [ LATERAL ] functionName '(' expression [, expression ]* ')'
+  | [ LATERAL ] TABLE '(' functionName '(' expression [, expression ]* ')' ')'
   | [ LATERAL ] '(' query ')'
   | UNNEST '(' expression ')'
 
diff --git a/docs/content/docs/sql/reference/queries/vector-search.md 
b/docs/content/docs/sql/reference/queries/vector-search.md
index 1ffac76125a..4f800ac356f 100644
--- a/docs/content/docs/sql/reference/queries/vector-search.md
+++ b/docs/content/docs/sql/reference/queries/vector-search.md
@@ -37,13 +37,13 @@ The `VECTOR_SEARCH` uses a processing-time attribute to 
correlate rows to the la
 
 ```sql
 SELECT * 
-FROM input_table, LATERAL TABLE(VECTOR_SEARCH(
+FROM input_table, LATERAL VECTOR_SEARCH(
    TABLE vector_table, 
    input_table.vector_column, 
    DESCRIPTOR(index_column),
    top_k,
    [CONFIG => MAP['key', 'value']]
-   ))
+   )
 ```
 
 ### Parameters
@@ -66,32 +66,32 @@ The following configuration options can be specified in the 
config map:
 ```sql
 -- Basic usage
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   TABLE vector_table,
   input_table.vector_column,
   DESCRIPTOR(index_column),
   10
-));
+);
 
 -- With configuration options
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   TABLE vector_table,
   input_table.vector_column,
   DESCRIPTOR(index_column),
   10,
   MAP['async', 'true', 'timeout', '100s']
-));
+);
 
 -- Using named parameters
 SELECT * FROM 
-input_table, LATERAL TABLE(VECTOR_SEARCH(
+input_table, LATERAL VECTOR_SEARCH(
   SEARCH_TABLE => TABLE vector_table,
   COLUMN_TO_QUERY => input_table.vector_column,
   COLUMN_TO_SEARCH => DESCRIPTOR(index_column),
   TOP_K => 10,
   CONFIG => MAP['async', 'true', 'timeout', '100s']
-));
+);
 
 -- Searching with contant value
 SELECT * 

Reply via email to