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

Dmitriy V. Ryaboy resolved PIG-2118.
------------------------------------

    Resolution: Not A Problem

This is partially not a problem (user was auto-generating incorrect syntax), 
and partially a ux issue fixed in a separate ticket (user should've been told 
at compile time that he was using incorrect syntax). Closing.
                
> ClassCastException when using group.$0
> --------------------------------------
>
>                 Key: PIG-2118
>                 URL: https://issues.apache.org/jira/browse/PIG-2118
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.1
>         Environment: CentOS 5.6
> Hadoop 0.20.2
> Subversion 
> https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
> Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010
> Apache Pig version 0.8.1 (r1094835)
> compiled Apr 18 2011, 19:26:53
> Also reproduced on:
> CentOS 5.5
> Apache Pig version 0.8.0-cdh3u0 (rexported)
> compiled Mar 25 2011, 16:16:24
> Hadoop 0.20.2-CDH3B4
> Subversion  -r 3aa7c91592ea1c53f3a913a581dbfcdfebe98bfe
> Compiled by root on Mon Feb 21 17:31:12 EST 2011
> From source with checksum cd3f3059d069da355d3991b499d42c3b
>            Reporter: John Amos
>            Priority: Blocker
>
> Create an input file named "key_only" that contains a single number.
> key_only = LOAD 'key_only' AS (theKey: long);
> A = GROUP key_only BY theKey;
> B = FOREACH A GENERATE group.$0 AS theKey;
> dump B;
> Processing fails with the following error:
> Backend error message
> ---------------------
> java.lang.ClassCastException: java.lang.Long cannot be cast to 
> org.apache.pig.data.Tuple
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:392)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:276)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:138)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:276)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:345)
>         at 
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:290)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.runPipeline(PigMapReduce.java:434)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.processOnePackageOutput(PigMapReduce.java:402)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.reduce(PigMapReduce.java:382)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.reduce(PigMapReduce.java:251)
>         at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176)
>         at 
> org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:571)
>         at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:413)
>         at org.apache.hadoop.mapred.Child$4.run(Child.java:240)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:396)
>         at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1115)
>         at org.apache.hadoop.mapred.Child.main(Child.java:234)

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

        

Reply via email to