You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ralph Gasser (JIRA)" <ji...@apache.org> on 2019/07/03 07:18:01 UTC

[jira] [Comment Edited] (CALCITE-3163) Mapping of Types in AbstractCursor#convertValue() does not adhere to JDBC specifications

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

Ralph Gasser edited comment on CALCITE-3163 at 7/3/19 7:17 AM:
---------------------------------------------------------------

Pull request: [https://github.com/apache/calcite-avatica/pull/105]


was (Author: ppanopticon):
I've created a patch that should resolve the issue. 

> Mapping of Types in AbstractCursor#convertValue() does not adhere to JDBC specifications
> ----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3163
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3163
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.15.0
>            Reporter: Ralph Gasser
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: patch0001.diff
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is an issue I found while working on CALCITE-3162: According to my understanding, the method _AbstractCursor#convertValue()_, used for converting the component types of ARRAYs, does not adhere to what is specified in the [JDBC specification (Appendix B)|https://download.oracle.com/otn-pub/jcp/jdbc-4_1-mrel-spec/jdbc4.1-fr-spec.pdf?AuthParam=1561978725_eefb6fb1703d96f182674508c44126ea] regarding mapping of types:
>  * The JDBC types FLOAT (6) and DOUBLE (8) should actually both map to Java _double_ or _Double_ respectively. Currently, FLOAT (6) is converted to a _float_.
>  * The implementation is currently missing support for JDBC type REAL (7), which should convert to _float_ or _Float_ respectively
> This issue will cause an IllegalStateException to be thrown in clients using the Avatica Driver if they encounter REAL datatype in arrays.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)