Skip to content
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

Core: Add REST spec and request for committing changes against multiple tables #7741

Merged
merged 2 commits into from
Jun 9, 2023

Conversation

nastra
Copy link
Contributor

@nastra nastra commented May 30, 2023

extracted from #7569

import org.immutables.value.Value;

@Value.Immutable
public interface CommitTransactionRequest extends RESTRequest {
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 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.

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'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

@nastra nastra requested a review from rdblue June 5, 2023 08:15
List<UpdateTableRequest.UpdateRequirement> requirements = Lists.newArrayList();
List<MetadataUpdate> updates = Lists.newArrayList();

if (node.hasNonNull(IDENTIFIER)) {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@rdblue rdblue merged commit cdc1a27 into apache:master Jun 9, 2023
@rdblue
Copy link
Contributor

rdblue commented Jun 9, 2023

Looks great, thanks for getting this done, @nastra!

@nastra nastra deleted the rest-only-for-multi-table-diff branch June 10, 2023 07:47
rodmeneses pushed a commit to rodmeneses/iceberg that referenced this pull request Feb 19, 2024
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.

2 participants