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

maillard commented on PHOENIX-1242:
-----------------------------------

Great thank you Alicia, when tracing down this message it was not really a bug 
per say but more having created an Hbase table and inserted a string ,and then 
in a phoenix view on top of this hbase table said it was a long. So when 
phoenix tries to cast it fails as expected. Maybe in the cast part a check 
shoud be added and a more explicit error raised, this is probably true for all 
types.

> ArrayoutofBoundException Phoenix mapping to exisiting Hbase
> -----------------------------------------------------------
>
>                 Key: PHOENIX-1242
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1242
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: maillard
>            Priority: Minor
>
> In a Phoenix mapping to an existing Hbase Table in case of mis-typing say try 
> to cast a long an actual string type, Phoenix will break with:
> java.lang.ArrayIndexOutOfBoundsException: 324
> This is a user mis-use but the error message is misleading. The problem is 
> trying to copy a string to a long a fixed Bytes[] in long decodeLong.
> Maybe a test to check if the translation is possible and a type error if size 
> don't match would provide for a more explicit error message for the user to 
> understand what he did wrong.



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

Reply via email to