You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Araceli Henley (JIRA)" <ji...@apache.org> on 2012/05/04 23:24:48 UTC
[jira] [Created] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Araceli Henley created PIG-2681:
-----------------------------------
Summary: 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
Reporter: Araceli Henley
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
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Rohini Palaniswamy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohini Palaniswamy updated PIG-2681:
------------------------------------
Status: Open (was: Patch Available)
Cancelling this patch as it is not a suitable solution for all cases. Easier solution would be to just have a variable that gives the number of stores for complex tests as suggested by [~aklochkov].
> 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.10.0, 0.9.2, 0.9.1, 0.9.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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-2681:
--------------------------------
Fix Version/s: (was: 0.10.1)
(was: 0.9.3)
(was: 0.11)
0.12
> 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.12
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Araceli Henley (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Commented] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269841#comment-13269841 ]
Daniel Dai commented on PIG-2681:
---------------------------------
It is hard to use -r to expand Macro then do the counting? Otherwise if the Macro is not used (or used multiple times), we still get wrong counting.
> 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
[jira] [Commented] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13402621#comment-13402621 ]
Daniel Dai commented on PIG-2681:
---------------------------------
The fix only works if the macro is invoked once. Maybe a better and more elegant solution is needed.
> 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
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Araceli Henley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Araceli Henley updated PIG-2681:
--------------------------------
Status: Open (was: Patch Available)
> 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.10.0, 0.9.2, 0.9.1, 0.9.0
> Reporter: Araceli Henley
> Fix For: 0.9.3, 0.11, 0.10.1
>
>
> 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
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Araceli Henley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Araceli Henley updated PIG-2681:
--------------------------------
Fix Version/s: 0.10.1
0.11
0.9.3
Affects Version/s: 0.9.0
0.9.1
0.9.2
0.10.0
Status: Patch Available (was: Open)
> 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.10.0, 0.9.2, 0.9.1, 0.9.0
> Reporter: Araceli Henley
> Fix For: 0.9.3, 0.11, 0.10.1
>
>
> 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
[jira] [Commented] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268822#comment-13268822 ]
Daniel Dai commented on PIG-2681:
---------------------------------
+1, will commit soon.
> 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
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Araceli Henley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Araceli Henley updated PIG-2681:
--------------------------------
Attachment: PIG-2681.patch
> 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
[jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not
correctly count the number of stores for pig scripts using variables for
the alias
Posted by "Araceli Henley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Araceli Henley updated PIG-2681:
--------------------------------
Status: Patch Available (was: Open)
Includes test and resolution for pig harness
> 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.10.0, 0.9.2, 0.9.1, 0.9.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