Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.12.0
-
None
-
Fix bad isNull state for LazyTimestamp when encountering valid input after a NULL record.
Description
The LazyTimestamp.init() code turns into a NULL generator after parsing the very first NULL value (or format error).
The code is as follows
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"); } }
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.
Attachments
Attachments
Issue Links
- relates to
-
HIVE-5239 LazyDate goes into irretrievable NULL mode once inited with NULL once
- Closed