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

Mudit Sharma commented on HIVE-24156:
-------------------------------------

After this code block: 
[https://github.com/apache/hive/blob/branch-3.1/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/PrimitiveObjectInspectorUtils.java#L590]

 

The code does not seem to be behind the config and code accepts 
"false","off","no","0" and "" as FALSE by default

Let me know if I am wrong here, also in branch-2.3, this was also not behind 
any config, it was simply checking for the length of string: 
[https://github.com/apache/hive/blob/branch-2.3/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToBoolean.java#L175]

 

I saw this has changed after version 3

 

The documentation however is not stating that this behavior is changed after 
major version 3 of Hive

 

> Hive 3 explicity returning select cast("0" as boolean) as false even though 
> hive.lazysimple.extended_boolean_literal is set to false
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-24156
>                 URL: https://issues.apache.org/jira/browse/HIVE-24156
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Mudit Sharma
>            Priority: Major
>              Labels: TODOC
>
> As per https://issues.apache.org/jira/browse/HIVE-3635, select cast("0" as 
> boolean) should return as false only if 
> hive.lazysimple.extended_boolean_literal is set to true. Even though the 
> config is set to false, this is returning as false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to