pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Araceli Henley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2681) TestDriverPig.countStores() does not correctly count the number of stores for pig scripts using variables for the alias
Date Mon, 07 May 2012 19:12:48 GMT

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

Araceli Henley commented on PIG-2681:
-------------------------------------

True, it doesn't work for multiple invocations of the macro. I created a sepereate Jira for
that issue: PIG-2682
                
> TestDriverPig.countStores() does not correctly count the number of stores for pig scripts
using variables for the alias
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2681
>                 URL: https://issues.apache.org/jira/browse/PIG-2681
>             Project: Pig
>          Issue Type: Test
>          Components: e2e harness
>    Affects Versions: 0.9.0, 0.9.1, 0.9.2, 0.10.0
>            Reporter: Araceli Henley
>             Fix For: 0.9.3, 0.11, 0.10.1
>
>         Attachments: PIG-2681.patch
>
>
> For  pig macros where the out parameter is referenced in a store statement, the TestDriveP.countStores()
does not correctly count the number of stores:
> For example, the store will not be counted in :
> define myMacro(in1,in2) returns A {
>  A  = load '$in1' using PigStorage('$delimeter') as (intnum1000: int,id: int,intnum5:
int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double);
>    store $A into '$out';
> }
>  countStores() matches with:
>              $count += $q[$i] =~ /store\s+[a-zA-Z][a-zA-Z0-9_]*\s+into/i;
> Since the alias has a special character "$" it doesn't count it and the test fails.
> Need to change this to:
>    $count += $q[$i] =~ /store\s+(\$)?[a-zA-Z][a-zA-Z0-9_]*\s+into/i;
> I'll submit a patch shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message