spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takeshi Yamamuro (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-28028) Cast numeric to integral type need round
Date Sun, 29 Dec 2019 11:01:00 GMT

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

Takeshi Yamamuro updated SPARK-28028:
-------------------------------------
    Parent Issue: SPARK-30375  (was: SPARK-27764)

> Cast numeric to integral type need round
> ----------------------------------------
>
>                 Key: SPARK-28028
>                 URL: https://issues.apache.org/jira/browse/SPARK-28028
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> For example
>  Case 1:
> {code:sql}
> select cast(-1.5 as smallint);
> {code}
> Spark SQL returns {{-1}}, but PostgreSQL returns {{-2}}.
>  
> Case 2:
> {code:sql}
> SELECT smallint(float('32767.6'))
> {code}
> Spark SQL returns {{32767}}, but PostgreSQL throws {{ERROR: smallint out of range}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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


Mime
View raw message