[ 
https://issues.apache.org/jira/browse/PIG-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402061#comment-13402061
 ] 

Zhijie Shen commented on PIG-1314:
----------------------------------

{quote}
Yes, it will be lossy, but the part that is important for date calculations is 
preserved. The ISO spec only has offset for timezone. I don't think we have to 
allow datetime field to be used for storing location information. Does JodaTime 
preserve the location string ?
{quote}

Yes, I think so. If I get an DateTimeZone object by 
DateTimeZone.forID("asia/singapore"), the returned DateTimeZone object doesn't 
change to "+08:00", but keeps "asia/singapore". We'd better preserve it because 
when users want to output the time in their customized format that has "z" in 
the pattern string, the exact timezone can be outputed.

{quote}
But won't jodatime support a timezone outside this list, If the user specifies 
a date using the UTC offset format ?
{quote}

Yes, DateTimeZone.forID() also allows UTC offset string as input, such as 
"+08:00", though it is not in the list. However, the offset can be value in the 
range [-23:59:59.999, +23:59:59.999], and the minimal granularity can be the 
millisecond

Then, we are expected to have a combined lookup table that maps canonical 
timezone ids and UTC offset to their concise representation. Do you have any 
suggestion here? Or we temporally set aside the performance issue right now, 
and move forward to make timezone serialization work by simply serializing the 
timezone id string.
                
> Add DateTime Support to Pig
> ---------------------------
>
>                 Key: PIG-1314
>                 URL: https://issues.apache.org/jira/browse/PIG-1314
>             Project: Pig
>          Issue Type: Bug
>          Components: data
>    Affects Versions: 0.7.0
>            Reporter: Russell Jurney
>            Assignee: Zhijie Shen
>              Labels: gsoc2012
>         Attachments: PIG-1314-1.patch, PIG-1314-2.patch, joda_vs_builtin.zip
>
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> Hadoop/Pig are primarily used to parse log data, and most logs have a 
> timestamp component.  Therefore Pig should support dates as a primitive.
> Can someone familiar with adding types to pig comment on how hard this is?  
> We're looking at doing this, rather than use UDFs.  Is this a patch that 
> would be accepted?
> This is a candidate project for Google summer of code 2012. More information 
> about the program can be found at 
> https://cwiki.apache.org/confluence/display/PIG/GSoc2012

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to