[ 
https://issues.apache.org/jira/browse/PIG-866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725303#action_12725303
 ] 

Santhosh Srinivasan commented on PIG-866:
-----------------------------------------

This support has to be extended to the FieldSchema class when Java APIs are 
used to query the aliases.

> Pig should support ability to query unique column name when there is no 
> ambiguity
> ---------------------------------------------------------------------------------
>
>                 Key: PIG-866
>                 URL: https://issues.apache.org/jira/browse/PIG-866
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.4.0
>            Reporter: Santhosh Srinivasan
>             Fix For: 0.4.0
>
>
> Currently, the default alias of a column following a flatten contains the 
> disambiguator  "::".  For columns that have a unique name, the "::" 
> disambiguator is not required. Although, Pig supports column access via the 
> unique name and the disambiguated name, there is no support to retrieve the 
> unique column name. This is a nice to have enhancement. An example below will 
> illustrate the issue:
> {code}
> grunt> a = load 'input' as (name, age, gpa); 
> grunt> b = group a ALL;
> grunt> c = foreach b generate flatten(a);    
> grunt> describe c;
> c: {a::name: bytearray,a::age: bytearray,a::gpa: bytearray} 
> grunt> d = foreach c generate name;          
> grunt> describe d;                           
> d: {a::name: bytearray} 
> {code}
> In the example shown above, although the column name is allowed in the 
> relation 'd', the name of the column appears as 'a::name' in the schema. The 
> workaround for this issue is to use the AS clause in the foreach. However, 
> this is cumbersome for users and its something that can be fixed within Pig.

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