[ 
https://issues.apache.org/jira/browse/PIG-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Dai updated PIG-2037:
----------------------------

    Fix Version/s:     (was: 0.9.0)

Xuefu find this test case because it is in a valid test case in old logical 
plan test suite: TestLogicalPlanBuilder. However, the script fail in all 0.6, 
0.7, 0.8. The reason the test case success is because we don't invoke validator 
in tests. 

Some generate thoughts about alias conflict: We shall defer dup-alias check as 
long as we don't have ambiguity. For example:

{code}
B = foreach A generate name, UDF(name) as name;
store B into '111';
{code}

This should be valid since there is no ambiguity. The following script should 
fail:

{code}
B = foreach A generate name, UDF(name) as name;
C = foreach B generate name;
{code}

Because "name" in C is ambiguous. 

Unlink this to 0.9 since it is not a regression.

> Valid query fails to validate
> -----------------------------
>
>                 Key: PIG-2037
>                 URL: https://issues.apache.org/jira/browse/PIG-2037
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Daniel Dai
>
> The following test case seems valid, but it fails to validate in 0.9.
> a = load 'st10k' as (name, age, gpa);
> b = group a by name;
> c = foreach b generate flatten(a);
> d = filter c by name != 'fred';
> e = group d by name;\n"  +
> f = foreach e generate flatten(d);
> g = foreach f generate name, d::a::name, a::name;
> store g into 'output';"
> ERROR 1108: <line 7, column 14> Duplicate schema alias: d::a::name

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to