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

Michalis Kongtongk updated PIG-4115:
------------------------------------

    Description: 
Running a Pig Action in Oozie : 

create a file.txt in hdfs with content "1"
In Pig do:
A = load '/path/to/file.txt' as (a:chararray);
B = foreach A generate *, ToDate('02/11/1940', 'dd/MM/yyyy') ;
dump B;


In Oozie Pig Action, 
produce the same script in in workflow.xml and execute
this is where it'll fail.

{code}
...
ERROR 0: Exception while executing [POUserFunc (Name: 
POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-254 Operator 
Key: scope-254) children: null at []]: 
java.lang.IllegalArgumentException: Cannot parse "02/11/1940": Illegal instant 
due to time zone offset transition (Europe/Zurich) 
...
{code}

Since Oozie is using Pig as a library, I believe they should behave the same.

We notice this inconsistency, when the OS is set to
$ date +%Z # timezone name 
CEST 


  was:
ERROR 0: Exception while executing [POUserFunc (Name: 
POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-254 Operator 
Key: scope-254) children: null at []]: java.lang.IllegalArgumentException: 
Cannot parse "02/11/1940": Illegal instant due to time zone offset transition 
(Europe/Zurich) 




> Timezone inconsistency in Pig Oozie action fails with 
> "(org.apache.pig.builtin.ToDate2ARGS)[datetime]"
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-4115
>                 URL: https://issues.apache.org/jira/browse/PIG-4115
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12.0
>            Reporter: Michalis Kongtongk
>            Assignee: Rohini Palaniswamy
>
> Running a Pig Action in Oozie : 
> create a file.txt in hdfs with content "1"
> In Pig do:
> A = load '/path/to/file.txt' as (a:chararray);
> B = foreach A generate *, ToDate('02/11/1940', 'dd/MM/yyyy') ;
> dump B;
> In Oozie Pig Action, 
> produce the same script in in workflow.xml and execute
> this is where it'll fail.
> {code}
> ...
> ERROR 0: Exception while executing [POUserFunc (Name: 
> POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-254 Operator 
> Key: scope-254) children: null at []]: 
> java.lang.IllegalArgumentException: Cannot parse "02/11/1940": Illegal 
> instant due to time zone offset transition (Europe/Zurich) 
> ...
> {code}
> Since Oozie is using Pig as a library, I believe they should behave the same.
> We notice this inconsistency, when the OS is set to
> $ date +%Z # timezone name 
> CEST 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to