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

Reply via email to