You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2016/08/24 19:05:21 UTC

[jira] [Created] (HIVE-14619) CASE folding can produce wrong expression

Jesus Camacho Rodriguez created HIVE-14619:
----------------------------------------------

             Summary: CASE folding can produce wrong expression
                 Key: HIVE-14619
                 URL: https://issues.apache.org/jira/browse/HIVE-14619
             Project: Hive
          Issue Type: Bug
          Components: CBO
    Affects Versions: 2.1.0
            Reporter: Jesus Camacho Rodriguez
            Assignee: Jesus Camacho Rodriguez
            Priority: Critical


This is a case that was not covered in the testsuite. For the following query:

{code:sql}
select (CASE WHEN key = value THEN '1' WHEN true THEN '0' ELSE NULL END)
from src
{code}

Currently, we end up folding the select expression to '0', as we fail bail out in the second statement and fail to account that there are two different possible values for the CASE expression ('1' and '0').



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