-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Add REST spec and request for committing changes against multiple tables #7741
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
2e68517 to
67bef79
Compare
67bef79 to
7585a4e
Compare
7585a4e to
71711e1
Compare
core/src/main/java/org/apache/iceberg/rest/requests/CommitTransactionRequest.java
Outdated
Show resolved
Hide resolved
| import org.immutables.value.Value; | ||
|
|
||
| @Value.Immutable | ||
| public interface CommitTransactionRequest extends RESTRequest { |
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 worth using Immutables?
This is straightforward as a simple object, and then callers don't need to know that there is a different implementation class they should use.
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'm ok not using Immutables here, since it's a single field. We'll just end up with slightly more code than in the Immutables version but without another class being generated
core/src/test/java/org/apache/iceberg/rest/requests/TestCommitTransactionRequestParser.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/rest/requests/TestCommitTransactionRequestParser.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/rest/requests/TestCommitTransactionRequestParser.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/rest/requests/TestCommitTransactionRequestParser.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/requests/UpdateTableRequest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/requests/CommitTransactionRequest.java
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/requests/CommitTransactionRequest.java
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/rest/requests/CommitTransactionRequestParser.java
Show resolved
Hide resolved
| List<UpdateTableRequest.UpdateRequirement> requirements = Lists.newArrayList(); | ||
| List<MetadataUpdate> updates = Lists.newArrayList(); | ||
|
|
||
| if (node.hasNonNull(IDENTIFIER)) { |
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 the plan to refactor this into an UpdateTableRequestParser? Seems strange to write this but not as a separate class for that request.
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.
yes that will be refactored into UpdateTableRequestParser in #7750
|
Looks great, thanks for getting this done, @nastra! |
extracted from #7569