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

Richard Ding commented on PIG-1345:
-----------------------------------


By default, the Pig property "aggregate.warning" is set to true. So in the 
above example, you only get aggregated warning messages, not the original 
detailed warning messages. You can turn off "aggregate.warning" by the command 
line switch -w. The detailed warning messages contain more information. Here is 
an example:

{code}
[main] WARN  org.apache.pig.PigServer - int is implicitly cast to float under 
LOAdd Operator
[main] WARN  org.apache.pig.PigServer - long is implicitly cast to float under 
LOAdd Operator 
{code}

instead of 

{code}
[main] WARN  org.apache.pig.PigServer - Encountered Warning 
IMPLICIT_CAST_TO_FLOAT 2 time(s).
{code}

> Link casting errors in POCast to actual lines numbers in Pig script
> -------------------------------------------------------------------
>
>                 Key: PIG-1345
>                 URL: https://issues.apache.org/jira/browse/PIG-1345
>             Project: Pig
>          Issue Type: Sub-task
>          Components: impl
>    Affects Versions: 0.6.0
>            Reporter: Viraj Bhat
>
> For the purpose of easy debugging, I would be nice to find out where  my 
> warnings are coming from is in the pig script. 
> The only known process is to comment out lines in the Pig script and see if 
> these warnings go away.
> 2010-01-13 21:34:13,697 [main] WARN  org.apache.pig.PigServer - Encountered 
> Warning IMPLICIT_CAST_TO_MAP 2 time(s) line 22 
> 2010-01-13 21:34:13,698 [main] WARN  org.apache.pig.PigServer - Encountered 
> Warning IMPLICIT_CAST_TO_LONG 2 time(s) line 23
> 2010-01-13 21:34:13,698 [main] WARN  org.apache.pig.PigServer - Encountered 
> Warning IMPLICIT_CAST_TO_BAG 1 time(s). line 26
> I think this may need us to keep track of the line numbers of the Pig script 
> (via out javacc parser) and maintain it in the logical and physical plan.
> It would help users in debugging simple errors/warning related to casting.
> Is this enhancement listed in the  http://wiki.apache.org/pig/PigJournal?
> Do we need to change the parser to something other than javacc to make this 
> task simpler?
> "Standardize on Parser and Scanner Technology"
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to