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

Aman Poonia edited comment on PHOENIX-6630 at 11/25/22 6:17 AM:
----------------------------------------------------------------

Not able to repro the issue. Tries doing a setObject(index, PhoenixArray) and 
my test passed successfully.

[~kadir] [~gjacoby] FYI


was (Author: mnpoonia):
Not able to repro the issue. Tries doing a setObject(index, PhoenixArray) and 
my test passed successfully.

> PreparedStatement setObject should call setArray for PhoenixArrays
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-6630
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6630
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Geoffrey Jacoby
>            Assignee: Geoffrey Jacoby
>            Priority: Minor
>
> Phoenix supports JDBC array types in SQL via the PreparedStatement setArray 
> method. Passing a PhoenixArray to setObject results in an exception as it 
> goes down a code path assuming it's a literal. 
> Other JDBC-based drivers such as Oracle allow setObject to be used for arrays 
> as well as scalars. The fix looks to be pretty simple -- just check in 
> setObject if the parameter type is an instanceof PhoenixArray (or maybe 
> java.sql.Array) and just pass on to setArray internally.
> This makes type-agnostic Statement building easier (for example in 
> PhoenixTestBuilder)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to