[ 
https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xuefu Zhang resolved PIG-1462.
------------------------------

    Resolution: Fixed

Better error message is given now:

runt> in = load 'data' using PigStorage() as (m:map[]);
grunt> tags = foreach in generate m#'k1' as (tagtuple: tuple(chararray));
2011-03-10 11:11:12,479 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
0: line 13:37 mismatched input [@228,503:503='(',<104>,13:37] expecting 
IDENTIFIER


> No informative error message on parse problem
> ---------------------------------------------
>
>                 Key: PIG-1462
>                 URL: https://issues.apache.org/jira/browse/PIG-1462
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ankur
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>
> Consider the following script
> in = load 'data' using PigStorage() as (m:map[]);
> tags = foreach in generate m#'k1' as (tagtuple: tuple(chararray));
> dump tags;
> This throws the following error message that does not really say that this is 
> a bad declaration
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during 
> parsing. Encountered "" at line 2, column 38.
> Was expecting one of:
>     
>       at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1170)
>       at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1114)
>       at org.apache.pig.PigServer.registerQuery(PigServer.java:425)
>       at 
> org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:737)
>       at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:324)
>       at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:162)
>       at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:138)
>       at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:89)
>       at org.apache.pig.Main.main(Main.java:391)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to