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

Yuming Wang updated SPARK-28135:
--------------------------------
    Description: 
{noformat}
spark-sql> select ceil(double(1.2345678901234e+200)), 
ceiling(double(1.2345678901234e+200)), floor(double(1.2345678901234e+200));
9223372036854775807     9223372036854775807     9223372036854775807
{noformat}
{noformat}
postgres=# select ceil(1.2345678901234e+200::float8), 
ceiling(1.2345678901234e+200::float8), floor(1.2345678901234e+200::float8);
         ceil         |       ceiling        |        floor
----------------------+----------------------+----------------------
 1.2345678901234e+200 | 1.2345678901234e+200 | 1.2345678901234e+200
(1 row)
{noformat}

  was:
{noformat}
postgres=# select ceiling(1.2345678901234e+200::float8), 
floor(1.2345678901234e+200::float8);
ceiling | floor
----------------------+----------------------
1.2345678901234e+200 | 1.2345678901234e+200
(1 row)
{noformat}
{noformat}
spark-sql> select ceiling(double(1.2345678901234e+200)), 
floor(double(1.2345678901234e+200));
9223372036854775807     9223372036854775807
{noformat}


> ceiling/floor returns incorrect values
> --------------------------------------
>
>                 Key: SPARK-28135
>                 URL: https://issues.apache.org/jira/browse/SPARK-28135
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> {noformat}
> spark-sql> select ceil(double(1.2345678901234e+200)), 
> ceiling(double(1.2345678901234e+200)), floor(double(1.2345678901234e+200));
> 9223372036854775807   9223372036854775807     9223372036854775807
> {noformat}
> {noformat}
> postgres=# select ceil(1.2345678901234e+200::float8), 
> ceiling(1.2345678901234e+200::float8), floor(1.2345678901234e+200::float8);
>          ceil         |       ceiling        |        floor
> ----------------------+----------------------+----------------------
>  1.2345678901234e+200 | 1.2345678901234e+200 | 1.2345678901234e+200
> (1 row)
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to