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

Lukas Lalinsky edited comment on CALCITE-1050 at 1/12/16 5:39 AM:
------------------------------------------------------------------

Let's say I have a prepared statement, created like this:

{code}
{
  "request": "prepare",
  "connectionId": "...",
  "sql": "UPSERT INTO foo (id, array_column) VALUES (?, ?)",
  "maxRowCount": 0
}
{code}

Now I need to execute the statement like this:

{code}
{
  "request": "execute",
  "statementHandle": { ... },
  "parameterValues": [
    {"type": "INTEGER", "value": "1"},
    {"type": "???", "value": ???}
  ],
  "maxRowCount": 0
}
{code}

I don't know what to put instead of {{???}} for the array parameter to work. 
{{ColumnMetaData.Rep}} does have an {{ARRAY}} type, but it's either not used in 
{{TypedValue}} or I'm submitting the data in the wrong format. Initially I 
expected {{"type": "ARRAY", "value": \[1,2,3\]}} to work, but it doesn't.


was (Author: lukaslalinsky):
Let's say I have a prepared statement, created like this:

{code}
{
  "request": "prepare",
  "connectionId": "...",
  "sql": "UPSERT INTO foo (id, array_column) VALUES (?, ?)",
  "maxRowCount": 0
}
{code}

Now I need to execute the statement like this:

{code}
{
  "request": "execute",
  "statementHandle": { ... },
  "parameterValues": [
    {"type": "INTEGER", "value": "1"},
    {"type": "???", "value": ???}
  ],
  "maxRowCount": 0
}
{code}

I don't know what to put instead of {{???}}} for the array parameter to work. 
{{ColumnMetaData.Rep}} does have an {{ARRAY}} type, but it's either not used in 
{{TypedValue}} or I'm submitting the data in the wrong format. Initially I 
expected {{"type": "ARRAY", "value": \[1,2,3\]}} to work, but it doesn't.

> 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
>
> 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.4#6332)

Reply via email to