snuyanzin commented on code in PR #27846:
URL: https://github.com/apache/flink/pull/27846#discussion_r3011890061
##########
docs/content/docs/sql/materialized-table/statements.md:
##########
@@ -382,15 +390,125 @@ CREATE OR ALTER MATERIALIZED TABLE my_materialized_table
# ALTER MATERIALIZED TABLE
-```
+```text
ALTER MATERIALIZED TABLE [catalog_name.][db_name.]table_name
- SUSPEND | RESUME [WITH (key1=val1, key2=val2, ...)] |
- REFRESH [PARTITION partition_spec] |
- AS <select_statement>
+ ADD { <schema_component> | (<schema_component> [, ...]) | <distribution> }
+ | MODIFY { <schema_component> | (<schema_component> [, ...]) |
<distribution> }
+ | DROP {column_name | (column_name, column_name, ....) | PRIMARY KEY |
CONSTRAINT constraint_name | WATERMARK | DISTRIBUTION }
+ | SUSPEND | RESUME [WITH (key1=val1, key2=val2, ...)] |
+ | REFRESH [PARTITION partition_spec] |
+ | AS <select_statement>
+<schema_component>:
+ { <column_component> | <constraint_component> | <watermark_component> }
+
+<column_component>:
+ column_name <column_definition> [FIRST | AFTER column_name]
+
+<constraint_component>:
+ [CONSTRAINT constraint_name] PRIMARY KEY (column_name, ...) NOT ENFORCED
+
+<watermark_component>:
+ WATERMARK FOR rowtime_column_name AS watermark_strategy_expression
+
+<column_definition>:
+ { <physical_column_definition> | <metadata_column_definition> |
<computed_column_definition> } [COMMENT column_comment]
+
+<physical_column_definition>:
+ column_type
+
+<metadata_column_definition>:
+ column_type METADATA [ FROM metadata_key ] [ VIRTUAL ]
+
+<computed_column_definition>:
+ AS computed_column_expression
+
+<distribution>:
+{
+ DISTRIBUTION BY [ { HASH | RANGE } ] (bucket_column_name1,
bucket_column_name2, ...) ] [INTO n BUCKETS]
Review Comment:
done
##########
docs/content.zh/docs/sql/materialized-table/statements.md:
##########
@@ -383,15 +391,123 @@ CREATE OR ALTER MATERIALIZED TABLE my_materialized_table
# ALTER MATERIALIZED TABLE
-```
+```text
ALTER MATERIALIZED TABLE [catalog_name.][db_name.]table_name
- SUSPEND | RESUME [WITH (key1=val1, key2=val2, ...)] |
- REFRESH [PARTITION partition_spec] |
- AS <select_statement>
+ ADD { <schema_component> | (<schema_component> [, ...]) | <distribution> }
+ | MODIFY { <schema_component> | (<schema_component> [, ...]) |
<distribution> }
+ | DROP {column_name | (column_name, column_name, ....) | PRIMARY KEY |
CONSTRAINT constraint_name | WATERMARK | DISTRIBUTION }
+ | SUSPEND | RESUME [WITH (key1=val1, key2=val2, ...)] |
+ | REFRESH [PARTITION partition_spec] |
+ | AS <select_statement>
+<schema_component>:
+ { <column_component> | <constraint_component> | <watermark_component> }
+
+<column_component>:
+ column_name <column_definition> [FIRST | AFTER column_name]
+
+<constraint_component>:
+ [CONSTRAINT constraint_name] PRIMARY KEY (column_name, ...) NOT ENFORCED
+
+<watermark_component>:
+ WATERMARK FOR rowtime_column_name AS watermark_strategy_expression
+
+<column_definition>:
+ { <physical_column_definition> | <metadata_column_definition> |
<computed_column_definition> } [COMMENT column_comment]
+
+<physical_column_definition>:
+ column_type
+
+<metadata_column_definition>:
+ column_type METADATA [ FROM metadata_key ] [ VIRTUAL ]
+
+<computed_column_definition>:
+ AS computed_column_expression
+
+<distribution>:
+{
+ DISTRIBUTION BY [ { HASH | RANGE } ] (bucket_column_name1,
bucket_column_name2, ...) ] [INTO n BUCKETS]
+ | DISTRIBUTION INTO n BUCKETS
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]