You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Prashant Kommireddi (Updated) (JIRA)" <ji...@apache.org> on 2011/11/16 03:00:52 UTC
[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when
overloading UDF in 0.9.1
[ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prashant Kommireddi updated PIG-2375:
-------------------------------------
Description:
When overloading a UDF with getArgToFuncMapping() the parent/root UDF outputSchema() is being called.
{code}
@Override
public List<FuncSpec> getArgToFuncMapping() throws FrontendException {
List<FuncSpec> funcList = new ArrayList<FuncSpec>();
Schema s = new Schema();
s.add(new Schema.FieldSchema(null, DataType.TUPLE));
s.add(new Schema.FieldSchema(null, DataType.CHARARRAY));
funcList.add(new FuncSpec(this.getClass().getName(), s));
Schema s1 = new Schema();
s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
funcList.add(new FuncSpec(LogFieldValues.class.getName(), s1));
return funcList;
}
{code}
In the above function, "LogFieldValues" is used when the input is (tuple, tuple) but the outputSchema() is invoked from the root UDF.
was:
When overloading a UDF with getArgToFuncMapping() the parent/root UDF outputSchema() is being called.
@Override
public List<FuncSpec> getArgToFuncMapping() throws FrontendException {
List<FuncSpec> funcList = new ArrayList<FuncSpec>();
Schema s = new Schema();
s.add(new Schema.FieldSchema(null, DataType.TUPLE));
s.add(new Schema.FieldSchema(null, DataType.CHARARRAY));
funcList.add(new FuncSpec(this.getClass().getName(), s));
Schema s1 = new Schema();
s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
funcList.add(new FuncSpec(LogFieldValues.class.getName(), s1));
return funcList;
}
In the above function, "LogFieldValues" is used when the input is (tuple, tuple) but the outputSchema() is invoked from the root UDF.
> Incorrect outputSchema is invoked when overloading UDF in 0.9.1
> ---------------------------------------------------------------
>
> Key: PIG-2375
> URL: https://issues.apache.org/jira/browse/PIG-2375
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.1
> Reporter: Prashant Kommireddi
> Fix For: 0.9.1
>
>
> When overloading a UDF with getArgToFuncMapping() the parent/root UDF outputSchema() is being called.
> {code}
> @Override
> public List<FuncSpec> getArgToFuncMapping() throws FrontendException {
> List<FuncSpec> funcList = new ArrayList<FuncSpec>();
> Schema s = new Schema();
> s.add(new Schema.FieldSchema(null, DataType.TUPLE));
> s.add(new Schema.FieldSchema(null, DataType.CHARARRAY));
> funcList.add(new FuncSpec(this.getClass().getName(), s));
> Schema s1 = new Schema();
> s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
> s1.add(new Schema.FieldSchema(null, DataType.TUPLE));
> funcList.add(new FuncSpec(LogFieldValues.class.getName(), s1));
> return funcList;
> }
> {code}
> In the above function, "LogFieldValues" is used when the input is (tuple, tuple) but the outputSchema() is invoked from the root UDF.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira