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_r344040810
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/group-by.sql
 ##########
 @@ -192,4 +192,36 @@ having sv is not null;
 SELECT
     i,
     Sum(cast(v as interval)) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW AND 
UNBOUNDED FOLLOWING)
-FROM VALUES(1,'1 seconds'),(1,'2 seconds'),(2,NULL),(2,NULL) t(i,v);
\ No newline at end of file
+FROM VALUES(1,'1 seconds'),(1,'2 seconds'),(2,NULL),(2,NULL) t(i,v);
+
+-- average with interval type
+-- null
+select avg(cast(v as interval)) from VALUES ('1 seconds'), ('2 seconds'), 
(null) t(v) where v is null;
 
 Review comment:
   yes, I changed it in your way. thanks.

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