[
https://issues.apache.org/jira/browse/PIG-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639086#action_12639086
]
Alan Gates commented on PIG-476:
--------------------------------
A couple of comments:
You commented the constructor arguments in the class level comments, but not
the function level.
In exec, if the incomingDateFormat doesn't parse you call printStackTrace and
keep going. I'm not sure what you want there. In 2.0 you'll want to return a
null. But in 1.x you need to either choose to return an empty DataAtom
(probably what you want) or throw an error (probably not what you want because
it will stop all processing on the job). But you definitely don't want to spew
the stack trace every time this happens.
> given a date that can match a SimpleDateFormat want to be able to extract
> arbitrary SimpleDateFormat data, like day or year
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: PIG-476
> URL: https://issues.apache.org/jira/browse/PIG-476
> Project: Pig
> Issue Type: New Feature
> Reporter: Earl Cahill
> Attachments: DateExtractor-PIG-476
>
>
> Want to be able to do something like
> A = FOREACH raw GENERATE
> org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime,
> "yyyy", "dd/MMM/yyyy:HH:mm:ss");
> to extract the year, or if your date is formatted as
> dd/MMM/yyyy:HH:mm:ss Z
> you could do something like
> A = FOREACH raw GENERATE
> org.apache.pig.piggybank.evaluation.util.apachelogparser.DateExtractor(dayTime,
> "MM-dd-yyyy");
> to grab out the day
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.