[ https://issues.apache.org/jira/browse/PIG-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835136#action_12835136 ]
Ankur commented on PIG-1233: ---------------------------- In the current code path we cannot have a situation where intermediateCount in NOT null but intermediateSum is null. So just checking the former if sufficient. > NullPointerException in AVG > ---------------------------- > > Key: PIG-1233 > URL: https://issues.apache.org/jira/browse/PIG-1233 > Project: Pig > Issue Type: Bug > Affects Versions: 0.6.0 > Reporter: Ankur > Assignee: Ankur > Fix For: 0.7.0 > > Attachments: jira-1233.patch > > > The overridden method - getValue() in AVG throws null pointer exception in > case accumulate() is not called leaving variable 'intermediateCount' > initialized to null. This causes java to throw exception when it tries to > 'unbox' the value for numeric comparison. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.