yaooqinn commented on a change in pull request #26515: [SPARK-29889][SQL][test]
unify the interval tests
URL: https://github.com/apache/spark/pull/26515#discussion_r346189850
##########
File path: sql/core/src/test/resources/sql-tests/inputs/interval.sql
##########
@@ -128,6 +131,179 @@ select interval 1 year '2-1' year to month;
select interval 1 year '12:11:10' hour to second;
select interval '10-9' year to month '1' year;
select interval '12:11:10' hour to second '1' year;
+select interval (-30) day;
+select interval (a + 1) day;
+select interval 30 day day day;
--- awareness of the positive sign before interval type
-select +interval '1 second';
+-- sum interval values
+-- null
+select sum(cast(v as interval)) from VALUES ('1 seconds'), ('2 seconds'),
(null) t(v) where v is null;
Review comment:
select sum(cast(v as interval)) from VALUES (null) t(v);
----------------------------------------------------------------
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]