mgaido91 commented on a change in pull request #21599: [SPARK-26218][SQL] 
Overflow on arithmetic operations returns incorrect result
URL: https://github.com/apache/spark/pull/21599#discussion_r308798251
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala
 ##########
 @@ -228,6 +229,12 @@ final class Decimal extends Ordered[Decimal] with 
Serializable {
     if (decimalVal.eq(null)) {
       longVal / POW_10(_scale)
     } else {
+      if (SQLConf.get.arithmeticOperationOverflowCheck) {
 
 Review comment:
   IIRC, I had to do this in order to have some test cases work. IIRC it is 
related to the sum buffer. I'd consider quite challenging decide the right 
config among these 2 honestly.... It may be quite counter-intuitive for a user 
that a sum of long can be affected by `DECIMAL_OPERATIONS_NULL_ON_OVERFLOW `...

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to