You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Santhosh Srinivasan (JIRA)" <ji...@apache.org> on 2008/10/17 02:08:44 UTC
[jira] Updated: (PIG-499) Alias which contains substring "as"
causes Parser to throw a syntax error
[ https://issues.apache.org/jira/browse/PIG-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Santhosh Srinivasan updated PIG-499:
------------------------------------
Assignee: Santhosh Srinivasan
> Alias which contains substring "as" causes Parser to throw a syntax error
> -------------------------------------------------------------------------
>
> Key: PIG-499
> URL: https://issues.apache.org/jira/browse/PIG-499
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Environment: Hadoop 18
> Reporter: Viraj Bhat
> Assignee: Santhosh Srinivasan
> Fix For: types_branch
>
>
> ---------------------------------------------------------------------------------------
> MYDATA = load 'testfile.txt' as (f1, f2, f3, f4, f5);
> MYDATA_PROJECTION = foreach MYDATA generate f3, f5;
> CAST = group MYDATA_PROJECTION by f3;
> RESULT = foreach CAST {
> MYSORTED = ORDER MYDATA_PROJECTION by f5;
> generate flatten(MYSORTED);
> }
> dump RESULT;
> ---------------------------------------------------------------------------------------
> The above query throws a syntax error
> java.io.IOException: Encountered "dump" at line 8, column 1.
> Was expecting one of:
> "parallel" ...
> ";" ...
>
> at org.apache.pig.PigServer.parseQuery(PigServer.java:298)
> at org.apache.pig.PigServer.registerQuery(PigServer.java:263)
> at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:439)
> at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:249)
> at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:84)
> at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:64)
> at org.apache.pig.Main.main(Main.java:306)
> Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "dump" at line 8, column 1.
> Was expecting one of:
> "parallel" ...
> ";" ...
>
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.generateParseException(QueryParser.java:7763)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.jj_consume_token(QueryParser.java:7640)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:551)
> at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
> at org.apache.pig.PigServer.parseQuery(PigServer.java:295)
> ... 6 more
> ---------------------------------------------------------------------------------------
> But now changing this query to:(changing CAST to CST) makes the query execute successfully.
> ---------------------------------------------------------------------------------------
> MYDATA = load 'testfile.txt' as (f1, f2, f3, f4, f5);
> MYDATA_PROJECTION = foreach MYDATA generate f3, f5;
> CST = group MYDATA_PROJECTION by f3;
> RESULT = foreach CST {
> MYSORTED = ORDER MYDATA_PROJECTION by f5;
> generate flatten(MYSORTED);
> }
> dump RESULT;
> ---------------------------------------------------------------------------------------
> I believe this might have been caused due to the patch which resolved issue: https://issues.apache.org/jira/browse/PIG-437
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.