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] [Resolved] (SPARK-52617) Cast TIME to/from TIMESTAMP_NTZ

     [ https://issues.apache.org/jira/browse/SPARK-52617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Gekk resolved SPARK-52617.
------------------------------
    Resolution: Duplicate

> 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