Fokko edited a comment on pull request #28821:
URL: https://github.com/apache/spark/pull/28821#issuecomment-652940574


   Found the issue. 
   ```
   (sum / count).cast(resultType)
   ```
   Needs to be:
   ```
   (sum / count.cast(DecimalType.LongDecimal)).cast(resultType)
   ````
   Similar to the line above. For the division operation, both the dividend and 
divisor requires to be a Fractional type. Great to have such extensive tests :)


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



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

Reply via email to