You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2026/06/24 14:54:00 UTC

[jira] [Commented] (SPARK-52617) Cast TIME to/from TIMESTAMP_NTZ

    [ https://issues.apache.org/jira/browse/SPARK-52617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091236#comment-18091236 ] 

Max Gekk commented on SPARK-52617:
----------------------------------

Closing as a duplicate of SPARK-57618, which implements bidirectional casts between TIME(p) and the corresponding TIMESTAMP type for q in [6, 9] in a single change — covering both the microsecond member (q=6) and the nanosecond members (q in [7, 9]) that this ticket scoped separately.

> Cast TIME to/from TIMESTAMP_NTZ
> -------------------------------
>
>                 Key: SPARK-52617
>                 URL: https://issues.apache.org/jira/browse/SPARK-52617
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Max Gekk
>            Priority: Major
>              Labels: pull-request-available
>
> Follow the SQL standard, and support casting TIMESTAMP_NTZ to TIME by taking only the time part. Also support TIME to TIMESTAMP_NTZ by combining CURRENT_DATE and the provided TIME.
> h2. Test coverage
> * Add cast tests in CastSuiteBase / CastWithAnsiOnSuite / CastWithAnsiOffSuite for both
>   directions (TIMESTAMP_NTZ -> TIME and TIME -> TIMESTAMP_NTZ), across TIME precisions and
>   ANSI on/off.
> * Add CAST and TRY_CAST(... AS time) cases to the SQL golden files (time.sql and try_cast.sql).
> * Verify the CURRENT_DATE-combination semantics and round-trips (cast a timestamp to time and
>   back).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org