MaxGekk commented on a change in pull request #32849: URL: https://github.com/apache/spark/pull/32849#discussion_r649411815
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala ########## @@ -95,7 +95,7 @@ case class Average(child: Expression) extends DeclarativeAggregate with Implicit Literal(null, YearMonthIntervalType), DivideYMInterval(sum, count)) case _: DayTimeIntervalType => If(EqualTo(count, Literal(0L)), - Literal(null, DayTimeIntervalType), DivideDTInterval(sum, count)) + Literal(null, DayTimeIntervalType.defaultConcreteType), DivideDTInterval(sum, count)) Review comment: As we discussed offline, we should use wider type `interval day to second` in `Average`. It should be the same as the returned type from `DivideDTInterval`. Also see `resultType` in the class. -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org