{"record":{"id":"7ac98951e0e0e470","repo":"prestodb/presto","slug":"rowdeleted","errorCode":null,"errorMessage":"rowDeleted","messagePattern":"rowDeleted","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"info","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":767,"sourceCode":"    @Override\n    public boolean rowUpdated()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"rowUpdated\");\n    }\n\n    @Override\n    public boolean rowInserted()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"rowInserted\");\n    }\n\n    @Override\n    public boolean rowDeleted()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"rowDeleted\");\n    }\n\n    @Override\n    public void updateNull(int columnIndex)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateNull\");\n    }\n\n    @Override\n    public void updateBoolean(int columnIndex, boolean x)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"updateBoolean\");\n    }\n\n    @Override\n    public void updateByte(int columnIndex, byte x)","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L749-L785","documentation":"PrestoResultSet.rowDeleted() is an unimplemented JDBC method. Presto result sets are immutable, read-only snapshots of query output, so detecting deletes is meaningless and the driver throws SQLFeatureNotSupportedException unconditionally. The thrown exception is part of the driver's deliberate stubbing of updatable/row-visibility ResultSet APIs.","triggerScenarios":"Calling rs.rowDeleted() on any ResultSet produced by the Presto JDBC driver while iterating or post-processing rows.","commonSituations":"Portable JDBC data-access layers that call rowDeleted() on every row to filter out phantom rows; code ported from MySQL/Oracle (where this is meaningful) to Presto.","solutions":["Remove the rowDeleted() call; deletes can never be detected in a read-only Presto result set","Gate the call on DatabaseMetaData.deletesAreDetected(type) returning true (it is false for Presto)","If delete feedback is needed, execute DELETE statements and inspect update counts instead","Catch SQLFeatureNotSupportedException and treat the row as not deleted when using generic JDBC code"],"exampleFix":"// before\nif (rs.rowDeleted()) continue;\n// after\nif (meta.deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY) && rs.rowDeleted()) continue;","handlingStrategy":"try-catch","validationCode":"DatabaseMetaData md = conn.getMetaData();\nboolean supported = md.deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY); // false for Presto\nif (!supported) { /* skip rowDeleted() */ }","typeGuard":"boolean supportsDeleteDetection(Connection c) {\n    try { return c.getMetaData().deletesAreDetected(ResultSet.TYPE_FORWARD_ONLY); }\n    catch (SQLException e) { return false; }\n}","tryCatchPattern":"try {\n    if (rs.rowDeleted()) { continue; }\n} catch (SQLFeatureNotSupportedException e) {\n    // Presto result sets are read-only; nothing can be deleted\n}","preventionTips":["Gate rowDeleted() behind DatabaseMetaData.deletesAreDetected","Do not port visibility-check loops from other JDBC drivers to Presto unchanged","Run DELETE statements and check update counts when delete feedback is needed","Keep Presto access read-only by design"],"tags":["jdbc","unsupported-feature","sqlfeaturenotsupportedexception","read-only-resultset"],"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"}