[
https://issues.apache.org/jira/browse/CALCITE-4970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467048#comment-17467048
]
Knut Forkalsrud commented on CALCITE-4970:
------------------------------------------
A couple of inconsistencies on the "developing Avatica" page:
[https://calcite.apache.org/avatica/develop/avatica.html]
The build instructions say "build using maven" when it goes ahead and uses
Gradle on the next line.
The URL under the header "Continuous Integration Testing" seems to be broken.
It gives me a 404 response.
> Avatica ResultSet getObject with class argument fails unnecessarily
> -------------------------------------------------------------------
>
> Key: CALCITE-4970
> URL: https://issues.apache.org/jira/browse/CALCITE-4970
> Project: Calcite
> Issue Type: Improvement
> Components: avatica
> Affects Versions: avatica-1.20.0
> Reporter: Knut Forkalsrud
> Priority: Minor
>
> The default implementation of Avatica's Cursor method
> {{public <T> T getObject(Class<T> type) throws SQLException}}
> thrown an exception about not being able to convert. However, there is the
> trivial case when no conversion is necessary. I propose returning the same
> value as {{getObject()}} does, when that's an acceptable type.
>
> The background for this is our experience with different JDBC drivers. Our
> in-house "query master" tries to visualize result sets. We use
> {{ResultSetMetaData.getColumnTypeName}} to figure out which type to expect.
> Some drivers don't necessarily produce objects of the same type when we call
> {{{}getObject{}}}, but they do convert to the right type when we call the
> method with the class as an argument.
>
> Pull request forthcoming.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)