jnh5y commented on code in PR #24886:
URL: https://github.com/apache/flink/pull/24886#discussion_r1628750770


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/AlterSchemaConverter.java:
##########
@@ -916,15 +987,29 @@ private Operation buildAlterTableChangeOperation(
             List<TableChange> tableChanges,
             Schema newSchema,
             ResolvedCatalogTable oldTable) {
+        CatalogTable.Builder builder =
+                CatalogTable.newBuilder()
+                        .schema(newSchema)
+                        .comment(oldTable.getComment())
+                        .partitionKeys(oldTable.getPartitionKeys())
+                        .options(oldTable.getOptions());
+
+        if (alterTable instanceof SqlAlterTableSchema) {

Review Comment:
   After looking at this again, I figured out that we need to create the new 
table.  Since that table needs the added/modified distribution, we have to take 
it from the `SqlAlterTableSchema` rather than the `oldTable`.



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