Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Apr 21, 2023

Resolves #7386

@Fokko Fokko marked this pull request as ready for review April 21, 2023 12:50
@github-actions github-actions bot added the core label Apr 21, 2023

table.updateSchema().deleteColumn("data").commit();

// This would throw a NPE
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment still apply?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that it is better to remove it, thanks!

Copy link
Contributor

@dramaticlly dramaticlly left a comment

Choose a reason for hiding this comment

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

thank you @Fokko for fixing this!

Copy link
Contributor

@hililiwei hililiwei left a comment

Choose a reason for hiding this comment

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

LGTM, just one format comment.

// This only happens in V1 tables where the reference is still around as a void transform
fieldId = field.sourceId();
}
specBuilder.addField(field.transform().toString(), fieldId, field.fieldId(), field.name());
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: new empty line?

@jackye1995 jackye1995 added this to the Iceberg 1.3.0 milestone May 1, 2023
@Test
public void testDeletingPartitionField() {
TestTables.TestTable table =
TestTables.create(tableDir, "test", SCHEMA, BY_DATA_SPEC, V1_FORMAT_VERSION);
Copy link
Contributor

Choose a reason for hiding this comment

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

should we maybe also add a test that does the same with V2_FORMAT_VERSION?

Copy link
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

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

looks good to me. I see Eduard has a comment about testing in v2, which I am not sure if is worth it, up to you!

@rdblue rdblue merged commit 36ad90b into apache:master May 16, 2023
@rdblue
Copy link
Contributor

rdblue commented May 16, 2023

Thanks for fixing this, @Fokko!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue /w UpdatePartitionSpec after deleting a partition field and schema field

6 participants