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

Josh Elser commented on CALCITE-1050:
-------------------------------------

bq. Given the javadoc, I'd expect the above to work. For a TypedValue, I should 
get an Object which is suitable to be set as an Array on the PreparedStatement. 
However, the above throws a ClassCastException (trying to cast Object[] to 
Array).

Alright, I have convinced myself that the current javadoc on TypedValue is 
wrong. The reason we have not noticed this in the past is that HSQLDB will 
"coerce" {{Object[]}} (non-primitive type arrays) and {{List<Object>}} into 
columns of type {{ARRAY}}. For correctness: {{TypedValue.toJdbc(Calendar)}} 
should return an {{Array}}, not a {{List}}. Databases that happened to still 
work are just playing "nice".

> Avatica can't serialize java.sql.Array
> --------------------------------------
>
>                 Key: CALCITE-1050
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1050
>             Project: Calcite
>          Issue Type: Improvement
>          Components: avatica
>    Affects Versions: 1.5.0
>            Reporter: Lukas Lalinsky
>            Assignee: Josh Elser
>             Fix For: avatica-1.10.0
>
>
> As far as I can see, there is no way to serialize arrays in the Avatica RPC.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to