hackergin commented on code in PR #24765:
URL: https://github.com/apache/flink/pull/24765#discussion_r1597406641


##########
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/service/MaterializedTableStatementITCase.java:
##########
@@ -236,6 +282,150 @@ void testCreateMaterializedTableInFullMode() {
                         "Only support create materialized table in continuous 
refresh mode currently.");
     }
 
+    @Test
+    void testAlterMaterializedTableSuspendAndResume(
+            @TempDir Path temporaryPath,
+            @InjectClusterClient RestClusterClient<?> restClusterClient)
+            throws Exception {
+        // initialize session handle, create test-filesystem catalog and 
register it to catalog
+        // store
+        SessionHandle sessionHandle = initializeSession();
+
+        String materializedTableDDL =
+                "CREATE MATERIALIZED TABLE users_shops"
+                        + " PARTITIONED BY (ds)\n"
+                        + " WITH(\n"
+                        + "   'format' = 'debezium-json'\n"
+                        + " )\n"
+                        + " FRESHNESS = INTERVAL '30' SECOND\n"
+                        + " AS SELECT \n"
+                        + "  user_id,\n"
+                        + "  shop_id,\n"
+                        + "  ds,\n"
+                        + "  SUM (payment_amount_cents) AS 
payed_buy_fee_sum,\n"
+                        + "  SUM (1) AS pv\n"
+                        + " FROM (\n"
+                        + "    SELECT user_id, shop_id, 
DATE_FORMAT(order_created_at, 'yyyy-MM-dd') AS ds, payment_amount_cents FROM 
datagenSource"
+                        + " ) AS tmp\n"
+                        + " GROUP BY (user_id, shop_id, ds)";
+
+        OperationHandle materializedTableHandle =
+                service.executeStatement(
+                        sessionHandle, materializedTableDDL, -1, new 
Configuration());
+        awaitOperationTermination(service, sessionHandle, 
materializedTableHandle);
+
+        // set up savepoint dir
+        String savepointDir = temporaryPath.toString();
+        String alterMaterializedTableSavepointDDL =
+                String.format("SET 'state.savepoints.dir' = 'file://%s'", 
savepointDir);

Review Comment:
   This must be set, otherwise the following error will be reported.
   ```
   Caused by: java.lang.IllegalArgumentException: The scheme (hdfs://, file://, 
etc) is null. Please specify the file system scheme explicitly in the URI.
   
   ```



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to