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 01:35:47 UTC

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

     [ 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