Revanth14 opened a new pull request, #2713: URL: https://github.com/apache/iceberg-go/pull/2713
Closes #2712 ## Problem The Hive catalog implemented every view operation except `RenameView`, so `catalog.As[catalog.RenamableViewCatalog]` failed for Hive. Java's `HiveCatalog.renameView` supports it. ## Fix `RenameView` follows `RenameTable`: check the target database exists, take HMS locks on both names, re-read the source under the lock and confirm it is an Iceberg view with unchanged metadata, reject any existing object at the target (`ErrViewAlreadyExists` for a view, `ErrTableAlreadyExists` otherwise), then `AlterTable`. As in Java, renaming a view to itself is rejected. Unlike Java, the rename holds HMS locks, matching Go's `RenameTable`. Docs now list Hive as supporting view rename. ## Testing Unit tests against the mock metastore cover the rename across databases, destination conflicts, self-rename, a concurrently created destination, metadata changes and drops under the lock, non-view sources, a missing namespace, lock failure and invalid identifiers; removing each check fails its test. `TestHiveIntegrationRenameView` covers a real HMS. gofmt, `go vet` (with and without `-tags integration`), `go test -race ./...` and golangci-lint v2.14.0 are clean locally; the integration test was not run locally. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
