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

Thejas M Nair updated PIG-1666:
-------------------------------

    Attachment: PIG-1666.1.patch

PIG-1666.1.patch 
When union onschema is used, TypeCheckingValidator is called more than once. 
But lineage information set  in fieldschema of LOCast during first invocation 
of TypeCheckingValidator was still there, causing issues with the lineage 
logic. The patch fixes it. I have also added checks to TypeCheckingVisitor to 
check for any conflicting lineage information for LOCast . 

Unit tests and test-patch have passed.


> union onschema fails when the input relation has cast from bytearray to 
> another type
> ------------------------------------------------------------------------------------
>
>                 Key: PIG-1666
>                 URL: https://issues.apache.org/jira/browse/PIG-1666
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>             Fix For: 0.8.0
>
>         Attachments: PIG-1666.1.patch
>
>
> Script- 
> {code}
> l = load 't.txt' as (a,b);
> f1 = foreach l generate (chararray)a;
> u = union onschema f1, l;
> dump u;
> {code}
> exception -
> {code}
> org.apache.pig.backend.executionengine.ExecException: ERROR 1075: Received a 
> bytearray from the UDF. Cannot determine how to convert the bytearray to 
> string.
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(POCast.java:652)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:367)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:291)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POUnion.getNext(POUnion.java:163)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:236)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:231)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:1)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
>         at 
> org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)
> {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