[ 
https://issues.apache.org/jira/browse/PIG-1551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitriy V. Ryaboy updated PIG-1551:
-----------------------------------

    Attachment: PIG_1551.3.patch

Ugh. Thank you for catching that -- fixed, and added a test to make sure it 
stays fixed.

The particular set of methods I needed this for used primitives, so that's what 
I did. It's a bit tricky to add support for Long, Double, etc arrays, as I 
would have to check all combinations of possible method signatures when seeing 
things like (int[], int[], int[]) -- it becomes fairly ugly code.. Do you think 
this is particularly compelling? I can't really think of methods that take 
arrays of Number classes; usually, if you start using Numbers, you are also 
using Collections, not plain arrays.

> Improve dynamic invokers to deal with no-arg methods and array parameters
> -------------------------------------------------------------------------
>
>                 Key: PIG-1551
>                 URL: https://issues.apache.org/jira/browse/PIG-1551
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.8.0
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>             Fix For: 0.8.0
>
>         Attachments: PIG-1551.patch, PIG_1551.2.patch, PIG_1551.3.patch
>
>
> PIG-1354 introduced a set of UDFs that can be used to dynamically wrap simple 
> Java methods in a UDF, so that users don't need to create trivial wrappers if 
> they are ok sacrificing some speed.
> This issue is to extend the set of methods that can be wrapped this way to 
> include methods that do not take any arguments, and methods that take arrays 
> of {int,long,float,double,string} as arguments. 
> Arrays are expected to be represented by bags in Pig. Notably, this allows 
> users to wrap statistical functions in o.a.commons.math.stat.StatUtils . 

-- 
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