This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new e566e97241 Support `CAST` from temporal to `Utf8View` (#17535)
e566e97241 is described below

commit e566e97241231306e0c6bcee2d7df6c43d312076
Author: Piotr Findeisen <[email protected]>
AuthorDate: Fri Sep 26 18:59:35 2025 +0200

    Support `CAST` from temporal to `Utf8View` (#17535)
---
 datafusion/sqllogictest/test_files/timestamps.slt | 33 +++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/datafusion/sqllogictest/test_files/timestamps.slt 
b/datafusion/sqllogictest/test_files/timestamps.slt
index f8b7ccc6ae..1a7ff41d64 100644
--- a/datafusion/sqllogictest/test_files/timestamps.slt
+++ b/datafusion/sqllogictest/test_files/timestamps.slt
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to