You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/02 11:04:30 UTC

[GitHub] [spark] Fokko commented on pull request #28821: [SPARK-31981][SQL] Keep TimestampType when taking an average of a Timestamp

Fokko commented 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. The for the division operation, both the dividend and divisor requires to be a Fractional type.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org