Skip to content

Commit

Permalink
Core: check catalog and schema for JdbcCatalog initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyouze committed Dec 24, 2024
1 parent dbd7d1c commit 71d0c9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ private void initializeCatalogTables() {
DatabaseMetaData dbMeta = conn.getMetaData();
ResultSet tableExists =
dbMeta.getTables(
null /* catalog name */,
null /* schemaPattern */,
conn.getCatalog() /* catalog name */,
conn.getSchema() /* schemaPattern */,
JdbcUtil.CATALOG_TABLE_VIEW_NAME /* tableNamePattern */,
null /* types */);
if (tableExists.next()) {
Expand All @@ -181,8 +181,8 @@ private void initializeCatalogTables() {
DatabaseMetaData dbMeta = conn.getMetaData();
ResultSet tableExists =
dbMeta.getTables(
null /* catalog name */,
null /* schemaPattern */,
conn.getCatalog() /* catalog name */,
conn.getSchema() /* schemaPattern */,
JdbcUtil.NAMESPACE_PROPERTIES_TABLE_NAME /* tableNamePattern */,
null /* types */);

Expand Down

0 comments on commit 71d0c9f

Please sign in to comment.