Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions datafusion/sqllogictest/test_files/timestamps.slt
Original file line number Diff line number Diff line change
Expand Up @@ -3616,3 +3616,36 @@ SELECT arrow_cast(CAST(one AS decimal(17,3)), 'Timestamp(Second, None)') AS a FR
----
1970-01-01T00:00:01
1970-01-01T00:00:01

query TTTTT
SELECT
arrow_typeof(a),
CAST(a AS varchar),
arrow_cast(a, 'Utf8'),
arrow_cast(a, 'Utf8View'),
arrow_cast(a, 'LargeUtf8')
FROM (SELECT DATE '2005-09-10' AS a)
----
Date32 2005-09-10 2005-09-10 2005-09-10 2005-09-10

query TTTTT
SELECT
arrow_typeof(a),
CAST(a AS varchar),
arrow_cast(a, 'Utf8'),
arrow_cast(a, 'Utf8View'),
arrow_cast(a, 'LargeUtf8')
FROM (SELECT TIMESTAMP '2005-09-10 13:31:00' AS a)
----
Timestamp(Nanosecond, None) 2005-09-10T13:31:00 2005-09-10T13:31:00 2005-09-10T13:31:00 2005-09-10T13:31:00

query TTTTT
SELECT
arrow_typeof(a),
CAST(a AS varchar),
arrow_cast(a, 'Utf8'),
arrow_cast(a, 'Utf8View'),
arrow_cast(a, 'LargeUtf8')
FROM (SELECT CAST('2005-09-10 13:31:00 +02:00' AS timestamp with time zone) AS a)
----
Timestamp(Nanosecond, Some("+00")) 2005-09-10T11:31:00Z 2005-09-10T11:31:00Z 2005-09-10T11:31:00Z 2005-09-10T11:31:00Z
Loading