[ https://issues.apache.org/jira/browse/HIVE-14619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437716#comment-15437716 ]
Ashutosh Chauhan commented on HIVE-14619: ----------------------------------------- +1 > 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 > Attachments: HIVE-14619.patch > > > 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)