From 5c8de1feec1d3d4200756d1b48f4d1a74af95864 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 d9886dd0a951..6413e1f2d408 100644 --- a/datafusion/sqllogictest/test_files/expr/date_part.slt +++ b/datafusion/sqllogictest/test_files/expr/date_part.slt @@ -712,11 +712,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)')) ---- @@ -1060,3 +1070,5 @@ true query error DataFusion error: Internal error: unit Nanosecond not supported SELECT (date_part('nanosecond', now()) = EXTRACT(nanosecond FROM now())) + +