Skip to content

Added a fix for column rename in IcebergSchemaSync #712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brishi19791
Copy link

FIxes #711

@@ -335,6 +335,33 @@ void testAddMapFieldComment() {
verify(mockUpdateSchema).commit();
}

@Test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a look and will add it @vinishjail97

Comment on lines 119 to 124
// update the name of the column
if (!latestColumn.name().equals(currentColumn.name())) {
updates.put(
latestColumn.fieldId(),
() -> updateSchema.renameColumn(currentColumn.name(), latestColumn.name()));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think column name should be done after updating the type?
The UT's are failing are probably because of this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved after updating the type and still it is failing. I will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XTable performs incorrect schema sync during Delta to Iceberg conversion when a column is renamed in the Delta table.
2 participants