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

Cheolsoo Park updated PIG-3643:
-------------------------------

    Attachment: PIG-3643-1.patch

Uploading a patch that fixes the regression.

To summarize the issue-
# Before PIG-3581:
{code}
if X, do a
else if Y, do b
else do c
{code}
# With PIG-3581:
{code}
If Y && N, do b
else if X, do a
else do c
{code}
As can be seen, if Y && !N, it falls into c now while we used to fall into b.
# With my patch:
{code}
If Y && N, do b
else if X, do a
else if Y, do b
else do c
{code}

I verified-
* TestColumnAliasConversion passes.
* TestLogicalPlanGenerator passes.
* The new test cases added by PIG-3581 pass.
* The example in this jira wrks.

> Nested Foreach with UDF and bincond is broken
> ---------------------------------------------
>
>                 Key: PIG-3643
>                 URL: https://issues.apache.org/jira/browse/PIG-3643
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>            Reporter: Rohini Palaniswamy
>            Assignee: Cheolsoo Park
>         Attachments: PIG-3643-1.patch
>
>
> Was checking out PIG-3000. 
> A = load 'data' as (a:chararray);
> B = foreach A { c = UPPER(a); generate ((c eq 'TEST') ? 1 : 0), ((c eq 'DEV') 
> ? 1 : 0); }
> This now throws "Invalid field projection. Projected field [c] does not exist 
> in schema".  Works fine in 0.11. Broken in trunk. Haven't checked 0.12. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to