Timm0 commented on code in PR #29838:
URL: https://github.com/apache/flink/pull/29838#discussion_r4549704840


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/MaterializedPipeline.java:
##########
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.api;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.table.catalog.ObjectIdentifier;
+
+/**
+ * A pending declaration of one materialized table, created by {@link
+ * Table#materializeInto(String)}.
+ */
+@PublicEvolving
+public interface MaterializedPipeline {
+
+    /**
+     * The fully qualified identifier this declaration will create or alter.
+     *
+     * <p>Resolved against the current catalog and database at {@link 
Table#materializeInto}.
+     */
+    ObjectIdentifier getIdentifier();
+
+    /**
+     * Submits this declaration with the semantics of {@code CREATE OR ALTER 
MATERIALIZED TABLE}.
+     *
+     * <p>If the materialized table exists and its continuous refresh job is 
running, the job is
+     * stopped with a savepoint and a new refresh job is started, which does 
not restore that
+     * savepoint. This also happens if the declaration is unchanged. The stop 
requires a savepoint
+     * directory ({@code execution.checkpointing.savepoint-dir}); without one, 
this fails before the
+     * stop. If the changes are rejected or cannot be written after the stop, 
the materialized table
+     * is left suspended with its previous definition and the savepoint.
+     *
+     * <p>A suspended materialized table is altered and stays suspended, and 
its stored savepoint is
+     * cleared, so a later {@code RESUME} starts the refresh job without 
state. A materialized table
+     * in full refresh mode is altered without changing its refresh workflow.

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]

Reply via email to