count with multiple group by keys fails
---------------------------------------

                 Key: PIG-306
                 URL: https://issues.apache.org/jira/browse/PIG-306
             Project: Pig
          Issue Type: Bug
    Affects Versions: types_branch
            Reporter: Alan Gates
             Fix For: types_branch


The query:

{code}
a = load 'myfile' as (name, age, gpa);                                          
                              
b = group a by (name, age);                                                     
                                                                                
c = foreach b generate group.name, group.age, COUNT(a.gpa);                     
                                                                                
store c into 'outfile';
{code}

generates

07-12 16:55:54,348 [main] ERROR org.apache.pig.impl.mapReduceLayer.Launcher - 
Error message from task (reduce) tip_200807090821_0580_r_000000 
java.lang.ClassCastException: org.apache.pig.data.DataByteArray cannot be cast 
to org.apache.pig.data.Tuple
at 
org.apache.pig.impl.physicalLayer.expressionOperators.POProject.getNext(POProject.java:262)
at 
org.apache.pig.impl.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:189)
at 
org.apache.pig.impl.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:148)
at 
org.apache.pig.impl.mapReduceLayer.PigMapReduce$Reduce.reduce(PigMapReduce.java:164)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:333)
at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2071)

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