hsiang-c opened a new pull request, #13434:
URL: https://github.com/apache/iceberg/pull/13434

   Related to: https://github.com/apache/iceberg/issues/1533
   
   ### Context
   - We're registering existing Iceberg tables to `HiveCatalog` and realize 
that the `metadata.json` files used are deleted when the target namespace 
doesn't exist.
   - When the target namespace doesn't exist, an `ValidationException` is 
thrown from the `doCommit()` method of `HiveTableOperations`, as 
https://github.com/apache/iceberg/issues/1533 indicated. The `finally` block of 
the `doCommit` method will therefore delete the `metadata.json`.
   ```java
       finally {
         HiveOperationsBase.cleanupMetadataAndUnlock(io(), commitStatus, 
newMetadataLocation, lock);
       }
   ```
   
   ### Proposed changes
    - In `RegisterTableProcedure`, if the catalog used implements 
`SupportsNamespaces`, we fails the `register_table` procedure when the target 
namespace doesn't exist.


-- 
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

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

Reply via email to