[ https://issues.apache.org/jira/browse/PIG-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kai Londenberg updated PIG-3144: -------------------------------- Description: The following code illustrates a problem concerning alias resolution in pig The schema of D2 will incorrectly be described as containing two "age" fields. And the last step in the following script will lead to a "Duplicate schema alias" error message. I only encountered this bug when using aliases for map fields. {code} DATA = LOAD 'file:///whatever' as (a:map[chararray], b:chararray); D1 = FOREACH DATA GENERATE a#'name' as name, a#'age' as age, b; D2 = FOREACH D1 GENERATE name, age, b; DESCRIBE D2; {code} Output: {code} D2: { age: chararray, age: chararray, b: chararray } {code} {code} D3 = FOREACH D2 GENERATE *; DESCRIBE D3; {code} Output: {code} <file file:///.../pig-bug-example.pig, line 20, column 16> Duplicate schema alias: age {code} This error occurs in this form in Apache Pig version 0.11.0-SNAPSHOT (r6408). A less severe variant of this bug is also present in pig 0.10.1. In 0.10.1, the "Duplicate schema alias" error message won't occur, but the schema of D2 (see above) will still have wrong duplicate alias entries. was: The following code illustrates a problem concerning alias resolution in pig 0.10.x. The schema of D2 will incorrectly be described as containing two "age" fields. And the last step in the following script will lead to a "Duplicate schema alias" error message. I only encountered this bug when using aliases for map fields. {code} DATA = LOAD 'file:///whatever' as (a:map[chararray], b:chararray); D1 = FOREACH DATA GENERATE a#'name' as name, a#'age' as age, b; D2 = FOREACH D1 GENERATE name, age, b; DESCRIBE D2; {code} Output: {code} D2: { age: chararray, age: chararray, b: chararray } {code} {code} D3 = FOREACH D2 GENERATE *; DESCRIBE D3; {code} Output: {code} <file file:///.../pig-bug-example.pig, line 20, column 16> Duplicate schema alias: age {code} Affects Version/s: (was: 0.10.0) 0.10.1 0.11 > Erroneous map entry alias resolution leading to "Duplicate schema alias" > errors > ------------------------------------------------------------------------------- > > Key: PIG-3144 > URL: https://issues.apache.org/jira/browse/PIG-3144 > Project: Pig > Issue Type: Bug > Affects Versions: 0.11, 0.10.1 > Reporter: Kai Londenberg > > The following code illustrates a problem concerning alias resolution in pig > The schema of D2 will incorrectly be described as containing two "age" > fields. And the last step in the following script will lead to a "Duplicate > schema alias" error message. > I only encountered this bug when using aliases for map fields. > {code} > DATA = LOAD 'file:///whatever' as (a:map[chararray], b:chararray); > D1 = FOREACH DATA GENERATE a#'name' as name, a#'age' as age, b; > D2 = FOREACH D1 GENERATE name, age, b; > DESCRIBE D2; > {code} > Output: > {code} > D2: { > age: chararray, > age: chararray, > b: chararray > } > {code} > {code} > D3 = FOREACH D2 GENERATE *; > DESCRIBE D3; > {code} > Output: > {code} > <file file:///.../pig-bug-example.pig, line 20, column 16> Duplicate schema > alias: age > {code} > This error occurs in this form in Apache Pig version 0.11.0-SNAPSHOT (r6408). > A less severe variant of this bug is also present in pig 0.10.1. In 0.10.1, > the "Duplicate schema alias" error message won't occur, but the schema of D2 > (see above) will still have wrong duplicate alias entries. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira