yaooqinn commented on a change in pull request #26465: [SPARK-29390][SQL] Add the justify_days(), justify_hours() and justif_interval() functions URL: https://github.com/apache/spark/pull/26465#discussion_r345536928
########## File path: sql/core/src/test/resources/sql-tests/inputs/postgreSQL/interval.sql ########## @@ -342,3 +333,10 @@ SELECT interval '1 2:03:04' minute to second; -- select make_interval(secs := 'inf'); -- select make_interval(secs := 'NaN'); -- select make_interval(secs := 7e12); + +-- test justify_hours() and justify_days() +SELECT justify_hours(interval '6 months 3 days 52 hours 3 minutes 2 seconds') as `6 mons 5 days 4 hours 3 mins 2 seconds`; +SELECT justify_days(interval '6 months 36 days 5 hours 4 minutes 3 seconds') as `7 mons 6 days 5 hours 4 mins 3 seconds`; + +-- test justify_interval() +SELECT justify_interval(interval '1 month -1 hour') as `1 month -1 hour`; Review comment: OK, I just wanted to make the diff smalle. I'd move them back ---------------------------------------------------------------- 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]
