-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Fixed the unpartitioned check in replace partitions #14186
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
|
@yuboxx Could you add a test please? |
Sure thing, could you take another look? |
| } | ||
|
|
||
| @TestTemplate | ||
| public void testReplaceAllVoidUnpartitionedTable() throws IOException { |
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.
throws IOException is redundant.
| assertThat(latestSnapshot(replaceMetadata, branch).allManifests(tableVoid.io())).hasSize(2); | ||
|
|
||
| validateManifestEntries( | ||
| latestSnapshot(replaceMetadata, branch).allManifests(tableVoid.io()).get(0), | ||
| ids(replaceId), | ||
| files(FILE_ALL_VOID_UNPARTITIONED_B), | ||
| statuses(Status.ADDED)); | ||
|
|
||
| validateManifestEntries( | ||
| latestSnapshot(replaceMetadata, branch).allManifests(tableVoid.io()).get(1), |
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.
We could extract a variable for latestSnapshot(replaceMetadata, branch).allManifests(tableVoid.io())
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.
Good point, updated!
huaxingao
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
|
@huaxingao @ebyhr @singhpk234 Appreciate the quick turnaround, let me know if there is any steps I shall take to get this merged! |
singhpk234
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 too ! thanks @yuboxx !
let me know if there is any steps I shall take to get this merged
IMHO, sufficient community members have approved the change, lets wait for today (in case some one has more feedbacks), I will help merging this first thing in the morning unless someone beats me to it :)
@huaxingao (as you are RM) do you wanna consider this for 1.10.1 ?
|
Thanks @yuboxx for change ! Thanks @huaxingao @ebyhr for the reviews. |
|
@singhpk234 Yes, I think this should be included in 1.10.1. |
…in replace partitions (apache#14186)
…in replace partitions (apache#14186)
…in replace partitions (apache#14186) (cherry picked from commit 00d18e3)
…in replace partitions (apache#14186)
Summary
insert overwriteruns on a table with partition columns removed, where it's supposed to replace the entire partitions instead of overwriting the partitions affected. The expected behavior is described in the public doc.Change
PartitionSpec, which includes the void transform check.Test Plan