prestodb/presto · error · SQLFeatureNotSupportedException

rowUpdated

Error message

rowUpdated

What it means

PrestoResultSet throws SQLFeatureNotSupportedException("rowUpdated") because Presto results are immutable snapshots of query output; there is no updatable-row concept, so the JDBC row-change detection methods are unsupported stubs.

Source

Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java:753

            throws SQLException
    {
        checkOpen();
        return TYPE_FORWARD_ONLY;
    }

    @Override
    public int getConcurrency()
            throws SQLException
    {
        checkOpen();
        return CONCUR_READ_ONLY;
    }

    @Override
    public boolean rowUpdated()
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("rowUpdated");
    }

    @Override
    public boolean rowInserted()
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("rowInserted");
    }

    @Override
    public boolean rowDeleted()
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("rowDeleted");
    }

    @Override
    public void updateNull(int columnIndex)

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Remove rowUpdated() calls; Presto result sets can never report updates
  2. Skip change-detection logic when the underlying connection is a Presto connection
  3. Track changes at the database level with version/timestamp columns queried in SQL instead

Example fix

// before
if (rs.rowUpdated()) { refresh(rs); }
// after
// Presto result sets are static; no update detection is possible
process(rs);
Defensive patterns

Strategy: try-catch

Validate before calling

int type = stmt.getResultSetType();
if (type != ResultSet.TYPE_FORWARD_ONLY && !conn.getMetaData().supportsResultSetType(type)) { /* skip change detection */ }

Try / catch

try { rs.rowUpdated(); } catch (SQLFeatureNotSupportedException e) { /* treat as false; Presto results are immutable */ }

Prevention

When it happens

Trigger: Calling ResultSet.rowUpdated() on a PrestoResultSet at any time.

Common situations: Generic JDBC result-set wrappers that call rowUpdated/rowInserted/rowDeleted during iteration for change detection on updatable result sets.

Related errors


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