You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shaoquan Zhang (JIRA)" <ji...@apache.org> on 2018/01/22 02:31:00 UTC

[jira] [Created] (SPARK-23175) Type conversion does not make sense under case like select ’0.1’ = 0

Shaoquan Zhang created SPARK-23175:
--------------------------------------

             Summary: Type conversion does not make sense under case like select ’0.1’ = 0
                 Key: SPARK-23175
                 URL: https://issues.apache.org/jira/browse/SPARK-23175
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.0.0
            Reporter: Shaoquan Zhang


SQL select '0.1' = 0 returns true. The result seems unreasonable.

From the logical plan, the sql is parsed as 'Project [(cast(cast(0.1 as decimal(20,0)) as int) = 0) AS #6]'. The type conversion converts the string to integer, which leads to the unreasonable result.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org