You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/03/15 19:11:38 UTC

[jira] Created: (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors

display the contents of line and indicate the position of the erroneous token for syntax errors
-----------------------------------------------------------------------------------------------

                 Key: PIG-1908
                 URL: https://issues.apache.org/jira/browse/PIG-1908
             Project: Pig
          Issue Type: Improvement
    Affects Versions: 0.9.0
            Reporter: Thejas M Nair
             Fix For: 0.9.0


With latest version of the parser, the line number and position of the erroneous token are displayed.

For example -
{code}
> cat err.pig
l = load 'x' ;
f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
dump f1;

> pig -x local       err.pig
2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
{code}

It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long.
For example, the error message could be -

{code}
2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
                                                ^ 
{code}



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

[jira] Updated: (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors

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

Olga Natkovich updated PIG-1908:
--------------------------------

    Assignee: Xuefu Zhang

> display the contents of line and indicate the position of the erroneous token for syntax errors
> -----------------------------------------------------------------------------------------------
>
>                 Key: PIG-1908
>                 URL: https://issues.apache.org/jira/browse/PIG-1908
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>
> With latest version of the parser, the line number and position of the erroneous token are displayed.
> For example -
> {code}
> > cat err.pig
> l = load 'x' ;
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
> dump f1;
> > pig -x local       err.pig
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> {code}
> It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long.
> For example, the error message could be -
> {code}
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
>                                                 ^ 
> {code}

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

[jira] [Updated] (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors

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

Olga Natkovich updated PIG-1908:
--------------------------------

    Fix Version/s:     (was: 0.10)
    
> display the contents of line and indicate the position of the erroneous token for syntax errors
> -----------------------------------------------------------------------------------------------
>
>                 Key: PIG-1908
>                 URL: https://issues.apache.org/jira/browse/PIG-1908
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Xuefu Zhang
>
> With latest version of the parser, the line number and position of the erroneous token are displayed.
> For example -
> {code}
> > cat err.pig
> l = load 'x' ;
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
> dump f1;
> > pig -x local       err.pig
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> {code}
> It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long.
> For example, the error message could be -
> {code}
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
>                                                 ^ 
> {code}

--
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

        

[jira] [Updated] (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors

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

Xuefu Zhang updated PIG-1908:
-----------------------------

    Fix Version/s:     (was: 0.9.0)
                   0.10

> display the contents of line and indicate the position of the erroneous token for syntax errors
> -----------------------------------------------------------------------------------------------
>
>                 Key: PIG-1908
>                 URL: https://issues.apache.org/jira/browse/PIG-1908
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Xuefu Zhang
>             Fix For: 0.10
>
>
> With latest version of the parser, the line number and position of the erroneous token are displayed.
> For example -
> {code}
> > cat err.pig
> l = load 'x' ;
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
> dump f1;
> > pig -x local       err.pig
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> {code}
> It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long.
> For example, the error message could be -
> {code}
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
>                                                 ^ 
> {code}

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

[jira] [Commented] (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors

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

Xuefu Zhang commented on PIG-1908:
----------------------------------

This appears to be a new feature, and would be a good candidate for next release.

> display the contents of line and indicate the position of the erroneous token for syntax errors
> -----------------------------------------------------------------------------------------------
>
>                 Key: PIG-1908
>                 URL: https://issues.apache.org/jira/browse/PIG-1908
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Thejas M Nair
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>
> With latest version of the parser, the line number and position of the erroneous token are displayed.
> For example -
> {code}
> > cat err.pig
> l = load 'x' ;
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
> dump f1;
> > pig -x local       err.pig
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> {code}
> It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long.
> For example, the error message could be -
> {code}
> 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON
> f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3;
>                                                 ^ 
> {code}

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