You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Richard Ding (JIRA)" <ji...@apache.org> on 2011/05/04 21:50:04 UTC

[jira] [Updated] (PIG-2035) Macro expansion doesn't handle multiple expansions of same macro inside another macro

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

Richard Ding updated PIG-2035:
------------------------------

    Attachment: PIG-2035_1.patch

> Macro expansion doesn't handle multiple expansions of same macro inside another macro
> -------------------------------------------------------------------------------------
>
>                 Key: PIG-2035
>                 URL: https://issues.apache.org/jira/browse/PIG-2035
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.9.0
>            Reporter: Richard Ding
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-2035_1.patch
>
>
> Here is the use case:
> {code}
> define test ( in, out, x ) returns c { 
>     a = load '$in' as (name, age, gpa);
>     b = group a by gpa;
>     $c = foreach b generate group, COUNT(a.$x);
>     store $c into '$out';
> };
> define test2( in, out ) returns x { 
>     $x = test( '$in', '$out', 'name' );
>     $x = test( '$in', '$out.1', 'age' );
>     $x = test( '$in', '$out.2', 'gpa' );
> };
> x = test2('studenttab10k', 'myoutput');
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira