[ 
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.

Reply via email to