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 2009/07/20 22:44:15 UTC
[jira] Created: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
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
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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Attachment: PIG-892_v3.patch
Patch with addressed comments from Santhosh
> 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, PIG-892_v3.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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Attachment: PIG-892.patch
> 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
>
>
> 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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743467#action_12743467 ]
Daniel Dai commented on PIG-892:
--------------------------------
+1
> 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, PIG-892_v3.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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> 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, PIG-892_v3.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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Status: Patch Available (was: Open)
> 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
>
>
> 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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734417#action_12734417 ]
Santhosh Srinivasan commented on PIG-892:
-----------------------------------------
I am reviewing the patch.
> 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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733412#action_12733412 ]
Hadoop QA commented on PIG-892:
-------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12414035/PIG-892.patch
against trunk revision 795931.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 15 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
-1 findbugs. The patch appears to introduce 1 new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/137/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/137/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/137/console
This message is automatically generated.
> 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
>
>
> 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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Status: Patch Available (was: Open)
> 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, PIG-892_v3.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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743686#action_12743686 ]
Hudson commented on PIG-892:
----------------------------
Integrated in Pig-trunk #523 (See [http://hudson.zones.apache.org/hudson/job/Pig-trunk/523/])
: Make COUNT and AVG deal with nulls accordingly with SQL standart(olgan)
> 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, PIG-892_v3.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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Status: Patch Available (was: Open)
resubmitting the patch with resolved findbug warnings which was related to using Long constructor. We are actually using it in many other cases and might have to review this later
> 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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Status: Open (was: Patch Available)
> 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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733457#action_12733457 ]
Hadoop QA commented on PIG-892:
-------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12414046/PIG-892_v2.patch
against trunk revision 795931.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 15 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/138/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/138/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/138/console
This message is automatically generated.
> 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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Attachment: PIG-892_v2.patch
> 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.
[jira] Updated: (PIG-892) Make COUNT and AVG deal with nulls
accordingly with SQL standar
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-892:
-------------------------------
Status: Open (was: Patch Available)
> 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, PIG-892_v3.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.