Repository navigation
[Server] Implement the Iceberg dropNamespace endpoint - #1847
Merged
yili-db merged 2 commits intoSep 9, 2026
Merged
Conversation
DELETE on a namespace was not implemented, so an engine's DROP NAMESPACE against this catalog was answered by Armeria before any service was reached: a 405 saying the path takes no such method. The repository has done this work all along -- SchemaService deletes a schema through SchemaRepository.deleteSchema -- it was only missing from the Iceberg REST surface. Serve it, and advertise V1_DELETE_NAMESPACE with the other write endpoints. A namespace that still holds objects is refused: the repository reports that as a failed precondition, which would go out as 400, and the REST spec answers a namespace that is not empty with 409, so it is raised as Iceberg's NamespaceNotEmptyException. Authorizations of the deleted schema are cleared the same way SchemaService clears them, so dropping a namespace here leaves nothing behind that dropping it through the Unity Catalog API would have removed. Signed-off-by: Noritaka Sekiyama <[email protected]>
yili-db
reviewed
Sep 8, 2026
| } | ||
|
|
||
| @Test | ||
| public void testDropNamespace() throws Exception { |
Collaborator
There was a problem hiding this comment.
Please fold this test into testNamespaces
Contributor
Author
There was a problem hiding this comment.
Done. The cases are now a DropNamespace block in testNamespaces, after the get and list ones, reusing the catalog and schema that test already creates. Without the endpoint the block fails with 405 where 409 is expected, as the separate test did.
Review follow-up. The cases move into testNamespaces as a DropNamespace block after the get and list ones, so a reader sees the namespace endpoints in the order a client uses them and the block reuses the catalog and schema already created there. Without the endpoint the block fails with 405 where 409 is expected, as the separate test did. Signed-off-by: Noritaka Sekiyama <[email protected]>
yili-db
approved these changes
Sep 9, 2026
2 of 4 tasks
openinx
pushed a commit
that referenced
this pull request
Sep 9, 2026
…1860) **PR Checklist** - [x] A description of the changes is added to the description of this PR. - [ ] If there is a related issue, make sure it is linked to this PR. - [x] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've added or modified a feature, documentation in `docs` is updated **Description of changes** - #1847 added `@Delete(".../namespaces/{namespace}")`, so the 405 assertion in `testUnroutedIcebergRequestsAnswerWithAnIcebergError` now hits a routed path - Point it at `DELETE /namespaces` instead (collection serves GET/POST, not DELETE) Signed-off-by: Yi Li <[email protected]>
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
docsis updatedDescription of changes
Part of #1846.
DELETEon a namespace had no route, so an engine'sDROP NAMESPACEwas answered by Armeria beforeany service was reached, with a 405 saying the path takes no such method. Unity Catalog has dropped
schemas all along, through
SchemaRepository.deleteSchema; the operation was only missing from theIceberg REST surface.
This serves it and advertises
V1_DELETE_NAMESPACEwith the other write endpoints, so it is gated thesame way the other Iceberg writes are.
precondition, which would go out as 400; the spec answers a namespace that is not empty with 409, so
it is raised as Iceberg's
NamespaceNotEmptyException.SchemaServiceclears them, so droppinga namespace here leaves nothing behind that dropping it through the Unity Catalog API would remove.
For users:
DROP NAMESPACEworks from Spark, Trino and any other Iceberg client, and a namespace thatstill has tables is refused with the status the client understands as "not empty".
testDropNamespacepins the 409 while a table is there, the 204 and empty body once it is not, the404 for the namespace afterwards, and the updated
endpointslist. It fails on an unfixed tree andpasses with the fix; the full
server/testsuite shows no failure attributable to this change.