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


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/materializedtable/MaterializedTableImpl.java:
##########
@@ -92,6 +96,34 @@ public Optional<String> getRefreshHandlerDescription() {
         return lookUp().getRefreshHandlerDescription();
     }
 
+    @Override
+    public void suspend() {
+        tableEnvironment.executeInternal(new 
AlterMaterializedTableSuspendOperation(identifier));
+    }
+
+    @Override
+    public void resume() {
+        resume(Map.of());
+    }
+
+    @Override
+    public void resume(Map<String, String> dynamicOptions) {
+        Preconditions.checkNotNull(dynamicOptions, "Dynamic options must not 
be null.");
+        tableEnvironment.executeInternal(
+                new AlterMaterializedTableResumeOperation(identifier, 
Map.copyOf(dynamicOptions)));
+    }
+
+    @Override
+    public boolean drop() {
+        return drop(true);
+    }
+
+    @Override
+    public boolean drop(boolean ignoreIfNotExists) {

Review Comment:
   Done



##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/MaterializedTable.java:
##########
@@ -83,4 +84,57 @@ public interface MaterializedTable {
      * @throws ValidationException if no materialized table exists at its path 
anymore.
      */
     Optional<String> getRefreshHandlerDescription();
+
+    /**
+     * Suspends this materialized table.
+     *
+     * <p>Fails if no materialized table exists at {@link #getIdentifier()}, 
if a temporary table or
+     * view shadows it, if it is still initializing or already suspended, or 
if its refresh job
+     * cannot be stopped.
+     */
+    void suspend();

Review Comment:
   Addressed



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