pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Ding (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1873) Pig try to interpret UDF as Macro
Date Fri, 04 Mar 2011 23:56:51 GMT

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

Richard Ding updated PIG-1873:
------------------------------

    Attachment: PIG-1873.patch

test-patch results:

{code}
     [exec] +1 overall.  
     [exec] 
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec] 
     [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
     [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] 
{code}

> Pig try to interpret UDF as Macro
> ---------------------------------
>
>                 Key: PIG-1873
>                 URL: https://issues.apache.org/jira/browse/PIG-1873
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.9.0
>            Reporter: Daniel Dai
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-1873.patch
>
>
> The following script fail:
> {code}
> A = load '1.txt';
> B = group A by $0;
> C = foreach B {
>     C1 = filter A by $0 > -1;
>     C2 = distinct C1;
>     C3 = distinct A;
>     C4 = org.apache.pig.test.utils.Identity(*);
>     C5 = COUNT(C2);
>     C6 = SUM(C2.$1);
>     C7 = org.apache.pig.test.TestEvalPipeline\$TitleNGrams(C3);
>     C8 = MAX(C3.$1);
>     generate (int)group, C4, C5, C6, C7, C8, C2;
> };
> dump C;
> {code}
> Stack:
> ERROR 2999: Unexpected internal error. Pig macro 'COUNT' must be defined before being
invoked
> java.lang.RuntimeException: Pig macro 'COUNT' must be defined before being invoked
>         at org.apache.pig.parser.MacroExpansion.mINLINE(MacroExpansion.java:509)
>         at org.apache.pig.parser.MacroExpansion.mTokens(MacroExpansion.java:1240)
>         at org.apache.pig.parser.MacroExpansion.nextToken(MacroExpansion.java:68)
>         at org.apache.pig.parser.ParserUtil.expandMacros(ParserUtil.java:53)
>         at org.apache.pig.parser.ParserUtil.getExpandedMacroAsBufferedReader(ParserUtil.java:89)
>         at org.apache.pig.Main.run(Main.java:505)
>         at org.apache.pig.Main.main(Main.java:108)
> Seems Pig try to interpret UDF COUNT as a Macro.

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

        

Mime
View raw message