Issue with setting "b = a;"
---------------------------
Key: PIG-2630
URL: https://issues.apache.org/jira/browse/PIG-2630
Project: Pig
Issue Type: Bug
Affects Versions: 0.10, 0.11
Reporter: Jonathan Coveney
Fix For: 0.10, 0.11
The following gives an error:
{code}
a = load 'thing' as (x:int);
b = a; c = join a by x, b by x;
{code}
Error:
{code}
2012-04-03 14:02:47,434 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
1200: Pig script failed to parse:
<line 14, column 4> pig script failed to validate:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with
nothing to reference!
{code}
No issue with the following, however
{code}
a = load 'thing' as (x:int);
b = foreach a generate *;
c = join a by x, b by x;
{code}
oh and here is the log:
{code}
$ cat pig_1333487146863.log
Pig Stack Trace
---------------
ERROR 1200: Pig script failed to parse:
<line 3, column 4> pig script failed to validate:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with
nothing to reference!
Failed to parse: Pig script failed to parse:
<line 3, column 4> pig script failed to validate:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with
nothing to reference!
at
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:182)
at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1566)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1539)
at org.apache.pig.PigServer.registerQuery(PigServer.java:541)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:945)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:392)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:190)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:166)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
at org.apache.pig.Main.run(Main.java:535)
at org.apache.pig.Main.main(Main.java:153)
Caused by:
<line 3, column 4> pig script failed to validate:
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with
nothing to reference!
at
org.apache.pig.parser.LogicalPlanBuilder.buildJoinOp(LogicalPlanBuilder.java:363)
at
org.apache.pig.parser.LogicalPlanGenerator.join_clause(LogicalPlanGenerator.java:11441)
at
org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1491)
at
org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:791)
at
org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:509)
at
org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:384)
at
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:175)
... 10 more
================================================================================
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira