{"record":{"id":"e530798c7d048ead","repo":"prestodb/presto","slug":"absolute","errorCode":null,"errorMessage":"absolute","messagePattern":"absolute","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java","lineNumber":678,"sourceCode":"    @Override\n    public boolean last()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"last\");\n    }\n\n    @Override\n    public int getRow()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"getRow\");\n    }\n\n    @Override\n    public boolean absolute(int row)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"absolute\");\n    }\n\n    @Override\n    public boolean relative(int rows)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"relative\");\n    }\n\n    @Override\n    public boolean previous()\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"previous\");\n    }\n\n    @Override\n    public void setFetchDirection(int direction)","sourceCodeStart":660,"sourceCodeEnd":696,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoResultSet.java#L660-L696","documentation":"PrestoResultSet throws SQLFeatureNotSupportedException(\"absolute\") because the result set is forward-only; absolute positioning to an arbitrary row number requires a scrollable, buffered result set which the Presto JDBC driver does not provide.","triggerScenarios":"Calling ResultSet.absolute(int row) on a PrestoResultSet to jump to a specific row.","commonSituations":"Pagination frameworks that seek to a page offset via absolute(offset) rather than using LIMIT/OFFSET in SQL.","solutions":["Use SQL-level pagination: ORDER BY ... LIMIT n OFFSET m in the query","Re-execute the query and skip rows forward with next() until reaching the target","Maintain a running row counter and stop at the desired row during a forward pass"],"exampleFix":"// before\nrs.absolute(pageSize * pageNum + 1);\n// after\nString paged = sql + \" LIMIT \" + pageSize + \" OFFSET \" + (pageSize * pageNum);\nrs = stmt.executeQuery(paged);","handlingStrategy":"try-catch","validationCode":"DatabaseMetaData md = conn.getMetaData();\nif (!md.supportsResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE)) { /* use LIMIT/OFFSET instead */ }","typeGuard":null,"tryCatchPattern":"try { rs.absolute(offset); } catch (SQLFeatureNotSupportedException e) { /* re-query with LIMIT/OFFSET */ }","preventionTips":["Implement pagination with SQL LIMIT/OFFSET, not cursor positioning","Re-execute queries when jumping to arbitrary rows","Assume forward-only semantics for all Presto result sets"],"tags":["jdbc","unsupported-operation","forward-only-resultset"],"backgroundTag":"jdbc-resultset-navigation-unsupported","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"}