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


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.

Reply via email to