You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Richard Ding (JIRA)" <ji...@apache.org> on 2011/03/04 22:53:46 UTC

[jira] Updated: (PIG-1837) Error while using IsEmpty function

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

Richard Ding updated PIG-1837:
------------------------------

    Status: Patch Available  (was: Open)

> Error while using IsEmpty function
> ----------------------------------
>
>                 Key: PIG-1837
>                 URL: https://issues.apache.org/jira/browse/PIG-1837
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.9.0
>            Reporter: Olga Natkovich
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-1837.patch
>
>
> I have the following 2 inputs:
> data1: 
> 1       11
> 2       15
> data2:
> 1       10
> 4       11
> 5       10
> And the following script to work on the data:
> grunt> A = load 'data1' as (x, y: int);
> grunt> B = load 'data2' as (x, z: int);
> grunt> C = cogroup A by x, B by x;
> grunt> D = foreach C generate group, SUM(((IsEmpty(A.y))? {(0)} : A.y)) + SUM (((IsEmpty(B.z))? {(0)} : B.z));
> grunt> dump D;
> After running for a while, I get the following error:
> Backend error : org.apache.pig.builtin.IsEmpty cannot be cast to org.apache.pig.Accumulator

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