prestodb/presto · error · SQLFeatureNotSupportedException
setUnicodeStream
Error message
setUnicodeStream
What it means
setUnicodeStream is explicitly unsupported in this driver: the override always throws SQLFeatureNotSupportedException. It signals that the JDBC 1.0-style Unicode character stream parameter API has no Presto implementation, independent of the supplied parameter index or stream.
Source
Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:295
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()
throws SQLException
{
checkOpen();
parameters.clear();
}
@OverrideView on GitHub (pinned to 55bb57d202)
Solutions
- Use setString with a java.lang.String instead of a Unicode character stream
- Set character data via setCharacterStream alternatives only if the driver implements them (it does not for this driver version)
- Refactor code paths that rely on stream-based character parameters
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoPreparedStatement.java:295 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/8d94a227690e8432.
Report an issue: GitHub.