spena commented on code in PR #25054:
URL: https://github.com/apache/flink/pull/25054#discussion_r1670627274


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/MergeTableAsUtil.java:
##########
@@ -83,6 +96,19 @@ public Schema mergeSchemas(SqlCreateTableAs 
sqlCreateTableAs, ResolvedSchema sou
                 sqlCreateTableAs.getColumnList(),
                 
Schema.newBuilder().fromResolvedSchema(sourceSchema).build().getColumns());
 
+        if (sqlCreateTableAs.getWatermark().isPresent()) {
+            schemaBuilder.setWatermark(sqlCreateTableAs.getWatermark().get());
+        }
+
+        Optional<SqlTableConstraint> primaryKey =
+                sqlCreateTableAs.getFullConstraints().stream()

Review Comment:
   Added a comment about the assumptions that SqlCreateTableAs has the 
validations for this.



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/MergeTableAsUtil.java:
##########
@@ -83,6 +96,19 @@ public Schema mergeSchemas(SqlCreateTableAs 
sqlCreateTableAs, ResolvedSchema sou
                 sqlCreateTableAs.getColumnList(),
                 
Schema.newBuilder().fromResolvedSchema(sourceSchema).build().getColumns());
 
+        if (sqlCreateTableAs.getWatermark().isPresent()) {
+            schemaBuilder.setWatermark(sqlCreateTableAs.getWatermark().get());
+        }
+
+        Optional<SqlTableConstraint> primaryKey =
+                sqlCreateTableAs.getFullConstraints().stream()

Review Comment:
   Added a comment about the assumptions that SqlCreateTableAs has the 
validations for this.



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