haizhou-zhao opened a new issue, #11154: URL: https://github.com/apache/iceberg/issues/11154
### Query engine Spark ### Question # Background Spark will pass `catalog` name to `renameTable` operations as part of its `to` identifier, and if that `catalog` name is not handled (i.e. stripped), then it will be treated as part of the `namespace` name. This will cause spark to rename the table into undesirable namespaces (or even just encounter namespace not exist issue and fail). Traditional catalog like HiveCatalog has special pre-validation in renameTable operation for this purpose (ref: https://github.com/apache/iceberg/pull/1156), while RESTCatalog and JdbcCatalog (ref REST server implementation is adapter on JdbcCatalog) does not have it. This is causing spark command like `ALTER TABLE ${tbl} RENAME TO ${tbl_rename}` to fail on RESTCatalog/JdbcCatalog such as in this integration test: https://github.com/apache/iceberg/blob/316f0a1/spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/sql/TestAlterTable.java#L296 Part of https://github.com/apache/iceberg/issues/11079 # Questions 1. Should RESTCatalog (client) validate `to` identifier in `renameTable` operation just like what HiveCatalog is doing? 2. If RESTCatalog, like hive, always strip the first level of namespace for `to` identifier, then what if the intention is to rename to a legitimate multi-level namespace? -- 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-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org