JingsongLi commented on code in PR #347:
URL: https://github.com/apache/flink-table-store/pull/347#discussion_r1036924742


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/schema/SchemaManager.java:
##########
@@ -221,6 +217,52 @@ public TableSchema commitChanges(List<SchemaChange> 
changes) throws Exception {
                     newFields.add(
                             new DataField(
                                     id, addColumn.fieldName(), dataType, 
addColumn.description()));
+                } else if (change instanceof RenameColumn) {
+                    RenameColumn rename = (RenameColumn) change;
+                    /// TODO support partition schema evolution
+                    if (schema.partitionKeys().contains(rename.fieldName())) {

Review Comment:
   Extract a method `validateNotPkAndPartKey`?



##########
flink-table-store-spark/src/test/java/org/apache/flink/table/store/spark/SparkReadITCase.java:
##########
@@ -284,6 +289,204 @@ public void testAddColumn() throws Exception {
         assertThat(results.toString()).isEqualTo("[[8]]");
     }
 
+    @Test
+    public void testRenameColumn() throws Exception {

Review Comment:
   Maybe we can create a new class `SparkSchemaChangeITCase`?



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