apache/seatunnel · warning

The catalog: is not supported the getTableWithConditionSql…

Error message

The catalog: {} is not supported the getTableWithConditionSql for tableExists 

What it means

AbstractJdbcCatalog.tableExists() first tries an efficient existence probe via getTableWithConditionSql(). When that SQL builder method is not implemented by a concrete catalog, the code throws SeaTunnelRuntimeException with UNSUPPORTED_METHOD, which tableExists catches and logs this warning before falling back to a slower listTables().contains() check. It is a degraded-mode notice, not a failure; the existence answer is still returned.

Solutions

  1. Ignore the warning if tableExists still returns the correct result via the fallback path.
  2. Implement getTableWithConditionSql(String) in the concrete catalog to enable the fast existence probe.
  3. Upgrade SeaTunnel to a version where the dialect implements getTableWithConditionSql.
  4. Open/implement a dialect-specific override and verify the generated condition SQL against the target database.

Example fix

// before (default base impl)
protected String getTableWithConditionSql(TablePath tablePath) {
    throw new SeaTunnelRuntimeException(UNSUPPORTED_METHOD, ...);
}
// after (dialect override)
@Override
protected String getTableWithConditionSql(TablePath tablePath) {
    return String.format("SELECT 1 FROM %s WHERE 1=0", getTableName(tablePath));
}
Defensive patterns

Strategy: fallback

Validate before calling

// Prefer catalogs that support the fast probe; feature-detect via log/behavior
if (catalog.getClass().getSimpleName().equals("AbstractJdbcCatalog")) {
    LOG.info("Catalog {} uses listTables() fallback for tableExists", catalogName);
}

Try / catch

// tableExists already handles it internally; just accept the result
boolean exists = catalog.tableExists(tablePath); // true/false either way

Prevention

When it happens

Trigger: Calling tableExists/getTable/createTable/dropTable/truncateTable on a catalog whose override of getTableWithConditionSql throws UNSUPPORTED_METHOD (the default AbstractJdbcCatalog implementation or a dialect that has not implemented it).

Common situations: Using a partially implemented catalog dialect (e.g., newer or less-common databases like Kingbase/Xugu variants) where only the base-class SQL methods exist; invoking table-existence checks during catalog-based sink auto-creation on such dialects.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/df5e2853163d1a0f. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/AbstractJdbcCatalog.java:440

        }
        String dbUrl = getUrlFromDatabaseName(databaseName);
        try {
            return queryString(dbUrl, getListViewSql(databaseName), this::getTableName);
        } catch (Exception e) {
            throw new CatalogException(
                    String.format("Failed listing database in catalog %s", catalogName), e);
        }
    }

    @Override
    public boolean tableExists(TablePath tablePath) throws CatalogException {
        String databaseName = tablePath.getDatabaseName();
        try {
            return querySQLResultExists(
                    this.getUrlFromDatabaseName(databaseName), getTableWithConditionSql(tablePath));
        } catch (SeaTunnelRuntimeException e1) {
            if (e1.getSeaTunnelErrorCode().getCode().equals(UNSUPPORTED_METHOD.getCode())) {
                log.warn(
                        "The catalog: {} is not supported the getTableWithConditionSql for tableExists ",
                        this.catalogName);
                try {
                    return databaseExists(tablePath.getDatabaseName())
                            && listTables(tablePath.getDatabaseName())
                                    .contains(getTableName(tablePath));
                } catch (DatabaseNotExistException e2) {
                    return false;
                }
            }
            throw e1;
        } catch (SQLException e) {
            throw new SeaTunnelException("Failed to querySQLResult", e);
        }
    }

    @Override
    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)

View on GitHub (pinned to cf67b549a7)