You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/03/20 02:30:29 UTC

[jira] Updated: (PIG-583) Bag constants used in non foreach statements cause lexical errors

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

Olga Natkovich updated PIG-583:
-------------------------------

    Fix Version/s: 0.10

> Bag constants used in non foreach statements cause lexical errors
> -----------------------------------------------------------------
>
>                 Key: PIG-583
>                 URL: https://issues.apache.org/jira/browse/PIG-583
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.2.0
>            Reporter: Santhosh Srinivasan
>            Assignee: Xuefu Zhang
>            Priority: Minor
>             Fix For: 0.9.0, 0.10
>
>
> Use of bag constants in non-foreach statement cause lexical errors in Pig. The root cause is the inability of grunt to distinguish between nested block and bag constant in non-foreach statements.
> {code}
> grunt> a = load 'input'; 
> grunt> b = filter a by ($0 eq {(1)});
> 2008-12-29 14:12:15,306 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: Encountered " <FILTEROP> "eq "" at line 1, column 21.
> Was expecting one of:
>     "*" ...
>     ")" ...
>     "." ...
>     "+" ...
>     "-" ...
>     "/" ...
>     "%" ...
>     "#" ...
> ...
> org.apache.pig.tools.pigscript.parser.TokenMgrError: Lexical error at line 2, column 29.  Encountered: ")" (41), after : ""
>         at org.apache.pig.tools.pigscript.parser.PigScriptParserTokenManager.getNextToken(PigScriptParserTokenManager.java:2608)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.jj_ntk(PigScriptParser.java:658)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:84)
>         at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:94)
>         at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
>         at org.apache.pig.Main.main(Main.java:282)
> {code}

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