Eric Yang created SPARK-57329:
---------------------------------

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


`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