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

Nick Dimiduk commented on PHOENIX-1514:
---------------------------------------

Equals cleanup resolves UT issues but I see failures in ArrayIT, for example.

{noformat}
testUpsertSelectWithSelectAsSubQuery1(org.apache.phoenix.end2end.ArrayIT)  Time 
elapsed: 0.085 sec  <<< ERROR!
java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.Object;
        at 
org.apache.phoenix.schema.types.PArrayDataType.isSizeCompatible(PArrayDataType.java:210)
        at 
org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:771)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:272)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:264)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:262)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:203)
        at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:174)
        at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:179)
        at 
org.apache.phoenix.end2end.ArrayIT.initSimpleArrayTable(ArrayIT.java:1734)
        at 
org.apache.phoenix.end2end.ArrayIT.testUpsertSelectWithSelectAsSubQuery1(ArrayIT.java:418)
{noformat}

Because PhoenixArray$PrimitiveFooPhoenixArray#array becomes a primitive\[\] 
instead of Primitive\[\], the Object\[\] cast in 
PArrayDataType#isSizeCompatible does not work. I can override in subclasses, 
but the inspect-and-cast logic becomes messy when you want to enable comparing 
things like int\[\] vs BigDecimal\[\] (which is currently supported). 

> Break up PDataType Enum
> -----------------------
>
>                 Key: PHOENIX-1514
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1514
>             Project: Phoenix
>          Issue Type: Sub-task
>    Affects Versions: 5.0.0
>            Reporter: Nick Dimiduk
>            Assignee: Nick Dimiduk
>             Fix For: 5.0.0
>
>         Attachments: PHOENIX-1514.00.patch, PHOENIX-1514.01.patch, 
> PHOENIX-1514.02.patch, hung-phoenix-verify.txt, stack.txt
>
>
> A first step in adopting (a portion of) HBase's type encodings is to break up 
> the PDataType enum into an interface. This will pave the way for more 
> flexibility going forward.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to