lvyanquan commented on code in PR #3824:
URL: https://github.com/apache/flink-cdc/pull/3824#discussion_r1914351331


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/test/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplierTest.java:
##########
@@ -137,6 +140,12 @@ public void testApplySchemaChange(String metastore)
         Assertions.assertEquals(
                 tableSchema, 
catalog.getTable(Identifier.fromString("test.table1")).rowType());
 
+        Assertions.assertEquals(
+                "col3DefValue",
+                catalog.getTable(Identifier.fromString("test.table1"))
+                        .options()
+                        .get("fields.col3.default-value"));
+
         Map<String, String> nameMapping = new HashMap<>();
         nameMapping.put("col2", "newcol2");
         nameMapping.put("col3", "newcol3");

Review Comment:
   This is because Paimon saves column information through table options, and 
when renaming or dropping columns, we also need to modify these options 
accordingly.
   
   for example, for renaming col3 to newcol3, we should modify the option like: 
   fields.col3.default-value: col3DefValue => fields.newcol3.default-value: 
col3DefValue
   



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