{"record":{"id":"ba925dbf94e0b8e9","repo":"prestodb/presto","slug":"refreshrow","errorCode":null,"errorMessage":"refreshRow","messagePattern":"refreshRow","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":1061,"sourceCode":"    @Override\n    public void updateRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateRow\");\n    }\n\n    @Override\n    public void deleteRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"deleteRow\");\n    }\n\n    @Override\n    public void refreshRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"refreshRow\");\n    }\n\n    @Override\n    public void cancelRowUpdates()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"cancelRowUpdates\");\n    }\n\n    @Override\n    public void moveToInsertRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"moveToInsertRow\");\n    }\n\n    @Override\n    public void moveToCurrentRow()","sourceCodeStart":1043,"sourceCodeEnd":1079,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L1043-L1079","documentation":"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\").","triggerScenarios":"Calling refreshRow() on a PrestoResultSet to reload the current row's values mid-iteration.","commonSituations":"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.","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"],"exampleFix":"// before\nrs.refreshRow();\nString status = rs.getString(\"status\");\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\n        \"SELECT status FROM orders WHERE id = ?\")) {\n    ps.setLong(1, rs.getLong(\"id\"));\n    try (ResultSet fresh = ps.executeQuery()) {\n        fresh.next();\n        status = fresh.getString(\"status\");\n    }\n}","handlingStrategy":"fallback","validationCode":"if (rs.getConcurrency() == ResultSet.CONCUR_READ_ONLY) {\n    // re-query the row instead of rs.refreshRow()\n}","typeGuard":null,"tryCatchPattern":"try {\n    rs.refreshRow();\n} catch (SQLFeatureNotSupportedException e) {\n    // re-execute a point query for the current row's key\n}","preventionTips":["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"],"tags":["jdbc","presto","unsupported-feature","sqlfeaturenotsupported"],"backgroundTag":"unsupported-jdbc-feature","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}