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

Alan Gates commented on PIG-304:
--------------------------------

The problem is more general in nature than just distinct.  Queries such as the 
following do not work either:

a = load '/Users/gates/test/data/studenttab10' as (name, age, gpa);
b = load '/Users/gates/test/data/votertab10' as (name, age, registration, 
contributions);
c = filter a by age < 50;   
d = filter b by age < 50;  
e = cogroup c by (name, age), d by (name, age) ;
f = foreach e generate flatten(c), flatten(d);                                  
                                                                                
g = group f by registration;                                                    
                                                                                
h = foreach g generate group, SUM(f.d::contributions);                          
                                                                                
i = order h by $1;                                                              
                                                                              
dump i;

The same erro is seen at the second grouping (alias g).

> Distinct fail if previous map plan is closed
> --------------------------------------------
>
>                 Key: PIG-304
>                 URL: https://issues.apache.org/jira/browse/PIG-304
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Daniel Dai
>             Fix For: types_branch
>
>         Attachments: distinct.patch
>
>
> Distinct will fail when the previous map plan is closed. For example, the 
> following script fail:
> a = load 'a';
> b = group a by $0;
> c = foreach b generate $1;
> d = distinct c;
> dump d;

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