Skip to content

SQL "order by" query returns wrong order for +0.0 and -0.0 #3825

@kazuyukitanimura

Description

@kazuyukitanimura

Describe the bug

Spark returns +0.0 first
Comet returns -0.0 first

Steps to reproduce

  test("negative zero order by") {
    withTable("t1") {
      Seq(0.0f, -0.0f).toDF("a").write.saveAsTable("t1")
      val df = sql("SELECT * FROM t1 ORDER BY a")
      checkSparkAnswerAndOperator(df)
    }
  }

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdf compatibilityAny issue related to DF & Spark compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions