[
https://issues.apache.org/jira/browse/PIG-3442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rohini Palaniswamy resolved PIG-3442.
-------------------------------------
Resolution: Duplicate
PIG-3341 already fixes this in 0.11.2 and 0.12.
> ToDate() null pointer exception when date is NULL
> -------------------------------------------------
>
> Key: PIG-3442
> URL: https://issues.apache.org/jira/browse/PIG-3442
> Project: Pig
> Issue Type: Bug
> Reporter: Ofer Mendelevitch
> Assignee: Hari Sankar Sivarama Subramaniyan
>
> When using ToDate(), if the date string is NULL, PIG crashes on NPE (Null
> pointer exception) instead of gracefully notifying of an invalid argument
> condition.
> Here's a reproducible example:
> a = load 'file.txt' using PigStorage(',') as (id:int, date:chararray);
> b = foreach a generate id, date, ToDate(date, 'yyyy-MM-dd');
> dump b;
> where "file.txt" can be like this:
> 1,2013-05-08
> 2,2012-11-02
> 3,
> 4,2013-01-03
--
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