pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-1921) Improve error messages in new parser
Date Mon, 18 Apr 2011 17:24:06 GMT

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

Daniel Dai commented on PIG-1921:
---------------------------------

+1

> Improve error messages in new parser
> ------------------------------------
>
>                 Key: PIG-1921
>                 URL: https://issues.apache.org/jira/browse/PIG-1921
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.9.0
>            Reporter: Richard Ding
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-1921.patch
>
>
> The new parser gives better error messages than the old parser (especially with the line
numbers). But there are still some places where the error messages can be improved.
> Example:
> {code}
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1025: Invalid field projection. Projected
field [E::v] does not exist in schema: A::v#28:long,A::u#29:chararray,A::w#30:bytearray,B::v#31:long,B::u#32:chararray,B::w#33:bytearray.
> {code}
> In this case the #num should be removed from the schema.
> Example:
> {code}
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 0: line 5:34 mismatched input [''reg'']
expecting set null
> {code}
> In this case the parser detects the error early and gives the line number, but missing
the reason part from the old parser message:
> {code}
> ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Only COLLECTED,
REGULAR or MERGE are valid GROUP modifiers.
> {code}
> Example:
> {code}
> grunt> C = join A by v, B by A.t;
> 2011-03-18 14:04:38,441 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 0: Invalid
scalar projection: A
> {code}
> In this case the real reason is t is not a field of A : {v: int, u:int}. So the message
should be: Invalid scalar projection: A.t
> Example:
> {code}
> C = join A by v, B by B::A.v;
> 2011-03-18 14:40:11,590 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Invalid
field reference. Referenced field [v] does not exist in schema: null.
> {code}
> The message here is not clear and the schema shouldn't be null.

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

Mime
View raw message