Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Dec 16, 2020

This adds UpdatePartitionSpec to Table and Transaction.

These changes are extracted from #922 and @jun-he is the primary author.

@rdblue
Copy link
Contributor Author

rdblue commented Dec 16, 2020

@jun-he, I've extracted the partition spec update operation from #922 and added it on top of #1919. Most of these changes are yours, except I swapped out the API. There are also some additional changes in #922 that I didn't add because I wanted to keep this small. It would be great to have some of those refactors done, like updating tests to use the new API, if you are interested in contributing those changes in separate PRs or rebasing #922.

PartitionSpec spec = PartitionSpec.builderFor(schema).withSpecId(5)
.add(3, 1005, "x_partition", "bucket[4]")
.add(5, 1005, "z_partition", "bucket[8]")
.add(5, 1003, "z_partition", "bucket[8]")
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a typo before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent is to check whether the IDs are reassigned. The spec builder may reject duplicate IDs.

Copy link
Contributor

@aokolnychyi aokolnychyi left a comment

Choose a reason for hiding this comment

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

+1

@rdblue
Copy link
Contributor Author

rdblue commented Dec 16, 2020

Thanks for reviewing, @aokolnychyi!

@rdblue rdblue merged commit a0e76df into apache:master Dec 16, 2020
@rdblue
Copy link
Contributor Author

rdblue commented Dec 16, 2020

Thanks for reviewing, @aokolnychyi!

@rdblue rdblue deleted the add-partition-spec-evolution-operation branch December 16, 2020 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants