You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "shtripat (via GitHub)" <gi...@apache.org> on 2026/02/25 13:01:32 UTC

[PR] feat(rest): add RegisterView to REST catalog [iceberg-go]

shtripat opened a new pull request, #753:
URL: https://github.com/apache/iceberg-go/pull/753

   ## Description:
   
   Adds RegisterView(ctx, identifier, metadataLocation) to rest.Catalog, the view equivalent of the existing RegisterTable. The method POSTs to POST /v1/{prefix}/namespaces/{namespace}/register-view as defined in the Iceberg REST catalog OpenAPI specification.
   
   ## Motivation
   
   Fixes: https://github.com/apache/iceberg-go/issues/752
   
   The only way to migrate a view between REST catalogs without this method is LoadView + CreateView. That approach is lossy: CreateView resets version-id to 1, reassigns default-catalog to the target catalog name, and creates a new UUID — producing a new view rather than a registration of the existing one. RegisterView avoids all of this by pointing the target catalog at the existing metadata file, exactly as RegisterTable does for tables.
   
   ## Changes
   
   - catalog/rest/rest.go: RegisterView on *Catalog — POSTs {name, metadata-location} to /namespaces/{ns}/register-view, parses the response through the existing loadViewResponse path, maps 404 → ErrNoSuchNamespace and 409 → ErrViewAlreadyExists.
   - catalog/rest/rest_test.go: three test cases covering the 200, 404, and 409 responses, following the same structure as the existing TestRegisterTable{200,404,409} tests.
   
   ## Related
   
   - Java implementation: apache/iceberg#14868
   - REST OpenAPI spec: open-api/rest-catalog-open-api.yaml — operationId registerView
   - Mailing list discussion: https://lists.apache.org/thread/mxqz0fp6vz3nt7nl70wgrz6d2gr41rzj


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(rest): add RegisterView to REST catalog [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #753:
URL: https://github.com/apache/iceberg-go/pull/753


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org