This is an automated email from the ASF dual-hosted git repository.
davidradl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 6f47a11b90c [FLINK-37121][docs] Fix syntax and examples in create
table statement doc (#28119)
6f47a11b90c is described below
commit 6f47a11b90cd6213596344f97cd4687cac1c8da0
Author: Ramin Gharib <[email protected]>
AuthorDate: Wed May 6 16:20:11 2026 +0200
[FLINK-37121][docs] Fix syntax and examples in create table statement doc
(#28119)
Add the optional TEMPORARY keyword to the CREATE TABLE grammar header,
document its semantics, and remove improper trailing commas from two example
blocks.
Co-authored-by: jiefei <[email protected]>
---
docs/content.zh/docs/sql/reference/ddl/create.md | 12 +++++++++---
docs/content/docs/sql/reference/ddl/create.md | 13 ++++++++++---
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/docs/content.zh/docs/sql/reference/ddl/create.md
b/docs/content.zh/docs/sql/reference/ddl/create.md
index 6a9fcaafe76..e6914b0a417 100644
--- a/docs/content.zh/docs/sql/reference/ddl/create.md
+++ b/docs/content.zh/docs/sql/reference/ddl/create.md
@@ -156,7 +156,7 @@ Flink SQL> INSERT INTO RubberOrders SELECT product, amount
FROM Orders WHERE pro
## CREATE TABLE
```text
-CREATE TABLE [IF NOT EXISTS] [catalog_name.][db_name.]table_name
+CREATE [TEMPORARY] TABLE [IF NOT EXISTS] [catalog_name.][db_name.]table_name
(
{ <physical_column_definition> | <metadata_column_definition> |
<computed_column_definition> }[ , ...n]
[ <watermark_definition> ]
@@ -205,6 +205,12 @@ CREATE TABLE [IF NOT EXISTS]
[catalog_name.][db_name.]table_name
根据指定的表名创建一个表,如果同名表已经在 catalog 中存在了,则无法注册。
+**TEMPORARY**
+
+临时表通常保存于内存中并且仅在创建它们的 Flink 会话持续期间存在。
+
+更多信息请查看 [Temporary vs Permanent tables]({{< ref "docs/dev/table/common"
>}}#temporary-vs-permanent-tables).
+
### Columns
**Physical / Regular Columns**
@@ -295,7 +301,7 @@ CREATE TABLE MyTable (
`timestamp` BIGINT METADATA, -- part of the query-to-sink schema
`offset` BIGINT METADATA VIRTUAL, -- not part of the query-to-sink schema
`user_id` BIGINT,
- `name` STRING,
+ `name` STRING
) WITH (
'connector' = 'kafka'
...
@@ -608,7 +614,7 @@ CREATE TABLE my_ctas_table (
desc STRING,
quantity DOUBLE,
cost AS price * quantity,
- WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND,
+ WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND
) WITH (
'connector' = 'kafka',
...
diff --git a/docs/content/docs/sql/reference/ddl/create.md
b/docs/content/docs/sql/reference/ddl/create.md
index 8140c9e9cc7..3728d0038ca 100644
--- a/docs/content/docs/sql/reference/ddl/create.md
+++ b/docs/content/docs/sql/reference/ddl/create.md
@@ -150,7 +150,7 @@ Flink SQL> INSERT INTO RubberOrders SELECT product, amount
FROM Orders WHERE pro
The following grammar gives an overview about the available syntax:
```text
-CREATE TABLE [IF NOT EXISTS] [catalog_name.][db_name.]table_name
+CREATE [TEMPORARY] TABLE [IF NOT EXISTS] [catalog_name.][db_name.]table_name
(
{ <physical_column_definition> | <metadata_column_definition> |
<computed_column_definition> }[ , ...n]
[ <watermark_definition> ]
@@ -200,6 +200,13 @@ CREATE TABLE [IF NOT EXISTS]
[catalog_name.][db_name.]table_name
The statement above creates a table with the given name. If a table with the
same name already exists
in the catalog, an exception is thrown.
+**TEMPORARY**
+
+Temporary tables are always stored in memory and only exist for the duration of
+the Flink session they are created within.
+
+Check out more details at [Temporary vs Permanent tables]({{< ref
"docs/dev/table/common" >}}#temporary-vs-permanent-tables).
+
### Columns
**Physical / Regular Columns**
@@ -290,7 +297,7 @@ CREATE TABLE MyTable (
`timestamp` BIGINT METADATA, -- part of the query-to-sink schema
`offset` BIGINT METADATA VIRTUAL, -- not part of the query-to-sink schema
`user_id` BIGINT,
- `name` STRING,
+ `name` STRING
) WITH (
'connector' = 'kafka'
...
@@ -597,7 +604,7 @@ CREATE TABLE my_ctas_table (
desc STRING,
quantity DOUBLE,
cost AS price * quantity,
- WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND,
+ WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND
) WITH (
'connector' = 'kafka',
...