You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Sal Uryasev (JIRA)" <ji...@apache.org> on 2013/02/22 01:30:13 UTC

[jira] [Updated] (PIG-3207) Pig fails with horrible and untraceable error when semi-colon is inside a comment that splits a statement

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

Sal Uryasev updated PIG-3207:
-----------------------------

    Description: 
If a semi-colon is included in a comment that splits a GENERATE statement, Pig fails with either this error:
ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
or just:
ERROR 1200: null

This error does not happen if the comment does not split a statement.  I did not test this with non-GENERATE statements.

This happens both in grunt and when running a pig script from a file, though it is primarily an issue with the file.

Grunt example:

grunt> m = LOAD '/user/suryasev/fips2.txt' USING PigStorage('\t');
grunt> n = FOREACH m GENERATE $4 as first_item, $5 as second_item;
grunt> describe n;
n: {first_item: bytearray,second_item: bytearray}
grunt> k = FOREACH n GENERATE first_item, --some comment;         
2013-02-22 00:19:29,974 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
Details at logfile: /export/home/suryasev/pig_1361492310408.log

  was:
If a semi-colon is included in a comment that splits a GENERATE statement, Pig fails with either this error:
ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
or just:
ERROR 1200: null

This error does not happen if the comment does not split a statement.  I did not test this with non-GENERATE statements.

This happens both in grunt and when running a pig script from a file, though it obviously is way more frustrating with the file.  It is always baffling when deleting a comment makes the code work.

Grunt example:

grunt> m = LOAD '/user/suryasev/fips2.txt' USING PigStorage('\t');
grunt> n = FOREACH m GENERATE $4 as first_item, $5 as second_item;
grunt> describe n;
n: {first_item: bytearray,second_item: bytearray}
grunt> k = FOREACH n GENERATE first_item, --some comment;         
2013-02-22 00:19:29,974 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
Details at logfile: /export/home/suryasev/pig_1361492310408.log

    
> Pig fails with horrible and untraceable error when semi-colon is inside a comment that splits a statement
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-3207
>                 URL: https://issues.apache.org/jira/browse/PIG-3207
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Sal Uryasev
>
> If a semi-colon is included in a comment that splits a GENERATE statement, Pig fails with either this error:
> ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
> or just:
> ERROR 1200: null
> This error does not happen if the comment does not split a statement.  I did not test this with non-GENERATE statements.
> This happens both in grunt and when running a pig script from a file, though it is primarily an issue with the file.
> Grunt example:
> grunt> m = LOAD '/user/suryasev/fips2.txt' USING PigStorage('\t');
> grunt> n = FOREACH m GENERATE $4 as first_item, $5 as second_item;
> grunt> describe n;
> n: {first_item: bytearray,second_item: bytearray}
> grunt> k = FOREACH n GENERATE first_item, --some comment;         
> 2013-02-22 00:19:29,974 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 0, column -1>  Syntax error, unexpected symbol at or near 'null'
> Details at logfile: /export/home/suryasev/pig_1361492310408.log

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira