You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/02/18 00:13:19 UTC
[jira] Assigned: (PIG-1837) Error while using IsEmpty function
[ https://issues.apache.org/jira/browse/PIG-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich reassigned PIG-1837:
-----------------------------------
Assignee: Richard Ding
> 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
>
>
> 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