prestodb/presto · error · SQLFeatureNotSupportedException

Multiple open results not supported

Error message

Multiple open results not supported

What it means

After handling CLOSE_CURRENT_RESULT, getMoreResults(int) throws SQLFeatureNotSupportedException for KEEP_CURRENT_RESULT/CLOSE_ALL_RESULTS: the Presto driver cannot maintain multiple concurrently open results from one statement, so multi-result access is unsupported.

Source

Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:468

    @Override
    public boolean getMoreResults(int current)
            throws SQLException
    {
        checkOpen();

        currentUpdateCount.set(-1);
        currentUpdateType.set(null);

        if (current == CLOSE_CURRENT_RESULT) {
            closeResultSet();
            return false;
        }

        if (current != KEEP_CURRENT_RESULT && current != CLOSE_ALL_RESULTS) {
            throw new SQLException("Invalid argument: " + current);
        }

        throw new SQLFeatureNotSupportedException("Multiple open results not supported");
    }

    @Override
    public ResultSet getGeneratedKeys()
            throws SQLException
    {
        throw new SQLFeatureNotSupportedException("getGeneratedKeys");
    }

    @Override
    public int executeUpdate(String sql)
            throws SQLException
    {
        return Ints.saturatedCast(executeLargeUpdate(sql));
    }

    @Override
    public int executeUpdate(String sql, int autoGeneratedKeys)

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Structure code to consume a single result set per statement
  2. Use CLOSE_CURRENT_RESULT (the no-arg getMoreResults()) semantics only
  3. Catch SQLFeatureNotSupportedException when probing multi-result support
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoStatement.java:468 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/42aaefd71a0723ad. Report an issue: GitHub.