spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Izek Greenfield (Jira)" <j...@apache.org>
Subject [jira] [Created] (SPARK-32764) compare of -0.0 < 0.0 return true
Date Tue, 01 Sep 2020 10:31:00 GMT
Izek Greenfield created SPARK-32764:
---------------------------------------

             Summary: compare of -0.0 < 0.0 return true
                 Key: SPARK-32764
                 URL: https://issues.apache.org/jira/browse/SPARK-32764
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Izek Greenfield


{code:scala}
 val spark: SparkSession = SparkSession
      .builder()
      .master("local")
      .appName("SparkByExamples.com")
      .getOrCreate()
    spark.sparkContext.setLogLevel("ERROR")

    import spark.sqlContext.implicits._

    val df = Seq((-0.0, 0.0)).toDF("neg", "pos")
      .withColumn("comp", col("neg") < col("pos"))
      df.show(false)

======

+----+---+----+
|neg |pos|comp|
+----+---+----+
|-0.0|0.0|true|
+----+---+----+{code}

I think that result should be false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message