[ 
https://issues.apache.org/jira/browse/PIG-1947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019952#comment-13019952
 ] 

Xuefu Zhang commented on PIG-1947:
----------------------------------

Because currently a user script is parsed by at least two parsers (grunt parser 
and query parser), the line number is lost or incorrect reported due to a 
simplistic design. To fully address the problem, the following is required:

1. Grunt parser needs to be changed to passing more information to query parser 
about the source location of each line of the query. Right now, only a line 
number is passed alone.

2. Query parser needs a more sophisticated design to capture the source 
location of the script received from grunt parser. Currently, it caches the 
script lines in a list, which cannot fully recover the locations when query is 
subsequently parsed.

3. A clear semantic of line number is to be defined in interactive mode, 
especially in case of invalid query lines.


> Incorrect line number is reported during parsing
> ------------------------------------------------
>
>                 Key: PIG-1947
>                 URL: https://issues.apache.org/jira/browse/PIG-1947
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>             Fix For: 0.10
>
>         Attachments: PIG-1947-2.patch, PIG-1947.patch
>
>
> In case of errors in script, Pig parser doesn't report correct the line 
> number always. For example:
> script:
> A = load 'x' as ( u:int, v:chararray );
> sh ls -l;
> B = foreach A generate u + v;
> store B into 'y';
> error reported:
> 2011-03-30 17:48:04,649 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
> 1039: <file line.pig, line 2, column 25> (Name: Add Type: int Uid: 
> 7)incompatible types in Add Operator left hand side:Unknown right hand 
> side:Unknown
> Incorrect line number is also reported when a single line contains multiple 
> Pig statement, such as:
> A = load 'x' as( u:int, v:chararray); B = foreach A generate u + v;
> store B into 'y';

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

Reply via email to