[ 
https://issues.apache.org/jira/browse/PIG-550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653442#action_12653442
 ] 

Olga Natkovich commented on PIG-550:
------------------------------------

Can this be marked as duplicate of PIG-449? Would the work we are doing for 
PIG-449, solve this issue?

> java.lang.ClassCastException: java.lang.String cannot be cast to 
> org.apache.pig.data.Tuple
> ------------------------------------------------------------------------------------------
>
>                 Key: PIG-550
>                 URL: https://issues.apache.org/jira/browse/PIG-550
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>
> ======================================================================================================================
> Map tasks resulting from the below Pig Script throws the following exception. 
> Note 'one' is a dummy input containing, number 1.
> ======================================================================================================================
> {code}
> A = load 'one' using PigStorage() as ( one );
> B = foreach A generate
>         {
>                 (
>                 ('p1-t1-e1', 'p1-t1-e2'),
>                 ('p1-t2-e1', 'p1-t2-e2')
>                 ),
>                 (
>                 ('p2-t1-e1', 'p2-t1-e2'),
>                 ('p2-t2-e1', 'p2-t2-e2')
>                 )
>         };
> describe B;
> C = foreach B generate
>         $0 as pairbag { pair: ( t1: (e1, e2), t2: (e1, e2) ) }; describe C;
> D = foreach C generate FLATTEN(pairbag);
> describe D;
> E = foreach D generate
>         pair.t1.e2      as t1e2,
>         pair.t2.e1      as t2e1;
> describe E;
> dump E;
> {code}
> ======================================================================================================================
> 2008-12-01 20:07:53,974 [main] ERROR 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher - Error 
> message from task (map) 
> task_200810152105_0207_m_000000java.lang.ClassCastException: java.lang.String 
> cannot be cast to org.apache.pig.data.Tuple
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:279)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:226)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:133)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:233)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:254)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:180)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:170)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:158)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:65)
>         at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:227)
>         at 
> org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2209)
> ======================================================================================================================

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