dongjoon-hyun commented on code in PR #46271:
URL: https://github.com/apache/spark/pull/46271#discussion_r1582534717


##########
docs/sql-ref-ansi-compliance.md:
##########
@@ -67,10 +67,8 @@ The following subsections present behaviour changes in 
arithmetic operations, ty
 
 ### Arithmetic Operations
 
-In Spark SQL, arithmetic operations performed on numeric types (with the 
exception of decimal) are not checked for overflows by default.
-This means that in case an operation causes overflows, the result is the same 
with the corresponding operation in a Java/Scala program (e.g., if the sum of 2 
integers is higher than the maximum value representable, the result is a 
negative number).
-On the other hand, Spark SQL returns null for decimal overflows.
-When `spark.sql.ansi.enabled` is set to `true` and an overflow occurs in 
numeric and interval arithmetic operations, it throws an arithmetic exception 
at runtime.
+In Spark SQL, by default, Spark throws an artithmetic exception at runtime for 
non-decimal numeric overflows and returns null for decimal type overflows.

Review Comment:
   I agree that it looks much clear and has the missed `interval` part. Thanks!



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