yaooqinn commented on a change in pull request #26347: [SPARK-29688][SQL] 
Support average for interval type values
URL: https://github.com/apache/spark/pull/26347#discussion_r344033956
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala
 ##########
 @@ -52,11 +51,13 @@ 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 CalendarIntervalType => CalendarIntervalType
 
 Review comment:
   ok, I will change this and the one in the sumDataType

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


With regards,
Apache Git Services

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

Reply via email to