{"record":{"id":"81387fa0124868bc","repo":"prestodb/presto","slug":"not-implemented-preparedstatement-setbinarystream","errorCode":null,"errorMessage":"Not implemented: PreparedStatement.setBinaryStream","messagePattern":"Not implemented: PreparedStatement\\.setBinaryStream","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java","lineNumber":302,"sourceCode":"    @Override\n    public void setAsciiStream(int parameterIndex, InputStream x, int length)\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"setAsciiStream\");\n    }\n\n    @Override\n    public void setUnicodeStream(int parameterIndex, InputStream x, int length)\n            throws SQLException\n    {\n        throw new SQLFeatureNotSupportedException(\"setUnicodeStream\");\n    }\n\n    @Override\n    public void setBinaryStream(int parameterIndex, InputStream x, int length)\n            throws SQLException\n    {\n        throw new NotImplementedException(\"PreparedStatement\", \"setBinaryStream\");\n    }\n\n    @Override\n    public void clearParameters()\n            throws SQLException\n    {\n        checkOpen();\n        parameters.clear();\n    }\n\n    @Override\n    public void setObject(int parameterIndex, Object x, int targetSqlType)\n            throws SQLException\n    {\n        checkOpen();\n        if (x == null) {\n            setNull(parameterIndex, targetSqlType);\n            return;","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java#L284-L320","documentation":"setBinaryStream is not implemented by PrestoPreparedStatement: any call throws NotImplementedException. Binary stream binding of parameters has no Presto equivalent because parameter values are serialized as SQL literals, so the driver refuses the operation unconditionally.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:302 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the InputStream into a byte[] and call setBytes instead","Bind binary data as a hex or base64 string literal via setString","Skip stream-based parameter setting when using the Presto JDBC driver"],"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"}