prestodb/presto · error · SQLFeatureNotSupportedException

updateBoolean

Error message

updateBoolean

What it means

PrestoResultSet.updateBoolean(columnIndex, x) is an unimplemented stub that always throws SQLFeatureNotSupportedException. Presto does not expose updatable result sets; column values in a result set come from query evaluation and cannot be modified through the driver. This is intentional driver behavior, not a transient failure.

Source

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

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

    @Override
    public void updateNull(int columnIndex)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("updateNull");
    }

    @Override
    public void updateBoolean(int columnIndex, boolean x)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("updateBoolean");
    }

    @Override
    public void updateByte(int columnIndex, byte x)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("updateByte");
    }

    @Override
    public void updateShort(int columnIndex, short x)
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("updateShort");
    }

    @Override
    public void updateInt(int columnIndex, int x)

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Replace with an UPDATE SQL statement through a PreparedStatement
  2. Perform the boolean conversion in application code and persist it with UPDATE table SET col = ?
  3. Request CONCUR_READ_ONLY up front and keep all writes in SQL
  4. Catch SQLFeatureNotSupportedException in generic paths and fall back to statement-based updates

Example fix

// before
rs.updateBoolean("active", true);
rs.updateRow();
// after
try (PreparedStatement ps = conn.prepareStatement("UPDATE t SET active = ? WHERE id = ?")) {
    ps.setBoolean(1, true);
    ps.setLong(2, id);
    ps.executeUpdate();
}
Defensive patterns

Strategy: validation

Validate before calling

DatabaseMetaData md = conn.getMetaData();
if (!md.supportsResultSetConcurrency(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE)) {
    // use PreparedStatement UPDATE instead of rs.updateBoolean
}

Type guard

boolean isUpdatable(ResultSet rs) throws SQLException {
    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;
}

Try / catch

try {
    rs.updateBoolean(columnIndex, value);
} catch (SQLFeatureNotSupportedException e) {
    // route to SQL UPDATE fallback
}

Prevention

When it happens

Trigger: Calling rs.updateBoolean(i, value) on a Presto ResultSet, usually followed by updateRow().

Common situations: Porting JDBC code from updatable-ResultSet workflows on traditional databases; frameworks that write cell edits back through the ResultSet.

Related errors


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