cloud-fan commented on a change in pull request #32949:
URL: https://github.com/apache/spark/pull/32949#discussion_r659884896
##########
File path: sql/core/src/test/resources/sql-tests/results/ansi/interval.sql.out
##########
@@ -1215,9 +1251,9 @@ SELECT
to_csv(named_struct('a', interval 32 month, 'b', interval 70 minute)),
from_csv(to_csv(named_struct('a', interval 32 month, 'b', interval 70
minute)), 'a interval, b interval')
-- !query schema
-struct<from_csv(1, 1 day):struct<a:int,b:interval>,to_csv(from_csv(1, 1
day)):string,to_csv(named_struct(a, INTERVAL '2 years 8 months', b, INTERVAL '1
hours 10 minutes')):string,from_csv(to_csv(named_struct(a, INTERVAL '2 years 8
months', b, INTERVAL '1 hours 10 minutes'))):struct<a:interval,b:interval>>
+struct<from_csv(1, 1 day):struct<a:int,b:interval>,to_csv(from_csv(1, 1
day)):string,to_csv(named_struct(a, INTERVAL '2-8' YEAR TO MONTH, b, INTERVAL
'01:10' HOUR TO MINUTE)):string,from_csv(to_csv(named_struct(a, INTERVAL '2-8'
YEAR TO MONTH, b, INTERVAL '01:10' HOUR TO
MINUTE))):struct<a:interval,b:interval>>
-- !query output
-{"a":1,"b":1 days} 1,1 days 2 years 8 months,1 hours 10 minutes
{"a":2 years 8 months,"b":1 hours 10 minutes}
+{"a":1,"b":1 days} 1,1 days 32,4200000000 {"a":null,"b":null}
Review comment:
> because the result of named_struct('a', interval 32 month, 'b',
interval 70 minute) is 32,4200000000
Is it corrected? I thought it should be `interval '32' month`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]