[
https://issues.apache.org/jira/browse/SPARK-52617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Max Gekk updated SPARK-52617:
-----------------------------
Description:
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).
was: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.
> 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: [email protected]
For additional commands, e-mail: [email protected]