[
https://issues.apache.org/jira/browse/PIG-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thejas M Nair updated PIG-1694:
-------------------------------
Attachment: PIG-1694.1.patch
Patch passes unit tests and test-patch .
The merging of schema for union-onschema has been moved to LOUnion.getSchema().
This way a schema is always available for the union-onschema during the parsing
stage. The correct datatypes will be available in the schema returned by
LOUnion.getSchema() after TypeChecking is complete.
> union-onschema projects null schema at parsing stage for some queries
> ---------------------------------------------------------------------
>
> Key: PIG-1694
> URL: https://issues.apache.org/jira/browse/PIG-1694
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Thejas M Nair
> Assignee: Thejas M Nair
> Fix For: 0.8.0
>
> Attachments: PIG-1694.1.patch
>
>
> If the input relations of union-onschema have different aliases in the
> schemas, a subsequent statement that refers to a column alias in the union
> fails.
> eg
> {code}
> grunt> l1 = load 'x' as (a);
> grunt> l2 = load 'x' as (a,b);
> grunt> u = union onschema l1,l2;
> grunt> o = order u by a;
> 2010-10-22 14:33:56,086 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
> 1000: Error during parsing. Invalid alias: a in null
> Details at logfile: /Users/tejas/pig-0.8/branch-0.8/pig_1287783217811.log
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.