{"record":{"id":"fcff5e5e81f57fd0","repo":"prestodb/presto","slug":"updatefloat","errorCode":null,"errorMessage":"updateFloat","messagePattern":"updateFloat","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":816,"sourceCode":"    @Override\n    public void updateInt(int columnIndex, int x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateInt\");\n    }\n\n    @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)","sourceCodeStart":798,"sourceCodeEnd":834,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L798-L834","documentation":"PrestoResultSet.updateFloat(columnIndex, x) is an unimplemented stub that unconditionally throws SQLFeatureNotSupportedException. Result sets in Presto are immutable server-computed snapshots; the driver never applies in-place edits. This is the documented, intentional behavior of all updateXxx stubs in PrestoResultSet.","triggerScenarios":"Calling rs.updateFloat(i, value) on a Presto ResultSet, typically ahead of updateRow().","commonSituations":"Scientific/numeric data-editing tools writing values back through the ResultSet; code ported from updatable-ResultSet workflows on other databases.","solutions":["Persist the float with an UPDATE statement via PreparedStatement.setFloat","Keep writes in SQL and treat all Presto ResultSets as CONCUR_READ_ONLY","Feature-detect with supportsResultSetConcurrency before calling any updateXxx","Catch SQLFeatureNotSupportedException in shared JDBC layers and fall back to statement-based writes"],"exampleFix":"// before\nrs.updateFloat(\"score\", 3.5f);\nrs.updateRow();\n// after\ntry (PreparedStatement ps = conn.prepareStatement(\"UPDATE t SET score = ? WHERE id = ?\")) {\n    ps.setFloat(1, 3.5f);\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.updateFloat\n}","typeGuard":"boolean isUpdatable(ResultSet rs) throws SQLException {\n    return rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE;\n}","tryCatchPattern":"try {\n    rs.updateFloat(columnIndex, value);\n} catch (SQLFeatureNotSupportedException e) {\n    // route to SQL UPDATE fallback\n}","preventionTips":["Persist floats via UPDATE statements, never updateXxx","Keep Presto access strictly read-only","Check DatabaseMetaData capabilities at startup","Wrap updateXxx calls in a helper that fails with a clear read-only message"],"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"}