[ 
https://issues.apache.org/jira/browse/HIVE-3604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482133#comment-13482133
 ] 

Navis commented on HIVE-3604:
-----------------------------

Currently hive returns true for non-empty string. And for mysql, it does not 
support casting to boolean type(syntax error). Should it be consistent with 
mysql?
                
> Casting strings to booleans gives unexpected result
> ---------------------------------------------------
>
>                 Key: HIVE-3604
>                 URL: https://issues.apache.org/jira/browse/HIVE-3604
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 0.8.1
>         Environment: Amazon EMR
>            Reporter: Ariel M
>
> I would expect the following query to return false in both columns:
> select 'false', cast('false' as boolean) from example_table limit 1;
> but here are the actual results:
> Total MapReduce CPU Time Spent: X seconds X msec
> OK
> false   true

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to