prestodb/presto · error · NotImplementedException
Not implemented: PreparedStatement.setAsciiStream
Error message
Not implemented: PreparedStatement.setAsciiStream
What it means
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.
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:288
@Override
public void setTimestamp(int parameterIndex, Timestamp x)
throws SQLException
{
checkOpen();
if (x == null) {
setNull(parameterIndex, Types.TIMESTAMP);
}
else {
setParameter(parameterIndex, formatLiteral("TIMESTAMP", TIMESTAMP_FORMATTER.print(x.getTime())));
}
}
@Override
public void setAsciiStream(int parameterIndex, InputStream x, int length)
throws SQLException
{
throw new NotImplementedException("PreparedStatement", "setAsciiStream");
}
@Override
public void setUnicodeStream(int parameterIndex, InputStream x, int length)
throws SQLException
{
throw new SQLFeatureNotSupportedException("setUnicodeStream");
}
@Override
public void setBinaryStream(int parameterIndex, InputStream x, int length)
throws SQLException
{
throw new NotImplementedException("PreparedStatement", "setBinaryStream");
}
@Override
public void clearParameters()View on GitHub (pinned to 55bb57d202)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:288 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/295aaf9bd01cf933.
Report an issue: GitHub.