Reynold Xin created SPARK-2210:
----------------------------------

             Summary: cast to boolean on boolean value gets turned into 
NOT((boolean_condition) = 0)
                 Key: SPARK-2210
                 URL: https://issues.apache.org/jira/browse/SPARK-2210
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.0.0
            Reporter: Reynold Xin
            Assignee: Reynold Xin


{code}
explain select cast(cast(key=0 as boolean) as boolean) aaa from src
{code}

should be

{code}
[Physical execution plan:]
[Project [(key#10:0 = 0) AS aaa#7]]
[ HiveTableScan [key#10], (MetastoreRelation default, src, None), None]
{code}

However, it is currently
{code}
[Physical execution plan:]
[Project [NOT((key#10=0) = 0) AS aaa#7]]
[ HiveTableScan [key#10], (MetastoreRelation default, src, None), None]
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to