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

Nessie REST API Support for Namespace Operations #297

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

shubham-tomar
Copy link

Overview

This PR adds support for using Apache Nessie as a REST catalog by implementing the Nessie API paths for namespace operations. The changes ensure compatibility with Nessie API v0.102.4.

Changes

Modified catalog/rest.go

Updated namespace-related functions to align with Nessie API paths:

  • ListNamespaces
  • CreateNamespace
  • DropNamespace
  • LoadNamespaceProperties
  • UpdateNamespaceProperties

Added context.go

  • Added utilities to manage reference context, which is required for Nessie API paths
  • Introduced GetRefFromContext and WithRef functions to handle reference passing through context
  • References are required in Nessie API paths to specify the branch/tag context for namespace operations

Testing

I had to modify path and structure of test cases to make it work with nessie
All Test Cases are passing

Comment on lines +1029 to +1033
type namespaceItem struct {
Type string `json:"type"`
ID string `json:"id"`
Elements []string `json:"elements"`
}
Copy link
Member

Choose a reason for hiding this comment

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

is this something in the actual REST API spec? or is it unique to Nessie's implementation? If this is unique to Nessie, then I would not be in favor of adding this to the REST catalog implementation

Comment on lines 1062 to 1065
type payload struct {
Remove []string `json:"removals"`
Updates iceberg.Properties `json:"updates"`
PropertyUpdates iceberg.Properties `json:"propertyUpdates"`
PropertyRemovals []string `json:"propertyRemovals,omitempty"`
}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this change incompatible with the REST API?

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.

2 participants