{"record":{"id":"ddeb54d56987fa46","repo":"prestodb/presto","slug":"updatedouble","errorCode":null,"errorMessage":"updateDouble","messagePattern":"updateDouble","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":823,"sourceCode":"    @Override\n    public void updateLong(int columnIndex, long x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateLong\");\n    }\n\n    @Override\n    public void updateFloat(int columnIndex, float x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateFloat\");\n    }\n\n    @Override\n    public void updateDouble(int columnIndex, double x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateDouble\");\n    }\n\n    @Override\n    public void updateBigDecimal(int columnIndex, BigDecimal x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateBigDecimal\");\n    }\n\n    @Override\n    public void updateString(int columnIndex, String x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateString\");\n    }\n\n    @Override\n    public void updateBytes(int columnIndex, byte[] x)","sourceCodeStart":805,"sourceCodeEnd":841,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L805-L841","documentation":"PrestoResultSet.updateDouble(columnIndex, x) is an unimplemented stub that always throws SQLFeatureNotSupportedException. The Presto JDBC driver does not implement updatable result sets; this method exists only to satisfy the JDBC interface and can never return normally. Writes must be expressed as SQL DML statements.","triggerScenarios":"Calling rs.updateDouble(i, value) on any Presto ResultSet, usually followed by updateRow() or insertRow().","commonSituations":"Generic JDBC frameworks and data-grid editors that modify cells in place; application code reused from traditional RDBMS deployments and run against Presto.","solutions":["Replace with an UPDATE statement using PreparedStatement.setDouble","Route all writes through SQL and keep the ResultSet strictly read-only","Skip updateXxx calls when supportsResultSetConcurrency(CONCUR_UPDATABLE) reports false","Catch SQLFeatureNotSupportedException and translate it to a user-facing 'result sets are read-only' message"],"exampleFix":"// before\nrs.updateDouble(\"price\", 19.99);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET price = ? WHERE id = ?\")) {\n    ps.setDouble(1, 19.99);\n    ps.setLong(2, id);\n    ps.executeUpdate();\n}","handlingStrategy":"validation","validationCode":"DatabaseMetaData md = conn.getMetaData();\nif (!md.supportsResultSetConcurrency(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE)) {\n    // use PreparedStatement UPDATE instead of rs.updateDouble\n}","typeGuard":"boolean isUpdatable(ResultSet rs) throws SQLException {\n    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;\n}","tryCatchPattern":"try {\n    rs.updateDouble(columnIndex, value);\n} catch (SQLFeatureNotSupportedException e) {\n    // route to SQL UPDATE fallback\n}","preventionTips":["Use PreparedStatement.setDouble with UPDATE for numeric writes","Treat all Presto result sets as forward-only, read-only","Do not adopt JDBC tooling that requires CONCUR_UPDATABLE with Presto","Catch SQLFeatureNotSupportedException once in shared JDBC utilities"],"tags":["jdbc","unsupported-feature","updatable-resultset","sqlfeaturenotsupportedexception"],"backgroundTag":"sqlfeaturenotsupported-unsupported-jdbc-method","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"}