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 (Created) (JIRA)" <ji...@apache.org> on 2011/11/16 03:00:52 UTC

[jira] [Created] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

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. 

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

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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Thejas M Nair (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2375:
-------------------------------

    Assignee: Prashant Kommireddi
      Status: Patch Available  (was: Open)
    
> 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
>            Assignee: Prashant Kommireddi
>             Fix For: 0.9.1
>
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Daniel Dai (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2375:
----------------------------

    Fix Version/s:     (was: 0.9.2)
    
> 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
>            Assignee: Prashant Kommireddi
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Commented] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13190538#comment-13190538 ] 

Prashant Kommireddi commented on PIG-2375:
------------------------------------------

Based on above, I think we should close this one out and open a new JIRA for better documentation of "outputSchema" and "getArgToFuncMapping"?
                
> 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
>            Assignee: Prashant Kommireddi
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Prashant Kommireddi (Updated) (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Prashant Kommireddi (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prashant Kommireddi updated PIG-2375:
-------------------------------------

    Attachment: LogFieldValues.java
                LogFieldValue.java
    
> 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
>
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Commented] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172003#comment-13172003 ] 

Prashant Kommireddi commented on PIG-2375:
------------------------------------------

The problem does not seem to be that incorrect outputSchema is invoked. Rather, the root/parent UDF is always instantiated before the actual overriding UDF is invoked. 

getFieldSchema() (from UserFuncExpression) is invoked on root UDF before it is called on overriding UDF. 

{code}
  @Override
    public LogicalSchema.LogicalFieldSchema getFieldSchema() throws FrontendException {
        if (fieldSchema!=null)
            return fieldSchema;
        
        LogicalSchema inputSchema = new LogicalSchema();
        List<Operator> succs = plan.getSuccessors(this);

        if (succs!=null) {
            for(Operator lo : succs){
                if (((LogicalExpression)lo).getFieldSchema()==null) {
                    inputSchema = null;
                    break;
                }
                inputSchema.addField(((LogicalExpression)lo).getFieldSchema());
            }
        }

        // Since ef only set one time, we never change its value, so we can optimize it by instantiate only once.
        // This significantly optimize the performance of frontend (PIG-1738)
        if (ef==null)
            ef = (EvalFunc<?>) PigContext.instantiateFuncFromSpec(mFuncSpec);
        
        ef.setUDFContextSignature(signature);
        Properties props = UDFContext.getUDFContext().getUDFProperties(ef.getClass());
        if(Util.translateSchema(inputSchema)!=null)
    		props.put("pig.evalfunc.inputschema."+signature, Util.translateSchema(inputSchema));
        // Store inputSchema into the UDF context
        ef.setInputSchema(Util.translateSchema(inputSchema));
        
//WHY DOES THIS NEED TO BE CALLED ON THE EVALFUNC THAT IS NOT USED
        Schema udfSchema = ef.outputSchema(Util.translateSchema(inputSchema));

        if (udfSchema != null) {
            Schema.FieldSchema fs;
            if(udfSchema.size() == 0) {
.
.
.
.

{code}

Why would getFieldSchema() need to be invoked on root UDF when exec() actually needs to invoked on an overriding EvalFunc? 
                
> 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
>            Assignee: Prashant Kommireddi
>             Fix For: 0.9.1
>
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Commented] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172981#comment-13172981 ] 

Prashant Kommireddi commented on PIG-2375:
------------------------------------------

On having thought some more, when getArgToFuncMapping() is used the check is made based on this to invoke an overriding EvalFunc. It does not really make a lot of sense to use outputSchema(Schema inputSchema) to verify input schema once again.

The role of outputSchema (as the name suggests) should be to specify the output schema for the UDF, and NOT necessarily to verify the input schema. Though for a new user or writer of Pig UDFs this might not seem obvious when overriding UDFs.

To summarize: 

1. When UDF is not overriden, it is ok to use outputSchema to verify input schema.
2. When UDF is Overriden, it does not make sense to use outputSchema to verify input schema. This is because getArgToFuncMapping already finds a matching spec based on the input schema.
                
> 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
>            Assignee: Prashant Kommireddi
>             Fix For: 0.9.1
>
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Thejas M Nair (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2375:
-------------------------------

    Resolution: Not A Problem
        Status: Resolved  (was: Patch Available)

A visitor (TypeCheckingExpVisitor) replaces the FuncSpec with the matching class, based on the input type and values returned by getArgToFuncMapping().
It is possible that some code calls UserFuncExpression.getFieldSchema() on your base class before FuncSpec gets replaced by this visitor, but that should be harmless. 
Please feel free to open a new jira to document this behavior more clearly. 
                
> 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
>            Assignee: Prashant Kommireddi
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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

        

[jira] [Updated] (PIG-2375) Incorrect outputSchema is invoked when overloading UDF in 0.9.1

Posted by "Daniel Dai (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2375:
----------------------------

    Fix Version/s:     (was: 0.9.1)
                   0.9.2
    
> 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
>            Assignee: Prashant Kommireddi
>             Fix For: 0.9.2
>
>         Attachments: LogFieldValue.java, LogFieldValues.java
>
>
> 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