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

Laukik Chitnis updated PIG-1788:
--------------------------------

    Attachment: PIG-1788.patch

This is a trivial change in error message; no additional test cases are 
required.

{noformat}
     [exec]
     [exec] -1 overall.
     [exec]
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec]
     [exec]     -1 tests included.  The patch doesn't appear to include any new 
or modified tests.
     [exec]                         Please justify why no tests are needed for 
this patch.
     [exec]
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning 
messages.
     [exec]
     [exec]     +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
     [exec]
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs 
warnings.
     [exec]
     [exec]     +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
     [exec]
{noformat}



> relation-as-scalar error messages should indicate the field being used as 
> scalar
> --------------------------------------------------------------------------------
>
>                 Key: PIG-1788
>                 URL: https://issues.apache.org/jira/browse/PIG-1788
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Thejas M Nair
>            Assignee: Laukik Chitnis
>             Fix For: 0.9.0
>
>         Attachments: PIG-1788.patch
>
>
> Issue 1
> {code}
> grunt> l = load 'x' as (a,b,c);        
> grunt> g = group l by a;
> grunt> f = foreach g generate COUNT(g);       -- g is unintentionally being 
> used as scalar , the user intends it to be COUNT(l) . 
> 2011-01-05 12:44:53,098 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
> 1000: Error during parsing. Scalars can be only used with projections
> {code}
> Since the user did not intend to use a scalar, the scalar error messages are 
> hard to understand. 
> It will be useful to have the relation being used in scalar context in the 
> error message. Something like - "ERROR 1000: Error during parsing. Relation g 
> being used in scalar context at ... .Scalars can be only used with 
> projections"
> Issue 2
> The error message "Scalars can be only used with projections" is not easy to 
> understand. A better error message is needed, something like "A column needs 
> to be projected from relation used in scalar context."

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

Reply via email to