You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Santhosh Srinivasan (JIRA)" <ji...@apache.org> on 2008/09/20 20:43:44 UTC

[jira] Created: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
------------------------------------------------------------------------------------------------------

                 Key: PIG-442
                 URL: https://issues.apache.org/jira/browse/PIG-442
             Project: Pig
          Issue Type: Bug
    Affects Versions: types_branch
            Reporter: Santhosh Srinivasan
            Assignee: Santhosh Srinivasan
             Fix For: types_branch


In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:

{code}
grunt> a = load 'one' as (name, age, gpa);
grunt> b = load 'two' as (name, age, height);
grunt> c = cogroup a by name, b by name;
grunt> d = foreach c generate flatten(a), flatten(b);
grunt> e = group d by height;
grunt> f = foreach e generate group, COUNT(d.a::height);
114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
        at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
        at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
        at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633076#action_12633076 ] 

Olga Natkovich commented on PIG-442:
------------------------------------

Sorry, must be this one then: Testcase: testQueryFail94 took 0.004 sec
    FAILED
null
junit.framework.AssertionFailedError: null
    at org.apache.pig.test.TestLogicalPlanBuilder.testQueryFail94(TestLogicalPlanBuilder.java:1349)


> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santhosh Srinivasan updated PIG-442:
------------------------------------

    Attachment: PIG-442.patch

Attached patch (PIG-442.patch) fixes the following issue:

1. Use of unambiguous column names with the :: specifier is allowed in statements that follow the foreach flatten statements
2. It rolls back the fix in PIG-436

The following unit test case still fails:

    [junit] Running org.apache.pig.test.TestEvalPipeline
    [junit] Tests run: 11, Failures: 1, Errors: 0, Time elapsed: 218.337 sec
    [junit] Test org.apache.pig.test.TestEvalPipeline FAILED


> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich resolved PIG-442.
--------------------------------

    Resolution: Cannot Reproduce

patch commited. thanks santhosh!

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch, PIG-442_1.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santhosh Srinivasan updated PIG-442:
------------------------------------

    Attachment: PIG-442_1.patch

New patch, PIG-442_1.patch which fixes the failing test case. The keys of the map were not sorted when the error message is printed. The string comparison in the unit test case, had one order and the failing test case had a different order.


> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch, PIG-442_1.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633026#action_12633026 ] 

Olga Natkovich commented on PIG-442:
------------------------------------

Santhosh, do we have unit tests for both 442 and 436?

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633036#action_12633036 ] 

Olga Natkovich commented on PIG-442:
------------------------------------

First one. I see the following error in the log:

------------- Standard Error -----------------
Printing the logical plan
Store Test-Plan-Builder-95 Schema: null Type: Unknown
|
|---Load Test-Plan-Builder-94 Schema: null Type: bag


08/09/21 00:46:55 ERROR test.TestLogicalPlanBuilder: org.apache.pig.impl.logicalLayer.parser.ParseException: Unrecognized alias A
08/09/21 00:46:55 ERROR test.TestLogicalPlanBuilder: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "group" at line 1, column 9.
Was expecting one of:
    <IDENTIFIER> ...
    "(" ...

08/09/21 00:46:55 ERROR test.TestLogicalPlanBuilder: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "generate" at line 1, column 1.
Was expecting one of:
    "define" ...
    "load" ...
    "filter" ...
    "foreach" ...
    "order" ...
    "distinct" ...
    "cogroup" ...
    "join" ...
    "cross" ...
    "union" ...
    "split" ...
    "group" ...
    "stream" ...
    "store" ...
    "limit" ...
    <IDENTIFIER> ...
    "(" ...



> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santhosh Srinivasan updated PIG-442:
------------------------------------

    Patch Info: [Patch Available]

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633032#action_12633032 ] 

Olga Natkovich commented on PIG-442:
------------------------------------

I see one failure in TestLogicalPlanBuilder

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633035#action_12633035 ] 

Santhosh Srinivasan commented on PIG-442:
-----------------------------------------

Which test case is it? I did a fresh checkout and applied the patch. All test cases for TestLogicalPlanBuilder pass

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633027#action_12633027 ] 

Santhosh Srinivasan commented on PIG-442:
-----------------------------------------

Yes, we do. Since PIG-442 is rolling back PIG-436, I had to change the unit test cases for PIG-436.

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-442) Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633039#action_12633039 ] 

Santhosh Srinivasan commented on PIG-442:
-----------------------------------------

Thats one of the negative test cases that checks if a Parser error is thrown. It appears in every run.

> Disambiguated alias after a foreach flatten is not accessible a couple of statements after the foreach
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-442
>                 URL: https://issues.apache.org/jira/browse/PIG-442
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: PIG-442.patch
>
>
> In statements following a foreach which flattens its cogrouped inputs, unambiguous column names are not accessible via the :: specifier. A reproducible case is given below:
> {code}
> grunt> a = load 'one' as (name, age, gpa);
> grunt> b = load 'two' as (name, age, height);
> grunt> c = cogroup a by name, b by name;
> grunt> d = foreach c generate flatten(a), flatten(b);
> grunt> e = group d by height;
> grunt> f = foreach e generate group, COUNT(d.a::height);
> 114501 [main] ERROR org.apache.pig.tools.grunt.GruntParser  - java.io.IOException: Invalid alias: a::height in {a::name: bytearray,a::age: bytearray,gpa: bytearray,b::name: bytearray,b::age: bytearray,height: bytearray}
>         at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
>         at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
>         at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.