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/08 22:43:15 UTC

[jira] Created: (PIG-875) Making COUNT and AVG semantics SQL compliant

Making COUNT and AVG semantics SQL compliant
--------------------------------------------

                 Key: PIG-875
                 URL: https://issues.apache.org/jira/browse/PIG-875
             Project: Pig
          Issue Type: Bug
            Reporter: Olga Natkovich
            Assignee: Olga Natkovich
             Fix For: 0.4.0


Currently both AVG and COUNT counts NULLs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-875) Making COUNT and AVG semantics SQL compliant

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733403#action_12733403 ] 

Olga Natkovich commented on PIG-875:
------------------------------------

I don't think we want to define at runtime whether UDF needs to count nulls since it complicates and slows the code.

I don't think there is a precedent of AVG counting NULLs and so I don't feel we need to support it. Otherwise, why not do the same for SUM, MIN, and MAX. If users want to do that, they can implement their own UDFs but I don't feel we need to support this by default.

I can change the name of the function if it makes it more intuitive. It just seems a bit long.

> Making COUNT and AVG semantics SQL compliant
> --------------------------------------------
>
>                 Key: PIG-875
>                 URL: https://issues.apache.org/jira/browse/PIG-875
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Olga Natkovich
>            Assignee: Olga Natkovich
>             Fix For: 0.4.0
>
>
> Currently both AVG and COUNT counts NULLs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-875) Making COUNT and AVG semantics SQL compliant

Posted by "David Ciemiewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733400#action_12733400 ] 

David Ciemiewicz commented on PIG-875:
--------------------------------------

Can I suggest that we might the default to behavior to be to not count nulls, but we might want a way for nulls to be counted with AVG_WITH_NULLS and COUNT_WITH_NULLS or that we might want a DEFINE statement to set an option to turn on and off null count behavior.

> Making COUNT and AVG semantics SQL compliant
> --------------------------------------------
>
>                 Key: PIG-875
>                 URL: https://issues.apache.org/jira/browse/PIG-875
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Olga Natkovich
>            Assignee: Olga Natkovich
>             Fix For: 0.4.0
>
>
> Currently both AVG and COUNT counts NULLs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIG-875) Making COUNT and AVG semantics SQL compliant

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich resolved PIG-875.
--------------------------------

    Resolution: Duplicate

opened two issues by mistake. This is duplicate of https://issues.apache.org/jira/browse/PIG-892

> Making COUNT and AVG semantics SQL compliant
> --------------------------------------------
>
>                 Key: PIG-875
>                 URL: https://issues.apache.org/jira/browse/PIG-875
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Olga Natkovich
>            Assignee: Olga Natkovich
>             Fix For: 0.4.0
>
>
> Currently both AVG and COUNT counts NULLs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.