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

[jira] [Commented] (PIG-3000) Optimize nested foreach

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

Mona Chitnis commented on PIG-3000:
-----------------------------------

Started to take a stab at this. Patch on Reviewboard
https://reviews.apache.org/r/17376/

Yet to fix some final issues with the right Projection and making this work for all testcases

> Optimize nested foreach
> -----------------------
>
>                 Key: PIG-3000
>                 URL: https://issues.apache.org/jira/browse/PIG-3000
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.10.0
>            Reporter: Richard Ding
>
> In this Pig script:
> {code}
> A = load 'data' as (a:chararray);
> B = foreach A { c = UPPER(a); generate ((c eq 'TEST') ? 1 : 0), ((c eq 'DEV') ? 1 : 0); }
> {code}
> The Eval function UPPER is called twice for each record.
> This should be optimized so that the UPPER is called only once for each record



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