hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santhosh Srinivasan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-306) count with multiple group by keys fails
Date Wed, 23 Jul 2008 00:55:31 GMT

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

Santhosh Srinivasan commented on PIG-306:
-----------------------------------------

Fixed the issue with the cogroup schema computation. The logical plan for the query in the
bug report will now look like:

{noformat}
ForEach Test-Plan-Builder-12 Schema: {name: bytearray,age: bytearray,long} Type: bag
|   |
|   Project Test-Plan-Builder-5 Projections: [0] Overloaded: false FieldSchema: name: bytearray
Type: bytearray
|   Input: Project Test-Plan-Builder-4 Projections: [0] Overloaded: false|
|   |---Project Test-Plan-Builder-4 Projections: [0] Overloaded: false FieldSchema: group:
tuple({name: bytearray,age: bytearray}) Type: tuple
|       Input: CoGroup Test-Plan-Builder-3
|   |
|   Project Test-Plan-Builder-7 Projections: [1] Overloaded: false FieldSchema: age: bytearray
Type: bytearray
|   Input: Project Test-Plan-Builder-6 Projections: [0] Overloaded: false|
|   |---Project Test-Plan-Builder-6 Projections: [0] Overloaded: false FieldSchema: group:
tuple({name: bytearray,age: bytearray}) Type: tuple
|       Input: CoGroup Test-Plan-Builder-3
|   |
|   UserFunc Test-Plan-Builder-10 function: org.apache.pig.builtin.COUNT FieldSchema: long
Type: long
|   |
|   |---Project Test-Plan-Builder-9 Projections: [2] Overloaded: false FieldSchema: gpa: bytearray
cn: 2 Type: bytearray
|       Input: Project Test-Plan-Builder-8 Projections: [1] Overloaded: false|
|       |---Project Test-Plan-Builder-8 Projections: [1] Overloaded: false FieldSchema: a:
bag({name: bytearray,age: bytearray,gpa: bytearray}) Type: bag
|           Input: CoGroup Test-Plan-Builder-3
|
|---CoGroup Test-Plan-Builder-3 Schema: {group: (name: bytearray,age: bytearray),a: {name:
bytearray,age: bytearray,gpa: bytearray}} Type: Unknown
    |   |
    |   Project Test-Plan-Builder-1 Projections: [0] Overloaded: false FieldSchema: name:
bytearray cn: 0 Type: bytearray
    |   Input: Load Test-Plan-Builder-
    |   |
    |   Project Test-Plan-Builder-2 Projections: [1] Overloaded: false FieldSchema: age: bytearray
cn: 1 Type: bytearray
    |   Input: Load Test-Plan-Builder-
    |
    |---Load Test-Plan-Builder-0 Schema: {name: bytearray,age: bytearray,gpa: bytearray} Type:
bag

{noformat}

> 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
>            Assignee: Santhosh Srinivasan
>             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.


Mime
View raw message