You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stathis Fotiadis (JIRA)" <ji...@apache.org> on 2016/07/11 15:21:11 UTC

[jira] [Updated] (HIVE-14206) CASE boolean output is NULL when SUM condition returns NULL

     [ https://issues.apache.org/jira/browse/HIVE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stathis Fotiadis updated HIVE-14206:
------------------------------------
    Summary: CASE boolean output is NULL when SUM condition returns NULL  (was: CASE boolean output is NULL when SUM predicate returns NULL)

> CASE boolean output is NULL when SUM condition returns NULL
> -----------------------------------------------------------
>
>                 Key: HIVE-14206
>                 URL: https://issues.apache.org/jira/browse/HIVE-14206
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Stathis Fotiadis
>            Priority: Critical
>
> This query 
> `
> select
> case when 1=sum(1) then true else false end) bool_true,
> (case when 1=sum(0) then true else false end) bool_false,
> (case when 1=(1+null) then true else false end) bool_null,
> (case when 1=sum(1+null) then true else false end) bool_null_sum,
> (case when 1=sum(1) then 'true' else 'false' end) string_true,
> (case when 1=sum(0) then 'true' else 'false' end) string_false,
> (case when 1=(1+null) then 'true' else 'false' end) string_null,
> (case when 1=sum(1+null) then 'true' else 'false' end) string_null_sum
> `
> results to
> bool_true bool_false   bool_null    bool_null_sum    string_true     string_false    string_null   string_null_sum
> true	        false	    false          NULL                   true                false              false            false
> First of all the is the inconsistency between (1+null) and SUM(1+null) and secondly the inconsistency between using boolean and string output



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