-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Allow deleting old partition spec columns in V1 #7398
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
Conversation
|
|
||
| table.updateSchema().deleteColumn("data").commit(); | ||
|
|
||
| // This would throw a NPE |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
dramaticlly
left a comment
There was a problem hiding this 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!
hililiwei
left a comment
There was a problem hiding this 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new empty line?
| @Test | ||
| public void testDeletingPartitionField() { | ||
| TestTables.TestTable table = | ||
| TestTables.create(tableDir, "test", SCHEMA, BY_DATA_SPEC, V1_FORMAT_VERSION); |
There was a problem hiding this comment.
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?
jackye1995
left a comment
There was a problem hiding this 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!
|
Thanks for fixing this, @Fokko! |
Resolves #7386