[
https://issues.apache.org/jira/browse/PIG-2719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13282987#comment-13282987
]
Daniel Dai commented on PIG-2719:
---------------------------------
Yes, this happens in describe. However, explain show the right result.
Describe path take a shortcut, which does not go through the logical layer
rules. That cause the problem.
> Describe displays wrong column name after self-join
> ---------------------------------------------------
>
> Key: PIG-2719
> URL: https://issues.apache.org/jira/browse/PIG-2719
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.2, 0.10.0
> Reporter: Brian Tan
>
> This is demonstrated by the following simple example.
> Notice e and f wrongly describe the name of the first column as y2 rather
> than y1
> 1.txt:
> 1, 2, 3
> 4, 5, 6
> 7, 8, 9
> a = load '1.txt' using PigStorage(',') as (x:int, y:int, z:int);
> b = foreach a generate *;
> c = join a by x, b by x;
> d = foreach c generate a.y as y1, b.y as y2;
> describe d;
> d: {y1: int,y2: int}
> e = foreach d generate y1, y2;
> describe e;
> e: {y2: int,y2: int}
> f = foreach e generate y1;
> describe f;
> f: {y2: int}
--
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