You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sandeep Katta (Jira)" <ji...@apache.org> on 2020/05/19 15:54:00 UTC

[jira] [Commented] (SPARK-31761) Sql Div operator can result in incorrect output for int_min

    [ https://issues.apache.org/jira/browse/SPARK-31761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17111294#comment-17111294 ] 

Sandeep Katta commented on SPARK-31761:
---------------------------------------

[~kshukla] thanks for raising this, I cross checked this in 2.4.4 it seems to work fine. 

 

I will analyse  w.r.t 3.0.0 and raise PR soon .

> Sql Div operator can result in incorrect output for int_min
> -----------------------------------------------------------
>
>                 Key: SPARK-31761
>                 URL: https://issues.apache.org/jira/browse/SPARK-31761
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Kuhu Shukla
>            Priority: Major
>
> Input  in csv : -2147483648,-1  --> (_c0, _c1)
> {code}
> val res = df.selectExpr("_c0 div _c1")
> res.collect
> res1: Array[org.apache.spark.sql.Row] = Array([-2147483648])
> {code}
> The result should be 2147483648 instead.



--
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