You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ankur (JIRA)" <ji...@apache.org> on 2010/06/23 06:30:49 UTC

[jira] Created: (PIG-1462) No informative error message on parse problem

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


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-1462) No informative error message on parse problem

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881550#action_12881550 ] 

Ashutosh Chauhan commented on PIG-1462:
---------------------------------------

This has come up before. As noted on PIG-798 correct way to achieve this is
{code}
grunt> in = load 'data' using PigStorage() as (m:map[]);                 
grunt> tags = foreach in generate (tuple(chararray)) m#'k1' as tagtuple;                    
grunt> dump tags;

{code}
 
We probably need to add a note about casting in cookbook. Also, need to generate better error message.

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-1462) No informative error message on parse problem

Posted by "Ankur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881551#action_12881551 ] 

Ankur commented on PIG-1462:
----------------------------

Right, the JIRA is for adding a better error message that doesn't leave a user guessing

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (PIG-1462) No informative error message on parse problem

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates reassigned PIG-1462:
-------------------------------

    Assignee: Xuefu Zhang

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1462) No informative error message on parse problem

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-1462:
--------------------------------

    Fix Version/s: 0.9.0
                       (was: 0.8.0)

Pig 0.9 release will focus on error handling

> 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
>             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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-1462) No informative error message on parse problem

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-1462:
--------------------------------

    Fix Version/s: 0.8.0

> 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
>             Fix For: 0.8.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.
-
You can reply to this email to add a comment to the issue online.