{"record":{"id":"7881499f90e00878","repo":"prestodb/presto","slug":"setrowid","errorCode":null,"errorMessage":"setRowId","messagePattern":"setRowId","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"warning","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java","lineNumber":568,"sourceCode":"    @Override\n    public void setURL(int parameterIndex, URL x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"setURL\");\n    }\n\n    @Override\n    public ParameterMetaData getParameterMetaData()\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"getParameterMetaData\");\n    }\n\n    @Override\n    public void setRowId(int parameterIndex, RowId x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"setRowId\");\n    }\n\n    @Override\n    public void setNString(int parameterIndex, String value)\n            throws SQLException\n    {\n        setString(parameterIndex, value);\n    }\n\n    @Override\n    public void setNCharacterStream(int parameterIndex, Reader value, long length)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"setNCharacterStream\");\n    }\n\n    @Override\n    public void setNClob(int parameterIndex, NClob value)","sourceCodeStart":550,"sourceCodeEnd":586,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java#L550-L586","documentation":"PrestoPreparedStatement.setRowId is a stub that unconditionally throws SQLFeatureNotSupportedException. The Presto JDBC driver cannot bind java.sql.RowId parameters, since Presto tables do not expose JDBC ROWID locators. Binding must be done with an actual supported value type.","triggerScenarios":"Calling PreparedStatement.setRowId(int parameterIndex, java.sql.RowId x) on a PrestoPreparedStatement; JDBC code that retrieves a RowId from another database and passes it into a Presto statement.","commonSituations":"Porting OLTP JDBC code (Oracle/DB2 ROWID patterns) to Presto; frameworks that bind RowId columns for positioned updates.","solutions":["Bind the row identifier as its logical value with setString or setObject instead of a RowId handle","Remove positioned-update logic; Presto does not support WHERE CURRENT OF style RowId updates","Restructure the query to reference primary key columns directly"],"exampleFix":"// before\npstmt.setRowId(1, rowId);\n// after\npstmt.setString(1, rowId.toString()); // or use the PK column value","handlingStrategy":"fallback","validationCode":"if (value instanceof java.sql.RowId) { pstmt.setString(parameterIndex, ((java.sql.RowId) value).getBytes().toString()); } else { pstmt.setObject(parameterIndex, value); }","typeGuard":"boolean isBindableDirectly(Object v) { return !(v instanceof java.sql.RowId || v instanceof java.sql.SQLXML || v instanceof java.sql.NClob); }","tryCatchPattern":"try { pstmt.setRowId(idx, rowId); } catch (SQLFeatureNotSupportedException e) { pstmt.setString(idx, new String(rowId.getBytes(), StandardCharsets.UTF_8)); }","preventionTips":["Avoid ROWID-based positioned updates in Presto; use primary key columns","Treat RowId as database-local only — never pass across engines","Model row identifiers as logical (string/long) keys in Presto schemas"],"tags":["jdbc","unsupported-feature","rowid"],"backgroundTag":"sqlfeaturenotsupported","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"}