[ https://issues.apache.org/jira/browse/HIVE-4757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13697979#comment-13697979 ]
Hudson commented on HIVE-4757: ------------------------------ Integrated in Hive-trunk-hadoop2 #268 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/268/]) HIVE-4757 : LazyTimestamp goes into irretrievable NULL mode once inited with NULL once (Gopal V via Ashutosh Chauhan) (Revision 1498577) Result = FAILURE hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1498577 Files : * /hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyTimestamp.java * /hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/lazy/TestLazyPrimitive.java > 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