sarutak commented on a change in pull request #32909: URL: https://github.com/apache/spark/pull/32909#discussion_r654789789
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala ########## @@ -57,14 +57,14 @@ case class Average(child: Expression) extends DeclarativeAggregate with Implicit private lazy val resultType = child.dataType match { case DecimalType.Fixed(p, s) => DecimalType.bounded(p + 4, s + 4) - case _: YearMonthIntervalType => YearMonthIntervalType + case _: YearMonthIntervalType => YearMonthIntervalType() Review comment: @MaxGekk For `Sum`, `resultType` is the same as `child.dataType` but for `Average` `resultType` is always `YearMonthIntervalType(0, 1)`. Is this intended behavior? -- 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