You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2010/07/12 20:28:51 UTC

[jira] Updated: (PIG-902) Allow schema matching for UDF with variable length arguments

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

Olga Natkovich updated PIG-902:
-------------------------------

    Fix Version/s: 0.9.0

> Allow schema matching for UDF with variable length arguments
> ------------------------------------------------------------
>
>                 Key: PIG-902
>                 URL: https://issues.apache.org/jira/browse/PIG-902
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.3.0
>            Reporter: Daniel Dai
>             Fix For: 0.9.0
>
>
> Pig pick the right version of UDF using a similarity measurement. This mechanism pick the UDF with right input schema to use. However, some UDFs use various number of inputs and currently there is no way to declare such input schema in UDF and similarity measurement do not match against variable number of inputs. We can still write variable inputs UDF, but we cannot rely on schema matching to pick the right UDF version and do the automatic data type conversion.
> Eg:
> If we have:
> Integer udf1(Integer, ......);
> Integer udf1(String, ......);
> Currently we cannot do this:
> a: {chararray, chararray}
> b = foreach a generate udf1(a.$0, a.$1);  // Pig cannot pick the udf(String, ......) automatically, currently, this statement fails
> Eg:
> If we have:
> Integer udf2(Integer, ......);
> Currently, this script fail
> a: {chararray, chararray}
> b = foreach a generate udf1(a.$0, a.$1);  // Currently, Pig cannot convert a.$0 into Integer automatically

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