cloventt commented on PR #16072: URL: https://github.com/apache/iceberg/pull/16072#issuecomment-4426772503
Wouldn't this approach still cause the connector to crash if `glue.CreateDatabase` permission does not exist? I don't think this solves the problem. Ideally we want the connector to proceed if the database already exists. There is another approach that would work. The outer method is called `createNamespaceIfNotExist()`, which to me implies that we should first test to see if the namespace exists, and if it not, create it. We could call `glue.getDatabase()` first, and then only if we receive a `EntityNotFoundException` then we proceed to call `glue.createDatabase()`. This would mean that if the Glue database already exists the connector would proceed without ever attempting to invoke `glue.createDatabase`. -- 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]
