vinishjail97 commented on code in PR #712: URL: https://github.com/apache/incubator-xtable/pull/712#discussion_r2082586375
########## xtable-core/src/test/java/org/apache/xtable/iceberg/TestIcebergSchemaSync.java: ########## @@ -335,6 +335,33 @@ void testAddMapFieldComment() { verify(mockUpdateSchema).commit(); } + @Test Review Comment: Can we add a unit test which writes an actual iceberg table to a tempDir path? There are many examples in `ITConversionController` to follow from. ########## xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergSchemaSync.java: ########## @@ -114,6 +116,12 @@ private static Map<Integer, Supplier<UpdateSchema>> updateColumn( String parentPath) { Map<Integer, Supplier<UpdateSchema>> updates = new HashMap<>(); if (!latestColumn.equals(currentColumn)) { + // update the name of the column + if (!latestColumn.name().equals(currentColumn.name())) { + updates.put( + latestColumn.fieldId(), + () -> updateSchema.renameColumn(currentColumn.name(), latestColumn.name())); + } Review Comment: I think column name should be done after updating the type? The UT's are failing are probably because of 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: commits-unsubscr...@xtable.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org