{"record":{"id":"eb9d46a5c68bd4e2","repo":"prestodb/presto","slug":"batches-not-supported","errorCode":null,"errorMessage":"Batches not supported","messagePattern":"Batches not supported","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java","lineNumber":424,"sourceCode":"    {\n        checkOpen();\n        return ResultSet.CONCUR_READ_ONLY;\n    }\n\n    @Override\n    public int getResultSetType()\n            throws SQLException\n    {\n        checkOpen();\n        return ResultSet.TYPE_FORWARD_ONLY;\n    }\n\n    @Override\n    public void addBatch(String sql)\n            throws SQLException\n    {\n        checkOpen();\n        throw new SQLFeatureNotSupportedException(\"Batches not supported\");\n    }\n\n    @Override\n    public void clearBatch()\n            throws SQLException\n    {\n        checkOpen();\n        throw new SQLFeatureNotSupportedException(\"Batches not supported\");\n    }\n\n    @Override\n    public int[] executeBatch()\n            throws SQLException\n    {\n        checkOpen();\n        throw new SQLFeatureNotSupportedException(\"Batches not supported\");\n    }\n","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java#L406-L442","documentation":"addBatch(String) in PrestoStatement always throws SQLFeatureNotSupportedException after checkOpen(): statement-level SQL batching is not implemented by the Presto JDBC driver, so any batch accumulation via addBatch is rejected.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:424 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Execute statements individually in a loop instead of using addBatch/executeBatch","Use multi-row INSERT statements (or a prepared statement with values) for bulk inserts","Catch SQLFeatureNotSupportedException in generic JDBC abstraction layers"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}