yaooqinn commented on a change in pull request #27317: [SPARK-30592][SQL]
Interval support for csv and json funtions
URL: https://github.com/apache/spark/pull/27317#discussion_r376777008
##########
File path: sql/core/src/test/resources/sql-tests/inputs/interval.sql
##########
@@ -220,3 +220,9 @@ select a - b from values (interval '-2147483648 months',
interval '2147483647 mo
select b + interval '1 month' from values (interval '-2147483648 months',
interval '2147483647 months') t(a, b);
select a * 1.1 from values (interval '-2147483648 months', interval
'2147483647 months') t(a, b);
select a / 0.5 from values (interval '-2147483648 months', interval
'2147483647 months') t(a, b);
+
+-- interval support for csv and json functions
+SELECT from_csv('1, 1 day', 'a INT, b interval');
+SELECT to_csv(named_struct('a', interval 32 month, 'b', interval 70 minute));
+SELECT from_json('{"a":"1 days"}', 'a interval');
+SELECT to_json(map('a', interval 25 month 100 day 130 minute));
Review comment:
ok, I'll make a followup.
----------------------------------------------------------------
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]