prestodb/presto · warning · SQLFeatureNotSupportedException

version columns not supported

Error message

version columns not supported

What it means

PrestoDatabaseMetaData.getVersionColumns() unconditionally throws SQLFeatureNotSupportedException. This method is meant to report columns tracking row version/timestamp for optimistic concurrency; Presto tables have no such pseudo-columns, so the driver rejects the call.

Solutions

  1. Catch SQLFeatureNotSupportedException and treat as no version columns
  2. Model versioning explicitly with your own updated_at/version column in table schemas
  3. Skip this metadata call for Presto in generic introspection loops
Defensive patterns

Strategy: try-catch

Validate before calling

if (md.getDatabaseProductName().contains("Presto")) {
    return Collections.emptyList(); // no version columns
}

Try / catch

try (ResultSet rs = md.getVersionColumns(catalog, schema, table)) {
    return readVersionColumns(rs);
} catch (SQLFeatureNotSupportedException e) {
    return Collections.emptyList();
}

Prevention

When it happens

Trigger: Calling DatabaseMetaData.getVersionColumns(catalog, schema, table); optimistic-locking frameworks querying which columns track row updates.

Common situations: JPA/Hibernate-style tooling resolving version columns generically; migration tools probing full DatabaseMetaData surface; ORMs configured for updatable result sets.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/9fc4779560fcc56b. Report an issue: GitHub.

Appendix: source

Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDatabaseMetaData.java:1014

    @Override
    public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("privileges not supported");
    }

    @Override
    public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("row identifiers not supported");
    }

    @Override
    public ResultSet getVersionColumns(String catalog, String schema, String table)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("version columns not supported");
    }

    @Override
    public ResultSet getPrimaryKeys(String catalog, String schema, String table)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("primary keys not supported");
    }

    @Override
    public ResultSet getImportedKeys(String catalog, String schema, String table)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("imported keys not supported");
    }

    @Override
    public ResultSet getExportedKeys(String catalog, String schema, String table)

View on GitHub (pinned to 55bb57d202)