You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Raghotham Murthy (JIRA)" <ji...@apache.org> on 2008/12/24 06:24:44 UTC

[jira] Created: (HIVE-197) UDFToBoolean flipping values

UDFToBoolean flipping values
----------------------------

                 Key: HIVE-197
                 URL: https://issues.apache.org/jira/browse/HIVE-197
             Project: Hadoop Hive
          Issue Type: Bug
            Reporter: Raghotham Murthy
            Assignee: Zheng Shao


UDFToBoolean should do

return Boolean.valueOf(i.byteValue() != 0)

Instead of

return Boolean.valueOf(i.byteValue() == 0)

Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Carl Steinbach updated HIVE-197:
--------------------------------

    Fix Version/s: 0.3.0
                       (was: 0.6.0)

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.3.0
>
>         Attachments: HIVE-197-1.patch, HIVE-197-2.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Zheng Shao updated HIVE-197:
----------------------------

      Resolution: Fixed
    Release Note: HIVE-197. Fixed UDFToBoolean.
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed revision 730266.

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch, HIVE-197-2.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Commented: (HIVE-197) UDFToBoolean flipping values

Posted by "Raghotham Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659945#action_12659945 ] 

Raghotham Murthy commented on HIVE-197:
---------------------------------------

+1

looks good.

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch, HIVE-197-2.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Zheng Shao updated HIVE-197:
----------------------------

    Fix Version/s: 0.2.0
           Status: Patch Available  (was: Open)

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Zheng Shao updated HIVE-197:
----------------------------

    Attachment: HIVE-197-2.patch

Removed conversion from String to Boolean.

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch, HIVE-197-2.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Commented: (HIVE-197) UDFToBoolean flipping values

Posted by "Raghotham Murthy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659060#action_12659060 ] 

Raghotham Murthy commented on HIVE-197:
---------------------------------------

looks good.

+1

Btw do we want to support casting any random string to boolean? Mysql seems to just convert the string to an integer and return false only if the integer is 0, else true.
But its not consistent.

For example: SELECT IF("10", TRUE, FALSE) returns 1 but SELECT "10" = TRUE; returns 0.




> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Ashish Thusoo updated HIVE-197:
-------------------------------

    Component/s: Query Processor

categorizing.

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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


[jira] Updated: (HIVE-197) UDFToBoolean flipping values

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

Zheng Shao updated HIVE-197:
----------------------------

    Attachment: HIVE-197-1.patch

> UDFToBoolean flipping values
> ----------------------------
>
>                 Key: HIVE-197
>                 URL: https://issues.apache.org/jira/browse/HIVE-197
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Raghotham Murthy
>            Assignee: Zheng Shao
>             Fix For: 0.2.0
>
>         Attachments: HIVE-197-1.patch
>
>
> UDFToBoolean should do
> return Boolean.valueOf(i.byteValue() != 0)
> Instead of
> return Boolean.valueOf(i.byteValue() == 0)
> Same for all other types.

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