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

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

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

Yuming Wang resolved SPARK-23175.
---------------------------------
    Resolution: Duplicate

> 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
>            Priority: Major
>
> 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