[
https://issues.apache.org/jira/browse/HIVE-4757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13696610#comment-13696610
]
Ashutosh Chauhan commented on HIVE-4757:
----------------------------------------
+1
> 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
> 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