You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/09/09 23:45:24 UTC
[GitHub] [iceberg] rdblue commented on a change in pull request #1435: Create the default database if it does not exist when opening the catalog
rdblue commented on a change in pull request #1435:
URL: https://github.com/apache/iceberg/pull/1435#discussion_r485981121
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -111,6 +111,12 @@ public FlinkCatalog(
@Override
public void open() throws CatalogException {
+ // Create the default database if it does not exist.
+ try {
+ createDatabase(getDefaultDatabase(), ImmutableMap.of(), true);
+ } catch (DatabaseAlreadyExistException e) {
+ throw new CatalogException(e);
Review comment:
Does this do what you want? It seems like if the intent is `IF NOT EXISTS` then you should ignore the `DatabaseAlreadyExistException`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org