diff --git a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala index d261f7dba..d52f31f54 100644 --- a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala +++ b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala @@ -883,8 +883,8 @@ class CometSparkSessionExtensions def normalizeNaNAndZero(expr: Expression): Expression = { expr match { case _: KnownFloatingPointNormalized => expr - case FloatLiteral(f) if !f.equals(-0.0) => expr - case DoubleLiteral(d) if !d.equals(-0.0) => expr + case FloatLiteral(f) if !f.equals(-0.0f) => expr + case DoubleLiteral(d) if !d.equals(-0.0d) => expr case _ => expr.dataType match { case _: FloatType | _: DoubleType =>