You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Cheolsoo Park (JIRA)" <ji...@apache.org> on 2013/11/27 19:23:35 UTC
[jira] [Commented] (PIG-3587) add functionality for rolling over
dates
[ https://issues.apache.org/jira/browse/PIG-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834007#comment-13834007 ]
Cheolsoo Park commented on PIG-3587:
------------------------------------
[~rekhajoshm], thank you very much for the patch.
The functionality seems very similar to [AddDuration|http://pig.apache.org/docs/r0.12.0/func.html#add-duration] and [SubtractDuration|http://pig.apache.org/docs/r0.12.0/func.html#subtract-duration]. For example, to add 1 month, I can do the following-
{code}
t = FOREACH s GENERATE AddDuration( ToDate(str, 'yyyy-MM-dd'), 'P1M' );
{code}
I am not sure whether we want to add another UDF for this. What do you think?
> add functionality for rolling over dates
> ----------------------------------------
>
> Key: PIG-3587
> URL: https://issues.apache.org/jira/browse/PIG-3587
> Project: Pig
> Issue Type: Task
> Components: piggybank
> Affects Versions: 0.10.1
> Reporter: Rekha Joshi
> Labels: patch, piggybank
> Fix For: 0.10.1
>
> Attachments: PIG-3587_1.patch
>
>
> Add functionality for rolling over dates
--
This message was sent by Atlassian JIRA
(v6.1#6144)