hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olga Natkovich (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (PIG-387) Unary minus not supported in FOREACH expressions
Date Mon, 26 Jan 2009 21:09:59 GMT

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

Olga Natkovich resolved PIG-387.
--------------------------------

    Resolution: Fixed

resolved in the latest code

> Unary minus not supported in FOREACH expressions
> ------------------------------------------------
>
>                 Key: PIG-387
>                 URL: https://issues.apache.org/jira/browse/PIG-387
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.1.0
>            Reporter: Ted Dunning
>
> Grunt parser broken with respect to unary minus.
> This script provides an example.
> log = LOAD 'tutorial/data/excite-small.log' USING PigStorage('\t') as (ip, date, query);
> t1 = GROUP log by ip;
> describe t1;
> counts = FOREACH t1 {
>    cnt = COUNT(log);
>    -- unary minus fails
>    neg = -cnt;
>    -- prefixing to make the negation a subtraction works
>    -- neg = 0-cnt;
>    GENERATE group as ip, cnt as cnt, neg as key;
> }
> describe counts;
> sorted = ORDER counts by key;
> describe sorted;
> dump sorted;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message