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


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/MaterializedTableTableApiITCase.java:
##########
@@ -856,20 +884,12 @@ void 
testRedeployWithDroppedColumnIsRejectedAndLeavesRefreshJobSuspended(
     @Test
     void testRedeployMaterializedTableWithMaterializeInto(@TempDir Path 
temporaryPath)
             throws Exception {
-        tEnv.executeSql(
-                "CREATE MATERIALIZED TABLE users_shops"
-                        + " PARTITIONED BY (ds)\n"
-                        + UPDATING_VALUES_SINK
-                        + " 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"
-                        + " 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)");
+        usersShopsQuery()
+                .dropColumns($("pv"))
+                .materializeInto(
+                        "users_shops",
+                        
usersShopsDescriptor().freshness(Duration.ofSeconds(30)).build())

Review Comment:
   Both 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