[ https://issues.apache.org/jira/browse/PIG-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Ding updated PIG-1837: ------------------------------ Resolution: Fixed Hadoop Flags: [Reviewed] Status: Resolved (was: Patch Available) Patch committed to trunk. > 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