kazuyukitanimura commented on code in PR #43678:
URL: https://github.com/apache/spark/pull/43678#discussion_r1395846247


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala:
##########
@@ -225,6 +226,112 @@ class ArithmeticExpressionSuite extends SparkFunSuite 
with ExpressionEvalHelper
     }
   }
 
+  test("SPARK-45786: Decimal multiply, divide, remainder, quot") {

Review Comment:
   Thanks @LuciferYang 
   Yes, this test is assuming the default `spark.sql.ansi.enabled=false`. The 
default behavior does not throw the exception for overflows, but Ansi mode 
does. Since this is a random value test, we may have combinations that 
overflows. 
   ```
   Cause: org.apache.spark.SparkArithmeticException: 
[NUMERIC_VALUE_OUT_OF_RANGE] 431393072276642444045219979063553045.571 cannot be 
represented as Decimal(38, 4). If necessary set "spark.sql.ansi.enabled" to 
"false" to bypass this error, and return NULL instead. SQLSTATE: 22003
   ```
   Sorry that I wasn't aware that there is a GHA for 
`spark.sql.ansi.enabled=true`. I can modify the test to ignore those cases.



-- 
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]

Reply via email to