snuyanzin commented on code in PR #27199:
URL: https://github.com/apache/flink/pull/27199#discussion_r2532189700


##########
docs/content/docs/dev/table/materialized-table/statements.md:
##########
@@ -228,6 +228,30 @@ CREATE MATERIALIZED TABLE my_materialized_table
     AS SELECT * FROM kafka_catalog.db1.kafka_table;
 ```
 
+## OR ALTER
+
+The `OR ALTER` clause provides create-or-update semantics:
+
+- **If the table does not exist**: Creates a new materialized table with the 
specified options
+- **If the table exists**: Modifies the query definition (behaves like `ALTER 
MATERIALIZED TABLE AS`)
+
+This is particularly useful in declarative deployment scenarios where you want 
to define the desired state without checking if the table already exists.
+
+**Behavior when table exists:**

Review Comment:
   ```suggestion
   **Behavior when materialized table exists:**
   ```



##########
docs/content/docs/dev/table/materialized-table/statements.md:
##########
@@ -228,6 +228,30 @@ CREATE MATERIALIZED TABLE my_materialized_table
     AS SELECT * FROM kafka_catalog.db1.kafka_table;
 ```
 
+## OR ALTER
+
+The `OR ALTER` clause provides create-or-update semantics:
+
+- **If the table does not exist**: Creates a new materialized table with the 
specified options
+- **If the table exists**: Modifies the query definition (behaves like `ALTER 
MATERIALIZED TABLE AS`)
+
+This is particularly useful in declarative deployment scenarios where you want 
to define the desired state without checking if the table already exists.
+
+**Behavior when table exists:**
+
+The operation updates the materialized table similarly to [ALTER MATERIALIZED 
TABLE AS](#as-select_statement-1):
+
+**Full mode:**
+1. Updates the schema and query definition
+2. The table is refreshed using the new query when the next refresh job is 
triggered

Review Comment:
   ```suggestion
   2. The materialized table is refreshed using the new query when the next 
refresh job is triggered
   ```



-- 
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]

Reply via email to