You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/10/08 00:18:22 UTC

[jira] [Commented] (CALCITE-1408) ResultSet.getXxx methods should throw SQLException if cannot convert to the requested type

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

Julian Hyde commented on CALCITE-1408:
--------------------------------------

+1 Looks good; I will commit right after 1.10.

It would be nice if there was a test that tries to access a column value "SCOTT" by calling getLong(), and getLong() duly throws a SQLException. But I don't know whether this test is possible in Avatica.

> ResultSet.getXxx methods should throw SQLException if cannot convert to the requested type
> ------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1408
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1408
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>            Reporter: Laurent Goujon
>             Fix For: avatica-1.9.0
>
>
> {{AccessorImpl}} relies on {{cannotConvert(String)}} method to throw a exception when conversion is not possible between the accessor data type, and what the user requested.
> The exact class type of the exception is {{RuntimeException}} which is very generic, and not easy for the user to catch, unlike more specific types. Moreover JDBC drivers usually throws a {{SQLException}} instances for these kind of exceptions, which is likely what users are expecting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)