You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by "袁康 (基础平台部)" <yu...@didichuxing.com> on 2017/03/27 09:50:20 UTC

how can I cast PhoenixArray to ArrayList

When I query phoenix in java project

occur:java.lang.ClassCastException: org.apache.phoenix.schema.types.PhoenixArray cannot be cast to java.util.ArrayList

How can I do the transfer?

Re: how can I cast PhoenixArray to ArrayList

Posted by James Taylor <ja...@apache.org>.
Sorry, wrong link. PhoenixArray is an implementation of the standard
java.sql.Array JDBC interface:
https://docs.oracle.com/javase/7/docs/api/java/sql/Array.html

On Tue, Mar 28, 2017 at 5:46 AM 袁康(基础平台部) <yu...@didichuxing.com>
wrote:

> I see the doc, but It’s oracle API  . There is getIntArray method to cast
> Oracle Array to int[] .Phoenix array does not hava one
>
> 在 2017年3月27日,22:38,James Taylor <ja...@apache.org> 写道:
>
> The JDBC array is not an ArrayList. See
> http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/ARRAY.html
>
>
> On Mon, Mar 27, 2017 at 3:50 AM 袁康(基础平台部) <yu...@didichuxing.com>
> wrote:
>
> When I query phoenix in java project
>
> occur:java.lang.ClassCastException:
> org.apache.phoenix.schema.types.PhoenixArray cannot be cast to
> java.util.ArrayList
>
> How can I do the transfer?
>
>
>

Re: how can I cast PhoenixArray to ArrayList

Posted by "袁康 (基础平台部)" <yu...@didichuxing.com>.
I see the doc, but It’s oracle API  . There is getIntArray method to cast Oracle Array to int[] .Phoenix array does not hava one

在 2017年3月27日,22:38,James Taylor <ja...@apache.org>> 写道:

The JDBC array is not an ArrayList. See http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/ARRAY.html


On Mon, Mar 27, 2017 at 3:50 AM 袁康(基础平台部) <yu...@didichuxing.com>> wrote:
When I query phoenix in java project

occur:java.lang.ClassCastException: org.apache.phoenix.schema.types.PhoenixArray cannot be cast to java.util.ArrayList

How can I do the transfer?


Re: how can I cast PhoenixArray to ArrayList

Posted by James Taylor <ja...@apache.org>.
The JDBC array is not an ArrayList. See
http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/ARRAY.html


On Mon, Mar 27, 2017 at 3:50 AM 袁康(基础平台部) <yu...@didichuxing.com>
wrote:

> When I query phoenix in java project
>
> occur:java.lang.ClassCastException:
> org.apache.phoenix.schema.types.PhoenixArray cannot be cast to
> java.util.ArrayList
>
> How can I do the transfer?