vinodkc commented on code in PR #50558: URL: https://github.com/apache/spark/pull/50558#discussion_r2042988907
########## sql/core/src/test/resources/sql-tests/inputs/time.sql: ########## @@ -18,3 +18,35 @@ select try_to_time('12:48:31 abc'); select try_to_time('10:11:12.', 'HH:mm:ss.SSSSSS'); select try_to_time("02-69", "HH-mm"); select try_to_time('11:12:13', 'HH:mm:ss', 'SSSSSS'); + +select secondoftime_with_fraction(to_time('23-59-59.987654', 'HH-mm-ss.SSSSSS')); +select second(to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select minute(to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select hour(to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); + +select extract(HOUR from to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select extract(H from to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select extract(HOURS from to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select extract(HR from to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); +select extract(HRS from to_time('23-59-58.987654', 'HH-mm-ss.SSSSSS')); Review Comment: Done -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org