Pig should support ability to query unique column name when there is no 

                 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:

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} 

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