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

Santhosh Srinivasan updated PIG-528:
------------------------------------

    Patch Info: [Patch Available]

> Schema returned in UDF is not used by Pig
> -----------------------------------------
>
>                 Key: PIG-528
>                 URL: https://issues.apache.org/jira/browse/PIG-528
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-528.patch
>
>
> Using an identity UDF that returns the input schema as the output schema 
> leads to schema truncation in Pig.
> {code}
> grunt> a = load '/tudent_tab.data' as (name, age, gpa);
> grunt> b = foreach a generate IdentityFunc(name, age);
> grunt> describe b;
> b: {name: bytearray}
> --It should have been b:{(name: bytearray, age: bytearray)}
> {code}
> The outputSchema method in IdentityFunc is given below:
> {code}
>     @Override
>     public Schema outputSchema(Schema input) {
>         return input;  
>     }
> {code}

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