You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2011/05/11 00:11:47 UTC

[jira] [Created] (PIG-2058) Macro missing returns clause doesn't give a good error message

Macro missing returns clause doesn't give a good error message
--------------------------------------------------------------

                 Key: PIG-2058
                 URL: https://issues.apache.org/jira/browse/PIG-2058
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.9.0
            Reporter: Xuefu Zhang
            Assignee: Xuefu Zhang
             Fix For: 0.9.0


For the following query:

define test( out1,out2 ){
   A  = load 'x' as (u:int, v:int);
   $B  = filter A by u < 3 and v <  20;
}

Pig gives the following error message: Syntax error,unexpected symbol at or near '{'

Previously, it gives: mismatched input '{' expecting RETURNS

The previous message is more meaningful.

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

[jira] [Updated] (PIG-2058) Macro missing returns clause doesn't give a good error message

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

Richard Ding updated PIG-2058:
------------------------------

    Attachment: PIG-2058.patch

Thanks Xuefu. Attaching a patch with the fix.

> Macro missing returns clause doesn't give a good error message
> --------------------------------------------------------------
>
>                 Key: PIG-2058
>                 URL: https://issues.apache.org/jira/browse/PIG-2058
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-2058.patch
>
>
> For the following query:
> define test( out1,out2 ){
>    A  = load 'x' as (u:int, v:int);
>    $B  = filter A by u < 3 and v <  20;
> }
> Pig gives the following error message: Syntax error,unexpected symbol at or near '{'
> Previously, it gives: mismatched input '{' expecting RETURNS
> The previous message is more meaningful.

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

[jira] [Commented] (PIG-2058) Macro missing returns clause doesn't give a good error message

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

Xuefu Zhang commented on PIG-2058:
----------------------------------

+1

> Macro missing returns clause doesn't give a good error message
> --------------------------------------------------------------
>
>                 Key: PIG-2058
>                 URL: https://issues.apache.org/jira/browse/PIG-2058
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-2058.patch
>
>
> For the following query:
> define test( out1,out2 ){
>    A  = load 'x' as (u:int, v:int);
>    $B  = filter A by u < 3 and v <  20;
> }
> Pig gives the following error message: Syntax error,unexpected symbol at or near '{'
> Previously, it gives: mismatched input '{' expecting RETURNS
> The previous message is more meaningful.

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

[jira] [Updated] (PIG-2058) Macro missing returns clause doesn't give a good error message

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

Xuefu Zhang updated PIG-2058:
-----------------------------

    Assignee: Richard Ding  (was: Xuefu Zhang)

The problem introduced by RETURN VOID support. Changing the grammar as follows will solve the problem.

macro_return_clause : RETURNS ( ( alias ( COMMA alias )* ) | VOID )
                   -> ^( RETURN_VAL alias* )


> Macro missing returns clause doesn't give a good error message
> --------------------------------------------------------------
>
>                 Key: PIG-2058
>                 URL: https://issues.apache.org/jira/browse/PIG-2058
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>
> For the following query:
> define test( out1,out2 ){
>    A  = load 'x' as (u:int, v:int);
>    $B  = filter A by u < 3 and v <  20;
> }
> Pig gives the following error message: Syntax error,unexpected symbol at or near '{'
> Previously, it gives: mismatched input '{' expecting RETURNS
> The previous message is more meaningful.

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

[jira] [Resolved] (PIG-2058) Macro missing returns clause doesn't give a good error message

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

Richard Ding resolved PIG-2058.
-------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

Patch committed to trunk and 0.9 branch.

> Macro missing returns clause doesn't give a good error message
> --------------------------------------------------------------
>
>                 Key: PIG-2058
>                 URL: https://issues.apache.org/jira/browse/PIG-2058
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Xuefu Zhang
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-2058.patch
>
>
> For the following query:
> define test( out1,out2 ){
>    A  = load 'x' as (u:int, v:int);
>    $B  = filter A by u < 3 and v <  20;
> }
> Pig gives the following error message: Syntax error,unexpected symbol at or near '{'
> Previously, it gives: mismatched input '{' expecting RETURNS
> The previous message is more meaningful.

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