rdblue commented on a change in pull request #3275:
URL: https://github.com/apache/iceberg/pull/3275#discussion_r731159330
##########
File path: core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java
##########
@@ -107,15 +108,30 @@ private void initializeCatalogTables() throws
InterruptedException, SQLException
LOG.trace("Creating database tables (if missing) to store iceberg
catalog");
connections.run(conn -> {
DatabaseMetaData dbMeta = conn.getMetaData();
- ResultSet tableExists = dbMeta.getTables(null, null,
JdbcUtil.CATALOG_TABLE_NAME, null);
+ ResultSet tableExists = dbMeta.getTables(null, null,
+ JdbcUtil.CATALOG_TABLE_NAME, null);
if (tableExists.next()) {
return true;
}
- LOG.debug("Creating table {} to store iceberg catalog",
JdbcUtil.CATALOG_TABLE_NAME);
+ LOG.debug("Creating table {} to store iceberg catalog tables",
JdbcUtil.CATALOG_TABLE_NAME);
return conn.prepareStatement(JdbcUtil.CREATE_CATALOG_TABLE).execute();
});
+
+ connections.run(conn -> {
+ DatabaseMetaData dbMeta = conn.getMetaData();
+ ResultSet tableExists = dbMeta.getTables(null, null,
+ JdbcUtil.CATALOG_NAMESPACE_TABLE_NAME, null);
+
+ if (tableExists.next()) {
+ return true;
+ }
+
+ LOG.debug("Creating table {} to store iceberg catalog namespaces",
+ JdbcUtil.CATALOG_NAMESPACE_TABLE_NAME);
Review comment:
Style: This one is also off.
--
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]