cloud-fan commented on a change in pull request #32260: URL: https://github.com/apache/spark/pull/32260#discussion_r616786590
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala ########## @@ -562,13 +577,27 @@ case class IntegralDivide( case d: DecimalType => d.asIntegral.asInstanceOf[Integral[Any]] } - (x, y) => { - val res = integral.quot(x, y) - if (res == null) { - null - } else { - integral.asInstanceOf[Integral[Any]].toLong(res) + val _div = + (x: Any, y: Any) => { + val res = integral.quot(x, y) + if (res == null) { + null + } else { + integral.asInstanceOf[Integral[Any]].toLong(res) + } } + + dataType match { + case LongType if failOnError => Review comment: This is not necessary because this class has `override def dataType: DataType = LongType` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org