Description
There seems to be a regression in Spark 3.4 Integral Divide
scala> val df = Seq("0.5944910","0.3314242").toDF("a") df: org.apache.spark.sql.DataFrame = [a: string] scala> df.selectExpr("cast(a as decimal(7,7)) div 100").show +---------------------------------+ |(CAST(a AS DECIMAL(7,7)) div 100)| +---------------------------------+ | null| | null| +---------------------------------+
While in Spark 3.3.0
scala> val df = Seq("0.5944910","0.3314242").toDF("a") df: org.apache.spark.sql.DataFrame = [a: string] scala> df.selectExpr("cast(a as decimal(7,7)) div 100").show +---------------------------------+ |(CAST(a AS DECIMAL(7,7)) div 100)| +---------------------------------+ | 0| | 0| +---------------------------------+