gengliangwang commented on a change in pull request #35848:
URL: https://github.com/apache/spark/pull/35848#discussion_r828243966



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Sum.scala
##########
@@ -110,9 +95,10 @@ case class Sum(
         // in case the input is nullable. The `sum` can only be null if there 
is no value, as
         // non-decimal type can produce overflowed value under non-ansi mode.
         if (child.nullable) {

Review comment:
       yeah, when overflow happens, the result of update becomes 
`child.cast(resultType)`




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