You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jakub Havlík (JIRA)" <ji...@apache.org> on 2015/04/16 09:57:59 UTC

[jira] [Created] (HIVE-10359) Inconsistent behavior of CASE regarding null

Jakub Havlík created HIVE-10359:
-----------------------------------

             Summary: Inconsistent behavior of CASE regarding null
                 Key: HIVE-10359
                 URL: https://issues.apache.org/jira/browse/HIVE-10359
             Project: Hive
          Issue Type: Bug
          Components: Hive, Parser, Query Processor
    Affects Versions: 1.0.0
         Environment: CentOS 6.5, Cloudera 2.5.0-sdh5.3.0.
            Reporter: Jakub Havlík


Using CASE with null in condition results in two opposite results when used in a little bit different way:


First query:

hive> select case null when null then true else false end from parquet.dump limit 1;
OK
false

Second query:

select case when null is null then true else false end from parquet.dump limit 1;
OK
true

This is not documented and functionally it does not make sense to be behaving this way and it causes unexpected bugs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)