Olga Natkovich commented on PIG-885:

The code looks good.


(1) LookupInFile - I think it would make sense to require that files are 
provided in a constructor (via define) rather than checking on every exec.
(2) In LookupInFile.exec - you get first element of the tuple without checking 
that it exists. I think you need to check for that and give an error. 
(3) LookupInFile.init - There are also some comments there that seems unrelated 
to the code - please remove
(4) RegexpExtract.exec, RegexpMatch.exec - you refer to elements in the tuple 
without checking that they exist. We should give meaningful errors when we 
don't get all expected parameters
(5) HashFNV.exec - needs to check size of the tuple. 
(6) HashFNV - needs the mapping function that that Pig insert implicit cast
(7) DiffDate.exec - needs to check input tuple size before getting fields out
(8) DiffDate - needs mapping function so that Pig inserts casts

> New UDFs for piggybank (Bin, Decode, LookupInFiles, RegexExtract, RegexMatch, 
> HashFVN, DiffDate)
> ------------------------------------------------------------------------------------------------
>                 Key: PIG-885
>                 URL: https://issues.apache.org/jira/browse/PIG-885
>             Project: Pig
>          Issue Type: New Feature
>    Affects Versions: 0.3.0
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>            Priority: Minor
>             Fix For: 0.4.0
>         Attachments: PIG-885-2.patch, PIG-885-3.patch, PIG-885-4.patch, 
> PIG-885-5.patch, PIG-885.patch
> Bunch of UDFs:
> 1. Bin -- Converts a continuous value into discrete values
> 2. Decode -- Converts a given attribute or expression into another string 
> value, based on the value of the source attribute
> 3. LookupInFiles -- Check for the existence of an expression in a serial of 
> text files
> 4. RegexExtract and RegexMatch -- Similar to perl regexes
> 5. HashFNV -- An implementation of FNV hash
> 6. DiffDate -- Caculate the number of days in between

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to