[
https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734806#action_12734806
]
Santhosh Srinivasan commented on PIG-892:
-----------------------------------------
1. Index: src/org/apache/pig/builtin/FloatAvg.java
===================================================================
The size of 't' is not checked before t.get(0) in the method count
{code}
+ if (t != null && t.get(0) != null)
+ cnt++;
+ }
{code}
2. Index: src/org/apache/pig/builtin/IntAvg.java
===================================================================
Same comment as FloatAvg.java
3. Index: src/org/apache/pig/builtin/DoubleAvg.java
===================================================================
Same comment as FloatAvg.java
4. Index: src/org/apache/pig/builtin/AVG.java
===================================================================
Same comment as FloatAvg.java
5. Index: src/org/apache/pig/builtin/LongAvg.java
===================================================================
Same comment as FloatAvg.java
6. Index: src/org/apache/pig/builtin/COUNT_STAR.java
===================================================================
I am not sure about the naming convention here. None of the built-in functions
have a special character in the class name. COUNTSTAR would be better than
COUNT_STAR.
> Make COUNT and AVG deal with nulls accordingly with SQL standar
> ---------------------------------------------------------------
>
> Key: PIG-892
> URL: https://issues.apache.org/jira/browse/PIG-892
> Project: Pig
> Issue Type: Improvement
> Affects Versions: 0.3.0
> Reporter: Olga Natkovich
> Assignee: Olga Natkovich
> Fix For: 0.4.0
>
> Attachments: PIG-892.patch, PIG-892_v2.patch
>
>
> both COUNT and AVG need to ignore nulls. Also add COUNT_STAR to match
> COUNT(*) in SQL
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.