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 missing REST endpoint definitions #11756

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

ajreid21
Copy link
Contributor

@ajreid21 ajreid21 commented Dec 11, 2024

Noticed there were some definitions missing in the REST Endpoint class (most notably entries for tableExists and the new loadCredentials endpoints).

Added the following definitions in that class:

  • tableExists (HEAD
  • loadCredentials
  • namespaceExists
  • viewExists
  • scan plan endpoints (can remove these if don't want to add them yet)

Added the tableExists endpoint to the list of default endpoints.

  • should the loadCredentials and namespaceExists endpoints be added as well?
  • should the viewExists endpoint be added to the view endpoints list?

It doesn't appear that the REST catalog impl actually uses the namespaceExists or viewExists endpoints and instead falls back to the session and view session catalog impls which loads the namespace/view to check if exists -- is there a reason the REST catalog impl doesn't use the exists endpoints?

@github-actions github-actions bot added the core label Dec 11, 2024
@ajreid21 ajreid21 changed the title add missing REST endpoint definitions Core: Add missing REST endpoint definitions Dec 11, 2024
@ajreid21
Copy link
Contributor Author

@nastra

Copy link
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

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

thanks @ajreid21 for adding these. Just a few minor comments

@ajreid21 ajreid21 force-pushed the add-missing-rest-endpoint-definitions branch from e4e3935 to 24e94d6 Compare December 13, 2024 16:37
@@ -138,11 +138,13 @@ public class RESTSessionCatalog extends BaseViewSessionCatalog
ImmutableSet.<Endpoint>builder()
.add(Endpoint.V1_LIST_NAMESPACES)
.add(Endpoint.V1_LOAD_NAMESPACE)
.add(Endpoint.V1_NAMESPACE_EXISTS)
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 also added namespace exists to the default list

@ajreid21
Copy link
Contributor Author

@nastra I addressed the comments and added the new checks if you want to take another look. Thanks.

@nastra nastra merged commit 592b604 into apache:main Dec 16, 2024
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants