You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zheng Shao (JIRA)" <ji...@apache.org> on 2009/05/05 03:19:30 UTC

[jira] Created: (HIVE-470) Support COALESCE using GenericUDF

Support COALESCE using GenericUDF
---------------------------------

                 Key: HIVE-470
                 URL: https://issues.apache.org/jira/browse/HIVE-470
             Project: Hadoop Hive
          Issue Type: New Feature
          Components: Query Processor
    Affects Versions: 0.4.0
            Reporter: Zheng Shao


See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Updated: (HIVE-470) Support COALESCE using GenericUDF

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

Zheng Shao updated HIVE-470:
----------------------------

    Attachment: HIVE-470.3.patch

Added a query from table.

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch, HIVE-470.3.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Commented: (HIVE-470) Support COALESCE using GenericUDF

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716123#action_12716123 ] 

Prasad Chakka commented on HIVE-470:
------------------------------------

i don't see a test for all NULL args for COALESCE. MySQL supports that.

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Updated: (HIVE-470) Support COALESCE using GenericUDF

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

Zheng Shao updated HIVE-470:
----------------------------

    Attachment: HIVE-470.2.patch

This patch adds a case in which both arguments are NULL.
We don't support COALESCE(NULL, NULL) because COALESCE cannot figure out the return type.

I didn't remove "@Override". We have enough code that has this "@Override" for interface methods (supported by Java 1.6 but not Java 1.5)


> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Commented: (HIVE-470) Support COALESCE using GenericUDF

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716125#action_12716125 ] 

Prasad Chakka commented on HIVE-470:
------------------------------------

also might want to remove @override tags which seem to be causing issues in some environments.

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Commented: (HIVE-470) Support COALESCE using GenericUDF

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718567#action_12718567 ] 

Namit Jain commented on HIVE-470:
---------------------------------

Can you add a test where you are selecting from a table which contains null columns ?

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Assigned: (HIVE-470) Support COALESCE using GenericUDF

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

Zheng Shao reassigned HIVE-470:
-------------------------------

    Assignee: Zheng Shao

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Commented: (HIVE-470) Support COALESCE using GenericUDF

Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718654#action_12718654 ] 

Namit Jain commented on HIVE-470:
---------------------------------

+1
looks good - will commit if the tests pass

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch, HIVE-470.3.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Updated: (HIVE-470) Support COALESCE using GenericUDF

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

Namit Jain updated HIVE-470:
----------------------------

       Resolution: Fixed
    Fix Version/s: 0.4.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

Committed. Thanks Zheng

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.4.0
>
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch, HIVE-470.3.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Updated: (HIVE-470) Support COALESCE using GenericUDF

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

Zheng Shao updated HIVE-470:
----------------------------

    Status: Patch Available  (was: Open)

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Commented: (HIVE-470) Support COALESCE using GenericUDF

Posted by "Prasad Chakka (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718557#action_12718557 ] 

Prasad Chakka commented on HIVE-470:
------------------------------------

I don't see the new test case for COALESCE(NULL, NULL).

how does mysql support it? does it type NULL to whatever type the rest of query expects it to be there in that column?

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>         Attachments: HIVE-470.1.patch, HIVE-470.2.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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


[jira] Updated: (HIVE-470) Support COALESCE using GenericUDF

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

Zheng Shao updated HIVE-470:
----------------------------

    Attachment: HIVE-470.1.patch

This patch includes the code, one positive test and one negative test.

> Support COALESCE using GenericUDF
> ---------------------------------
>
>                 Key: HIVE-470
>                 URL: https://issues.apache.org/jira/browse/HIVE-470
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>         Attachments: HIVE-470.1.patch
>
>
> See HIVE-164 for details. We should support COALESCE which is defined in SQL-92. This is kind of a syntax sugar, but it is used very frequently in full outer joins.

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