Skip to content

Apache DataFusion SQL Query Engine

Prove timestamptz <=> timestamp now works (#5869)

compheadeb251253f01e
diff --git a/datafusion/core/tests/sqllogictests/test_files/timestamps.slt b/datafusion/core/tests/sqllogictests/test_files/timestamps.slt
index e15730f5a7..3bea8cb6c9 100644
--- a/datafusion/core/tests/sqllogictests/test_files/timestamps.slt
+++ b/datafusion/core/tests/sqllogictests/test_files/timestamps.slt
@@ -670,7 +670,7 @@ drop table foo;
statement ok
drop table bar;
-# timestamptz to utf8 conversion
+# timestamptz <=> utf8 conversion
query BBBB
SELECT
'2000-01-01T00:00:00'::timestamp::timestamptz = '2000-01-01T00:00:00',
@@ -680,3 +680,14 @@ SELECT
;
----
true false true true
+
+# timestamptz <=> timestamp conversion
+query BBBB
+SELECT
+ '2000-01-01T00:00:00'::timestamp::timestamptz = '2000-01-01T00:00:00'::timestamp,
+ '2000-01-01T00:00:00'::timestamp::timestamptz != '2000-01-01T00:00:00'::timestamp,
+ '2000-01-01T00:00:00'::timestamp::timestamptz >= '2000-01-01T00:00:00'::timestamp,
+ '2000-01-01T00:00:00'::timestamp::timestamptz <= '2000-01-01T00:00:00'::timestamp
+;
+----
+true false true true
\ No newline at end of file