cloud-fan commented on issue #27627: [WIP][SPARK-28067][SQL] Fix incorrect 
results for decimal aggregate sum by returning null on decimal overflow
URL: https://github.com/apache/spark/pull/27627#issuecomment-613912451
 
 
   > So if we have 2 null rows, the expected result should be null and not zero.
   > We need a way to distinguish between valid null rows and null value that 
come because of a overflow as well.
   
   AFAIK most aggregate functions just skip null values, and `SUM` will only 
have null value if: 1. overflow happens. 2: no inputs.
   
   It's much easier to set the `isEmpty` flag, but hard to set the `isOverflow` 
flag (you added 2 new expressions)

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