You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Vivek Padmanabhan (JIRA)" <ji...@apache.org> on 2011/08/25 06:46:29 UTC

[jira] [Created] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Pig 0.9 error message not useful as compared to 0.8
---------------------------------------------------

                 Key: PIG-2238
                 URL: https://issues.apache.org/jira/browse/PIG-2238
             Project: Pig
          Issue Type: Improvement
    Affects Versions: 0.9.0
            Reporter: Vivek Padmanabhan


The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;

A = load 'input'  using TextLoader as (doc:chararray) ;
B = foreach A generate flatten(TOKENIZE(doc)) as myword;
C = group B by myword parallel 30;
D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;

E = order D by size parallel 5;
>F = limit F 20;
dump F;

For this script , error message in 0.9
>ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan

Error message in 0.8
>ERROR 1000: Error during parsing. Unrecognized alias F


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

        

[jira] [Updated] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-2238:
--------------------------------

    Fix Version/s: 0.9.1

I suggest that we fix it as part of 0.9.1 since it is a regression and it makes error messages worse even though the release claimed to improve error handling

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>             Fix For: 0.9.1
>
>         Attachments: PIG-2238-0.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Updated] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2238:
----------------------------

    Attachment: PIG-2238-0.patch

We need a NPE check at LogicalPlanBuilder:439. Unfortunately we need to change other places to allow throw exception in method signature. Attach a draft patch.

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>         Attachments: PIG-2238-0.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Commented] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Vivek Padmanabhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090820#comment-13090820 ] 

Vivek Padmanabhan commented on PIG-2238:
----------------------------------------

Looks like this issue was introduced as part of the parser changes.
In Pig 0.9, the validation is done like below;

In org.apache.pig.parser.AstValidator 

 private void validateAliasRef(Set<String> aliases, CommonTree node, String alias)
    throws UndefinedAliasException {
        if( !aliases.contains( alias ) ) {
            throw new UndefinedAliasException( input, new SourceLocation( (PigParserNode)node ), alias );
        }
    }

Here it just checks that the alias is contained inside the set "aliases", but this contains all the aliases
and it doesnt check for the order in which they are defined in the script.

Hence this will lead to other sort of issues like NullPointerException, if  i replace the F in the above script with
below
F = foreach F generate *;


> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Updated] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2238:
----------------------------

    Attachment: PIG-2238-1.patch

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>             Fix For: 0.9.1
>
>         Attachments: PIG-2238-0.patch, PIG-2238-1.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Commented] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099639#comment-13099639 ] 

Thejas M Nair commented on PIG-2238:
------------------------------------

+1

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>             Fix For: 0.9.1
>
>         Attachments: PIG-2238-0.patch, PIG-2238-1.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Resolved] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai resolved PIG-2238.
-----------------------------

      Resolution: Fixed
        Assignee: Daniel Dai
    Hadoop Flags: [Reviewed]

Patch committed to both trunk and 0.9 branch.

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>            Assignee: Daniel Dai
>             Fix For: 0.9.1
>
>         Attachments: PIG-2238-0.patch, PIG-2238-1.patch, PIG-2238-1_0.9.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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

        

[jira] [Updated] (PIG-2238) Pig 0.9 error message not useful as compared to 0.8

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Dai updated PIG-2238:
----------------------------

    Attachment: PIG-2238-1_0.9.patch

A slightly different patch for 0.9 branch.

> Pig 0.9 error message not useful as compared to 0.8
> ---------------------------------------------------
>
>                 Key: PIG-2238
>                 URL: https://issues.apache.org/jira/browse/PIG-2238
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>             Fix For: 0.9.1
>
>         Attachments: PIG-2238-0.patch, PIG-2238-1.patch, PIG-2238-1_0.9.patch
>
>
> The below is my faulty script (note the usage of alias F) for which Pig 0.9 composes not so useful message as compared to 0.8;
> A = load 'input'  using TextLoader as (doc:chararray) ;
> B = foreach A generate flatten(TOKENIZE(doc)) as myword;
> C = group B by myword parallel 30;
> D = foreach C generate group,COUNT(B) as count,SIZE(group) as size;
> E = order D by size parallel 5;
> >F = limit F 20;
> dump F;
> For this script , error message in 0.9
> >ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2240: LogicalPlanVisitor can only visit logical plan
> Error message in 0.8
> >ERROR 1000: Error during parsing. Unrecognized alias F

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