Skip to content

Commit

Permalink
fix: div and rem by negative zero
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed Sep 24, 2024
1 parent 184c22b commit 1318da8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down

0 comments on commit 1318da8

Please sign in to comment.