You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Travis Woodruff (JIRA)" <ji...@apache.org> on 2017/11/02 18:37:01 UTC

[jira] [Created] (PIG-5312) Uids not set in inner schemas after UNION ON_SCHEMA

Travis Woodruff created PIG-5312:
------------------------------------

             Summary: Uids not set in inner schemas after UNION ON_SCHEMA
                 Key: PIG-5312
                 URL: https://issues.apache.org/jira/browse/PIG-5312
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.17.0, 0.16.0
            Reporter: Travis Woodruff
            Assignee: Travis Woodruff
            Priority: Normal


Ran into a failure with a script of the form:

{code}
u = union on_schema 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)