revans2 commented on code in PR #41156: URL: https://github.com/apache/spark/pull/41156#discussion_r1192705344
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala: ########## @@ -592,7 +599,10 @@ case class Multiply( override def inputType: AbstractDataType = NumericType override def symbol: String = "*" - override def decimalMethod: String = "$times" + + override def decimalMethod(mathContextValue: GlobalValue, value1: String, value2: String): + String = s"Decimal.apply($value1.toJavaBigDecimal()" + + s".multiply($value2.toJavaBigDecimal(), $mathContextValue))" Review Comment: Doesn't the non-codegen path also need to be updated? It runs a numeric.times which is implemented as https://github.com/apache/spark/blob/46332d985e52f76887c139f67d1471b82e85d5ca/sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala#L495-L496 where the `MATH_CONTEXT` is still the wrong one. https://github.com/apache/spark/blob/46332d985e52f76887c139f67d1471b82e85d5ca/sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala#L548 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
