You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Jonathan Coveney (JIRA)" <ji...@apache.org> on 2012/10/23 00:48:12 UTC
[jira] [Updated] (PIG-1431) Current DateTime UDFs: ISONOW(),
UNIXNOW()
[ https://issues.apache.org/jira/browse/PIG-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Coveney updated PIG-1431:
----------------------------------
Attachment: PIG-1431-0.patch
I bet you never thought you'd get a patch for this, Russell :) Now that we have a DataTime datatype in Pig, it seems totally reasonable to have a NOW(). The time will be the default DateTime object (unix epoch, iso chronology), and it will be _as of the moment the object is created on the front-end_. All values from the same instantiation of NOW() will be equal, though we should add tests etc to make sure this is the case.
I whipped this up quickly to see if the strategy I thought would work would work. It did (as far as I can tell).
> Current DateTime UDFs: ISONOW(), UNIXNOW()
> ------------------------------------------
>
> Key: PIG-1431
> URL: https://issues.apache.org/jira/browse/PIG-1431
> Project: Pig
> Issue Type: New Feature
> Components: impl
> Reporter: Russell Jurney
> Assignee: Jonathan Coveney
> Labels: datetime, now, simple, udf
> Fix For: 0.12
>
> Attachments: PIG-1431-0.patch
>
>
> Need a NOW() for getting datetime diffs between now and a prior or future date. Will use the system timezone. Will make one for ISO datetime and one for Unix time.
--
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