Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23043#discussion_r235596825
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala ---
    @@ -723,4 +723,18 @@ class DataFrameAggregateSuite extends QueryTest with 
SharedSQLContext {
           "grouping expressions: [current_date(None)], value: [key: int, 
value: string], " +
             "type: GroupBy]"))
       }
    +
    +  test("SPARK-26021: Double and Float 0.0/-0.0 should be equal when 
grouping") {
    +    val colName = "i"
    +    val doubles = Seq(0.0d, 0.0d, 
-0.0d).toDF(colName).groupBy(colName).count().collect()
    --- End diff --
    
    Without this change, `doubles` already has expected results:
    
    ```scala
    Seq(0.0d, 0.0d, -0.0d).toDF(colName).groupBy(colName).count().show()
    
    +---+-----+
    |  i|count|
    +---+-----+
    |0.0|    3|
    +---+-----+
    ```
    
    Do you know why?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to