richiebachala commented on PR #2173: URL: https://github.com/apache/iceberg-go/pull/2173#issuecomment-6147268005
Thanks @zeroshade, good catch. Went with the first option in 66a98b4. Checking the Java side settled it: the catalogs genuinely disagree. `JdbcCatalog` (behind the REST fixture) and `InMemoryCatalog` both start `renameTable` with `if (from.equals(to)) return;`, so a self-rename is a no-op success, while `HiveCatalog` has no such check and throws `AlreadyExistsException`. Neither the REST spec nor Java's `CatalogTests` defines the outcome; `CatalogTests` has no self-rename case at all. So `RenameTableToSelf` now asserts only the shared invariant: - the rename succeeds or returns `ErrTableAlreadyExists`; any other error fails; - either way, the table still loads with its original UUID **and** metadata location, and `ListTables` shows it exactly once. The doc comment records the divergence. Verified against all four catalogs: REST passes on the no-op path; Hive and SQL pass on the rejection path. `go test ./catalog/...` and lint pass. I'll open the follow-up issue proposing a spec clarification for `from == to`, and link it from the test once it exists. -- 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]
