prestodb/presto · error · SQLFeatureNotSupportedException
refreshRow
Error message
refreshRow
What it means
refreshRow() re-reads the current row from the database and is only meaningful for scrollable/updatable result sets. Presto's PrestoResultSet does not support it and always throws SQLFeatureNotSupportedException("refreshRow").
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java:1061
@Override
public void updateRow()
throws SQLException
{
throw new SQLFeatureNotSupportedException("updateRow");
}
@Override
public void deleteRow()
throws SQLException
{
throw new SQLFeatureNotSupportedException("deleteRow");
}
@Override
public void refreshRow()
throws SQLException
{
throw new SQLFeatureNotSupportedException("refreshRow");
}
@Override
public void cancelRowUpdates()
throws SQLException
{
throw new SQLFeatureNotSupportedException("cancelRowUpdates");
}
@Override
public void moveToInsertRow()
throws SQLException
{
throw new SQLFeatureNotSupportedException("moveToInsertRow");
}
@Override
public void moveToCurrentRow()View on GitHub (pinned to 55bb57d202)
Solutions
- Re-execute the query (or a narrowed query with WHERE key = currentKey) to get fresh values
- Restructure to avoid needing row refreshes — Presto queries are point-in-time snapshots anyway
- Wrap in a capability check and degrade to re-query semantics
Example fix
// before
rs.refreshRow();
String status = rs.getString("status");
// after
try (PreparedStatement ps = conn.prepareStatement(
"SELECT status FROM orders WHERE id = ?")) {
ps.setLong(1, rs.getLong("id"));
try (ResultSet fresh = ps.executeQuery()) {
fresh.next();
status = fresh.getString("status");
}
} Defensive patterns
Strategy: fallback
Validate before calling
if (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY) {
// re-query the row instead of rs.refreshRow()
} Try / catch
try {
rs.refreshRow();
} catch (SQLFeatureNotSupportedException e) {
// re-execute a point query for the current row's key
} Prevention
- Remember Presto results are point-in-time snapshots; refresh via re-query
- Avoid scroll-sensitive result set semantics in Presto code
- Fetch keys first, then re-read rows that need fresh values
When it happens
Trigger: Calling refreshRow() on a PrestoResultSet to reload the current row's values mid-iteration.
Common situations: Long-running result processing that wants fresh column values; code ported from drivers supporting TYPE_SCROLL_SENSITIVE result sets; generic JDBC frameworks probing refresh behavior.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/ba925dbf94e0b8e9.
Report an issue: GitHub.