You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Masato Setoyama (Commented) (JIRA)" <ji...@apache.org> on 2012/02/14 08:10:59 UTC

[jira] [Commented] (HIVE-2381) SQLException thrown when the resultset becomes empty.

    [ https://issues.apache.org/jira/browse/HIVE-2381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207552#comment-13207552 ] 

Masato Setoyama commented on HIVE-2381:
---------------------------------------

Excuse me for my poor English..

I experienced the same error when I used JDBC Driver through Pentaho Report Designer 'Preview'.

Maybe, below is error occuring point.

    } catch (HiveServerException e) {
      if (e.getErrorCode() == 0) { // error code == 0 means reached the EOF
        return false;
      } else {
        throw new SQLException("Error retrieving next row", e);
      }
    }

In Pentaho Report Designer, Users can set Max Preview Row.
So I set the max preview row number smaller than the actual row number the hive table had, 
then the error did'nt occured.
But when I didn't set the max preview row number, always the error occured.
I think the HiveQueryResultSet class's 'next' method can't recognize EOF.


--Environments
Hadoop Distribution: CDH3u1
Pentaho Enterprise Edition 4.1 GA
Pnetaho Report Designer 3.8.3 GA
                
> SQLException thrown when the resultset becomes empty.
> -----------------------------------------------------
>
>                 Key: HIVE-2381
>                 URL: https://issues.apache.org/jira/browse/HIVE-2381
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 0.7.1
>            Reporter: Rémy DUBOIS
>
> Using the next method on my HiveQueryResultSet, when the resultset becomes emtpy, a SQLException is thrown on this line of code:
> {code}
> rowStr = (String) client.fetchOne();
> ...
> ...
> } catch (Exception ex) {
>       ex.printStackTrace();
>       throw new SQLException("Error retrieving next row");
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira