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


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/connectors/DynamicSinkUtils.java:
##########
@@ -258,6 +258,36 @@ public static RelNode convertCreateTableAsToRel(
                 null); // conflictStrategy
     }
 
+    /**
+     * Converts the {@code AS} query of a materialized table (CREATE / CREATE 
OR ALTER / ALTER ...
+     * AS) into a {@link RelNode} that writes into the table, adding helper 
projections if
+     * necessary. The caller resolves the target table to its {@link 
ResolvedCatalogTable} form (the
+     * new definition for an alter, the created definition for a create).
+     */
+    public static RelNode convertMaterializedTableAsToRel(
+            FlinkRelBuilder relBuilder,
+            RelNode input,
+            Catalog catalog,
+            ObjectIdentifier identifier,
+            ResolvedCatalogTable resolvedTable,
+            Map<String, String> staticPartitions,
+            boolean isOverwrite,
+            DynamicTableSink sink) {
+        final ContextResolvedTable contextResolvedTable =
+                ContextResolvedTable.permanent(identifier, catalog, 
resolvedTable);
+
+        return convertSinkToRel(
+                relBuilder,
+                input,
+                Collections.emptyMap(),

Review Comment:
   ```suggestion
                   Map.of(),
   ```
   here and in other places



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