hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neha Tomar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-3168) LazyBinaryObjectInspector.getPrimitiveJavaObject copies beyond length of underlying BytesWritable
Date Wed, 04 Jul 2012 03:53:34 GMT

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

Neha Tomar commented on HIVE-3168:
----------------------------------

Thanks Thejas. I applied only the second patch and the build was fine. However, I am still
seeing the same incorrect values coming back. Could you please let me know if you have verified
and this works fine for you.
e.g. I have following data in table.
a
ab
abc
abcd
abcde
z
And the values (this is in hexadecimal) coming back from HCatalog is :
61
616200
616263
616263640000
616263646500
7A6263646500
                
> LazyBinaryObjectInspector.getPrimitiveJavaObject copies beyond length of underlying BytesWritable
> -------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-3168
>                 URL: https://issues.apache.org/jira/browse/HIVE-3168
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>             Fix For: 0.10.0, 0.9.1
>
>         Attachments: HIVE-3168.1.patch, HIVE-3168.2.patch
>
>
> LazyBinaryObjectInspector.getPrimitiveJavaObject copies the full capacity of the LazyBinary's
underlying BytesWritable object, which can be greater than the size of the actual contents.

> This leads to additional characters at the end of the ByteArrayRef returned. When the
LazyBinary object gets re-used, there can be remnants of the later portion of previous entry.

> This was not seen while reading through hive queries, which I think is because a copy
elsewhere seems to create LazyBinary with length == capacity. (probably LazyBinary copy constructor).
This was seen when MR or pig used Hcatalog to read the data.

--
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

        

Mime
View raw message