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

[#5438] feat(iceberg): add view event for Iceberg REST server #5584

Merged
merged 5 commits into from
Nov 16, 2024

Conversation

orenccl
Copy link
Collaborator

@orenccl orenccl commented Nov 14, 2024

What changes were proposed in this pull request?

Add view event for Iceberg REST server

Why are the changes needed?

Close: #5438

Does this PR introduce any user-facing change?

No

How was this patch tested?

unit test

@jerryshao jerryshao requested a review from FANNG1 November 15, 2024 03:15
@DeveloperApi
public class IcebergCreateViewEvent extends IcebergViewEvent {

private CreateViewRequest createViewRequest;
Copy link
Contributor

Choose a reason for hiding this comment

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

add final?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed IcebergTableEvent doesn't add final, do you like to add final to table event too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, you mean that createRequest should be final?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, because it will not be changed after initiated, could you change all class members to final for the Iceberg Event?

Copy link
Collaborator Author

@orenccl orenccl Nov 15, 2024

Choose a reason for hiding this comment

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

I have added final to the Iceberg view event, and I plan to open another PR to add final to the table event and fix the return status code. I think making these changes in a separate PR is better, as this one would otherwise involve modifying too many files.

Please let me know if you're okay with this approach.

Refer to issue: #5593, pr: #5594

renameViewRequest.destination());
IcebergRequestContext context = new IcebergRequestContext(httpServletRequest(), catalogName);
viewOperationDispatcher.renameView(context, renameViewRequest);
return IcebergRestUtils.okWithoutContent();
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

@orenccl orenccl Nov 15, 2024

Choose a reason for hiding this comment

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

Ok, seems like exists should also return 204

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, thanks for pointing this ! Do you like to propose a PR to fix it, table exists and schema exists should be corrected too.

Copy link
Collaborator Author

@orenccl orenccl Nov 15, 2024

Choose a reason for hiding this comment

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

No problem, I can open another PR to ensure the Iceberg table rename and exists operation return 204.

Refer to issue: #5593, pr: #5594

However, I don't think the Iceberg schema is currently implemented?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Iceberg schema is handled in IcebergNamespaceOperations

@FANNG1
Copy link
Contributor

FANNG1 commented Nov 15, 2024

@orenccl thanks for your work, LGTM except minor comments

@orenccl orenccl marked this pull request as draft November 15, 2024 10:23
@orenccl orenccl marked this pull request as ready for review November 15, 2024 10:28
@FANNG1 FANNG1 merged commit 13c92f9 into apache:main Nov 16, 2024
26 checks passed
@FANNG1
Copy link
Contributor

FANNG1 commented Nov 16, 2024

@orenccl , merged to main, thanks for your work and figuring out the hidden bugs!

@orenccl orenccl deleted the subtask/viewEventInIceberg branch November 16, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] add view event for Iceberg REST server
2 participants