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

Thejas M Nair commented on PIG-1314:
------------------------------------

bq. 1. Pig can also import into and export from HBase storage, which also 
doesn't have the primitive DataTime. Throw exception in this case as well, 
correct?
Yes. The exception should be thrown from HBaseStorage.

bq. if we conclude the design for Avro, we should keep to it for the others.
Please note that pig does not have a way of know if the format will support 
datetime. The behavior will be controlled by the storage func implementation. 
But for the ones that are part of pig codebase, I think we should throw an 
exception. 

bq. 3. DateTime is serialized as a Long value (Unix timestamp) when it is 
necessary.
JodaTime supports milliseconds as well. Will we be able to convert all values 
within limits of JodaTime date into a long ?

bq. the output datatype of DiffDate(DateTime d1, DateTime d2) should use long 
instead of int, because the diff may be too large for int range to conver.
Makes sense, we should use a type that is appropriate for range.

bq. what does DateTime DateAdd(DateTime d1) mean? Adding datetime based on the 
current time?
Not sure. Daniel, do you know ?

bq. we allow explicit cast between datetime and string, correct? Similarly, do 
we allow explicit cast between datetime and long/int (representing unix 
timestamp)?
Yes, we should support explicit cast between these types. Though conversion to 
int might not be successful for all datetime values. 


                
> 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