Skip to content

REST Spec: Add unregister table endpoint#16400

Open
rdblue wants to merge 1 commit into
apache:mainfrom
rdblue:worktree-rest-unregister-table
Open

REST Spec: Add unregister table endpoint#16400
rdblue wants to merge 1 commit into
apache:mainfrom
rdblue:worktree-rest-unregister-table

Conversation

@rdblue
Copy link
Copy Markdown
Contributor

@rdblue rdblue commented May 18, 2026

This adds an endpoint to unregister a table from a REST catalog without deleting data or metadata files. A register endpoint already exists to add a table to a REST catalog, since most migrations have been to REST from Hive or other catalogs. But an unregister endpoint is needed to safely migrate from one REST catalog to another through the API.

This uses an empty POST to unregister under a table resource (/v1/{prefix}/namespaces/{namespace}/tables/{table}/unregister), rather than along side the register endpoint, which would require an unregister-specific request.

The request and endpoint structure were co-authored by Claude Code (Opus 4.7).

Co-Authored-By: Claude Code (Opus 4.7, 1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@nssalian nssalian left a comment

Choose a reason for hiding this comment

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

Left a comment, but I think the branch needs a rebase

@@ -1217,29 +1181,31 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'

/v1/{prefix}/namespaces/{namespace}/tables/{table}/credentials:
/v1/{prefix}/namespaces/{namespace}/tables/{table}/unregister:
parameters:
- $ref: '#/components/parameters/prefix'
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/table'
Copy link
Copy Markdown
Contributor

@nssalian nssalian May 18, 2026

Choose a reason for hiding this comment

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

I think this could include a$ref: '#/components/parameters/idempotency-key' too

can be registered in another catalog.


On success, this returns the table's last metadata location and current
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.

I am slightly worried about the ambiguity here of "last" and "current". Just want to make sure we are clearly stating that these should be pointing to identical representations of the table. The this returns the table's current metadata location and metadata.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, Could we just use the word "corresponding" here to unambiguously bridge the two? "table's last metadata location and the corresponding table metadata"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 on using corresponding.

@@ -3792,6 +3592,22 @@ components:
type: boolean
default: false

UnregisterTableResult:
description:
Last metadata location and current table metadata for the table that
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.

Again slightly worried about "last" and "current"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

-> Latest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Most recent?

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.

6 participants