Skip to content

Nessie REST API Support for Namespace Operations - #297

Closed
shubham-tomar wants to merge 11 commits into
apache:mainfrom
shubham-tomar:main
Closed

shubham-tomar wants to merge 11 commits into
apache:mainfrom
shubham-tomar:main

Conversation

@shubham-tomar

Copy link
Copy Markdown
Contributor

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 thread catalog/rest/rest.go Outdated
Comment on lines +1029 to +1033
type namespaceItem struct {
Type string `json:"type"`
ID string `json:"id"`
Elements []string `json:"elements"`
}

Copy link
Copy Markdown
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 thread catalog/rest/rest.go
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
Copy Markdown
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