From a15188579b84db425d1c12d89c960bb8195d9511 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 11 Dec 2024 09:00:43 -0500 Subject: [PATCH] Add tests from https://github.com/apache/datafusion/pull/13372 --- .../sqllogictest/test_files/expr/date_part.slt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/datafusion/sqllogictest/test_files/expr/date_part.slt b/datafusion/sqllogictest/test_files/expr/date_part.slt index cec80a165f306..9724a54405646 100644 --- a/datafusion/sqllogictest/test_files/expr/date_part.slt +++ b/datafusion/sqllogictest/test_files/expr/date_part.slt @@ -528,11 +528,21 @@ select extract(second from '2024-08-09T12:13:14') ---- 14 +query I +select extract(second from timestamp '2024-08-09T12:13:14') +---- +14 + query I select extract(seconds from '2024-08-09T12:13:14') ---- 14 +query I +select extract(seconds from timestamp '2024-08-09T12:13:14') +---- +14 + query I SELECT extract(second from arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) ---- @@ -876,3 +886,5 @@ true query error DataFusion error: Internal error: unit Nanosecond not supported SELECT (date_part('nanosecond', now()) = EXTRACT(nanosecond FROM now())) + +