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

Jeffrey Zhong commented on PHOENIX-1242:
----------------------------------------

Forgot to check in local changes for 3.0. Right now 3.0 build should be back to 
normal.

{quote}
 if the length is insufficient?
{quote}
I thought about that as well. Since we couldn't check exact data length here 
and in most time the check will pass, that's why I thought catch 
ArrayIndexOutOfBoundsException is fine without the extra check.

{quote}
 RuntimeException and then doing an instanceof check and then rethrowing only 
if ArrayIndexOutOfBoundsException when you could just catch an 
ArrayIndexOutOfBoundsException and then throw it?
{quote}
That's a good point.

{quote}
I'll tweak this a bit if you all don't mind.
{quote}
Please go ahead when you get a chance. Thanks!

> 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: nicolas maillard
>            Assignee: Alicia Ying Shu
>            Priority: Minor
>             Fix For: 5.0.0, 4.2, 3.2
>
>         Attachments: Phoenix-1242-V1.patch, phoenix-1242.patch
>
>
> 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