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

Thejas M Nair commented on HIVE-3246:
-------------------------------------

bq. byte [] is not a primitive. I have no issue with the change but there must 
be a reason this was done. Likely a performance issue.
Yes, byte[] is not a java primitive type, but it as close as it gets to it (it 
is a basic type that ships with java). ByteArrayRef is just a wrapper around 
byte[], I don't see any performance advantage of using it when binary is 
converted to java primitive type using the getPrimitiveJavaObject  call. Fyi, 
Ashutosh implemented the binary type using ByteArrayRef in HIVE-2380, I believe 
he does not see a performance issue as well (based on his comment above.)

                
> java primitive type for binary datatype should be byte[]
> --------------------------------------------------------
>
>                 Key: HIVE-3246
>                 URL: https://issues.apache.org/jira/browse/HIVE-3246
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>
> PrimitiveObjectInspector.getPrimitiveJavaObject is supposed to return a java 
> object. But in case of binary datatype, it returns ByteArrayRef (not java 
> standard type). The suitable java object for it would be byte[]. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to