presto-jdbc/src/main/java/io/prestosql/jdbc/PrestoStatement.java/PrestoStatement/getMaxRows
class PrestoStatement:    @Override
    public int getMaxRows()
            throws SQLException
    {
        long result = getLargeMaxRows();
        if (result > Integer.MAX_VALUE) {
            throw new SQLException("Max rows exceeds limit of 2147483647");
        }
        return toIntExact(result);
    }