beliefer commented on a change in pull request #32229:
URL: https://github.com/apache/spark/pull/32229#discussion_r621066701
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala
##########
@@ -82,6 +87,8 @@ case class Average(child: Expression) extends
DeclarativeAggregate with Implicit
case _: DecimalType =>
DecimalPrecision.decimalAndDecimal(
Divide(sum, count.cast(DecimalType.LongDecimal), failOnError =
false)).cast(resultType)
+ case _: YearMonthIntervalType => DivideYMInterval(sum, count)
+ case _: DayTimeIntervalType => DivideDTInterval(sum, count)
case _ =>
Divide(sum.cast(resultType), count.cast(resultType), failOnError = false)
Review comment:
I fixed it with https://github.com/apache/spark/pull/32358.
--
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]