hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-4757) LazyTimestamp goes into irretrievable NULL mode once inited with NULL once
Date Mon, 01 Jul 2013 17:26:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-4757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ashutosh Chauhan updated HIVE-4757:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.12.0
           Status: Resolved  (was: Patch Available)

Committed to trunk. Thanks, Gopal!
                
> LazyTimestamp goes into irretrievable NULL mode once inited with NULL once
> --------------------------------------------------------------------------
>
>                 Key: HIVE-4757
>                 URL: https://issues.apache.org/jira/browse/HIVE-4757
>             Project: Hive
>          Issue Type: Bug
>          Components: Serializers/Deserializers
>    Affects Versions: 0.12.0
>            Reporter: Gopal V
>            Assignee: Gopal V
>             Fix For: 0.12.0
>
>         Attachments: HIVE-4757-001.patch
>
>
> The LazyTimestamp.init() code turns into a NULL generator after parsing the very first
NULL value (or format error). 
> The code is as follows 
> {code}
>     Timestamp t = null;
>     if (s.compareTo("NULL") == 0) {
>       isNull = true;
>       logExceptionMessage(bytes, start, length, "TIMESTAMP");
>     } else {
>       try {
>         t = Timestamp.valueOf(s);
>       } catch (IllegalArgumentException e) {
>         isNull = true;
>         logExceptionMessage(bytes, start, length, "TIMESTAMP");
>       }
>     }
> {code}
> As might be obvious from the code above, the class does not reset the isNull to false
when a parse is successful.
> So if by any reason, it is initialized with a NULL value, the LazyTimestamp.getObject()
will always return NULL for all further rows.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message