{"record":{"id":"2e6e3ec2ea9b32d8","repo":"apache/seatunnel","slug":"not-supported-for-list-databases-for-iris","errorCode":null,"errorMessage":"Not supported for list databases for iris","messagePattern":"Not supported for list databases for iris","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java","lineNumber":139,"sourceCode":"                        .dataType(typeName)\n                        .length(columnLength)\n                        .precision(columnPrecision)\n                        .scale(columnScale)\n                        .nullable(isNullable)\n                        .defaultValue(defaultValue)\n                        .comment(columnComment)\n                        .build();\n        return IrisTypeConverter.INSTANCE.convert(typeDefine);\n    }\n\n    @Override\n    protected String getOptionTableName(TablePath tablePath) {\n        return tablePath.getSchemaAndTableName();\n    }\n\n    @Override\n    public boolean databaseExists(String databaseName) throws CatalogException {\n        throw new SeaTunnelException(\"Not supported for list databases for iris\");\n    }\n\n    @Override\n    public boolean tableExists(TablePath tablePath) throws CatalogException {\n        try {\n            return querySQLResultExists(\n                    this.getUrlFromDatabaseName(tablePath.getDatabaseName()),\n                    getTableWithConditionSql(tablePath));\n        } catch (SQLException e) {\n            throw new SeaTunnelException(\"Failed to querySQLResult\", e);\n        }\n    }\n\n    @Override\n    protected String getTableWithConditionSql(TablePath tablePath) {\n        return String.format(\n                getListTableSql(tablePath.getSchemaName()) + \" and TABLE_NAME = '%s'\",\n                tablePath.getTableName());","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/iris/IrisCatalog.java#L121-L157","documentation":"IrisCatalog.databaseExists always throws SeaTunnelException because the InterSystems IRIS catalog does not support enumerating/listing databases. Any code path that checks whether a database exists is unconditionally unsupported for this catalog.","triggerScenarios":"Calling catalog.databaseExists(name) directly, or any framework code that probes database existence before operations (e.g. createTable pre-checks, catalog validation).","commonSituations":"Using IRIS with code paths written for MySQL/PostgreSQL-style catalogs that call databaseExists; auto-creation logic checking database existence before creating tables; schema-sync tooling that enumerates databases.","solutions":["Do not call databaseExists on IrisCatalog; treat every table as belonging to the default database","Use tableExists(TablePath) instead to check specific table availability","Override databaseExists in a custom IRIS catalog subclass with a no-op returning true or a supported query","If database isolation is required, use a catalog for a database that supports listing (e.g. MySQL/PostgreSQL)"],"exampleFix":"// before\nif (catalog.databaseExists(dbName)) { ... }\n// after\nif (catalog.tableExists(TablePath.of(dbName, tableName))) { ... }","handlingStrategy":"fallback","validationCode":"if (catalog instanceof IrisCatalog) {\n    // databaseExists unsupported; use tableExists instead\n}","typeGuard":null,"tryCatchPattern":"try {\n    return catalog.databaseExists(dbName);\n} catch (SeaTunnelException e) {\n    LOG.warn(\"databaseExists unsupported for IRIS; falling back to tableExists\");\n    return catalog.tableExists(TablePath.of(dbName, defaultTable));\n}","preventionTips":["Gate databaseExists calls on catalog type before invoking","Prefer tableExists(TablePath) for IRIS catalogs","Do not build generic schema-sync tooling that assumes listDatabases/databaseExists support for all JDBC catalogs","Document IRIS catalog limitations in your team's connector notes"],"tags":["jdbc","iris","unsupported","catalog"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}