You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Rohini Palaniswamy (JIRA)" <ji...@apache.org> on 2014/03/21 04:41:43 UTC

[jira] [Commented] (PIG-3826) Outer join with PushDownForEachFlatten generates wrong result

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

Rohini Palaniswamy commented on PIG-3826:
-----------------------------------------

+1

> Outer join with PushDownForEachFlatten generates wrong result
> -------------------------------------------------------------
>
>                 Key: PIG-3826
>                 URL: https://issues.apache.org/jira/browse/PIG-3826
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.12.1, 0.13.0
>
>         Attachments: PIG-3826-1.patch
>
>
> The following script generates wrong result:
> A = load 'A.txt' using PigStorage(',') as (id:chararray, value:double);
> B = load 'B.txt' using PigStorage(',') as (id:chararray, name:chararray);
> t1 = group A by id;
> t2 = foreach t1 { r1 = filter $1 by (value>1); r2 = limit r1 1; generate group as id, FLATTEN(r2.value) as value; };
> t3 = join B by id LEFT OUTER, t2 by id;
> dump t3;
> A.txt:
> 1,1.5
> 2,0
> 3,-2.0
> 4,8.9
> B.txt:
> 1,Ofer
> 2,Jordan
> 3,Noa
> 4,Daniel
> Expected output:
> (1,Ofer,1,1.5)
> (2,Jordan,,)
> (3,Noa,,)
> (4,Daniel,4,8.9)
> But we get:
> (1,Ofer,1,1.5)
> (4,Daniel,4,8.9)
> With the option "-t PushDownForEachFlatten", the issue goes away.



--
This message was sent by Atlassian JIRA
(v6.2#6252)