[ https://issues.apache.org/jira/browse/PIG-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Koji Noguchi updated PIG-5312: ------------------------------ Resolution: Fixed Hadoop Flags: Reviewed Fix Version/s: 0.18.0 Status: Resolved (was: Patch Available) Committed to trunk (0.18). Thank you for your patch [~tmwoodruff]!!! Also, thanks for the additional review Rohini! > Uids not set in inner schemas after UNION ONSCHEMA > -------------------------------------------------- > > Key: PIG-5312 > URL: https://issues.apache.org/jira/browse/PIG-5312 > Project: Pig > Issue Type: Bug > Affects Versions: 0.16.0, 0.17.0 > Reporter: Travis Woodruff > Assignee: Travis Woodruff > Fix For: 0.18.0 > > Attachments: PIG-5312.patch, PIG-5312_fixedspace.patch > > > Ran into a failure with a script of the form: > {code} > u = union onschema x, y; -- schema: (a, b: {(m:int, n: chararray)}) > z = foreach u { > i = foreach b generate m + 5; > generate a, i; > } > {code} > The issue ended up being that {{LOUnion}} is not setting uids on inner > schemas. This means that uids on inner schema fields are all -1, so when > {{ProjectExpression.getFieldSchema()}} tries to look up the fields in the > inner select from the inner schema, all the fields match, and the last > field's schema ends up being returned. In the example above this causes > {{TypeCheckingExpVisitor.addCastsToNumericBinExpression()}} to fail for the > addition operator (since the returned field schema is a chararray). > This only seems to affect the schema, so I don't think this should cause bad > data to be produced. -- This message was sent by Atlassian JIRA (v6.4.14#64029)