Open FANNG1 opened 3 weeks ago
The main problem is we may get table object from other databases for MYSQL, PG works well, and not sure whether other RMDB works well.
DatabaseMetaData dbMeta = conn.getMetaData();
ResultSet tableExists =
dbMeta.getTables(
null /* catalog name */,
null /* schemaPattern */,
JdbcUtil.CATALOG_TABLE_VIEW_NAME /* tableNamePattern */,
null /* types */);
if (tableExists.next()) {
return true;
}
There may be two options:
CREATE TABLE IF NOT EXISTS
to create table directly.I prefer to use Option2 for it is more extensible for other RDMS and the performance decrease may minor
Apache Iceberg version
1.6.1 (latest release)
Query engine
Other
Please describe the bug 🐞
If I setup a Jdbc catalog with MYSQL URI like
jdbc:mysql://127.0.0.1:3307/db1
, it works fines. but when I create another jdbc catalog with different database likejdbc:mysql://127.0.0.1:3307/db2
, the query was failed because Iceberg metadata table is not setup in db2.INIT_CATALOG_TABLES_PROPERTY
are both enabled.environment:
Willingness to contribute