{"record":{"id":"295aaf9bd01cf933","repo":"prestodb/presto","slug":"not-implemented-preparedstatement-setasciistream","errorCode":null,"errorMessage":"Not implemented: PreparedStatement.setAsciiStream","messagePattern":"Not implemented: PreparedStatement\\.setAsciiStream","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java","lineNumber":288,"sourceCode":"\n    @Override\n    public void setTimestamp(int parameterIndex, Timestamp x)\n            throws SQLException\n    {\n        checkOpen();\n        if (x == null) {\n            setNull(parameterIndex, Types.TIMESTAMP);\n        }\n        else {\n            setParameter(parameterIndex, formatLiteral(\"TIMESTAMP\", TIMESTAMP_FORMATTER.print(x.getTime())));\n        }\n    }\n\n    @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()","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java#L270-L306","documentation":"PrestoPreparedStatement does not implement PreparedStatement.setAsciiStream: streaming an ASCII InputStream into a parameter is unsupported by this JDBC driver. Calling it always throws NotImplementedException, an in-driver signaling exception indicating an unimplemented JDBC interface method, regardless of the arguments.","triggerScenarios":"Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the value as a String via setString instead of a stream","Read the stream into a byte array and use setBytes for binary content","Avoid setAsciiStream with the Presto JDBC driver entirely"],"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"}