failed to parse simple macro
----------------------------
Key: PIG-2372
URL: https://issues.apache.org/jira/browse/PIG-2372
Project: Pig
Issue Type: Bug
Affects Versions: 0.10, 0.9.2
Environment:
Apache Pig version 0.9.2.1111101150 (r1200499)
compiled Nov 10 2011, 19:50:15
-bash-3.1$ hadoop version
Hadoop 0.23.0.1111080202
Subversion
http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23.0/hadoop-common-project/hadoop-common
-r 1196973
Compiled by hadoopqa on Tue Nov 8 02:12:04 PST 2011
>From source with checksum 4e42b2d96c899a98a8ab8c7cc23f27ae
Reporter: Araceli Henley
define test(in ) returns B {
A = load '$in' using PigStorage() as (name:chararray, age:int, gpa:double);
$B = load '$in' using PigStorage() as (name, age, gpa);
describe A;
}
X = test('/user/user1/pig/tests/data/singlefile/studenttab10k');
Pig Stack Trace
---------------
ERROR 1200: <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 7> Failed to parse macro 'test'. Reason: <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 4, column 12> Syntax error, unexpected symbol at or near 'A'
macro content:
A = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name:chararray, age:int, gpa:double);
X = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name, age, gpa);
describe A;
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during
parsing. <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 7> Failed to parse macro 'test'. Reason: <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 4, column 12> Syntax error, unexpected symbol at or near 'A'
macro content:
A = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name:chararray, age:int, gpa:double);
X = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name, age, gpa);
describe A;
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1639)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1584)
at org.apache.pig.PigServer.registerQuery(PigServer.java:584)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:942)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:188)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:164)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:81)
at org.apache.pig.Main.run(Main.java:561)
at org.apache.pig.Main.main(Main.java:111)
Caused by: Failed to parse: <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 7> Failed to parse macro 'test'. Reason: <file
/grid/2/dev/pigqa/out/pigtest/user1/user1.1321116151/Macro_Negative_24.pig,
line 4, column 12> Syntax error, unexpected symbol at or near 'A'
macro content:
A = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name:chararray, age:int, gpa:double);
X = load '/user/user1/pig/tests/data/singlefile/studenttab10k' using
PigStorage() as (name, age, gpa);
describe A;
at org.apache.pig.parser.PigMacro.maskAlias(PigMacro.java:201)
at org.apache.pig.parser.PigMacro.inline(PigMacro.java:101)
at org.apache.pig.parser.PigMacro.macroInline(PigMacro.java:456)
at
org.apache.pig.parser.QueryParserDriver.inlineMacro(QueryParserDriver.java:279)
at
org.apache.pig.parser.QueryParserDriver.expandMacro(QueryParserDriver.java:268)
at
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:165)
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1631)
... 9 more
================================================================================
--
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