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

Wenchen Fan resolved SPARK-57329.
---------------------------------
    Fix Version/s: 4.2.0
       Resolution: Fixed

Issue resolved by pull request 56382
[https://github.com/apache/spark/pull/56382]

> mode() returns wrong result when input contains both -0.0 and 0.0
> -----------------------------------------------------------------
>
>                 Key: SPARK-57329
>                 URL: https://issues.apache.org/jira/browse/SPARK-57329
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 5.0.0
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.2.0
>
>
> `mode()` can return a value that is not the most frequent one when the column 
> contains both -0.0 and 0.0. - seems like a issue similar to 
> https://issues.apache.org/jira/browse/SPARK-57298 
> Repro:
> {code:sql}
>   SELECT mode(c) FROM VALUES 
> (0.0D),(0.0D),(-0.0D),(-0.0D),(9.0D),(9.0D),(9.0D) AS t(c);
>   -- returns 9.0, but the correct mode is 0.0
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to