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 2025/03/19 19:23:00 UTC
[jira] [Created] (SPARK-51562) Add the time() function
Max Gekk created SPARK-51562:
--------------------------------
Summary: Add the time() function
Key: SPARK-51562
URL: https://issues.apache.org/jira/browse/SPARK-51562
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 4.1.0
Reporter: Max Gekk
Add new function time() which should cast an expr to TIME. This function is a synonym for CAST(expr AS TIME). For details see cast function.
h4. Syntax
{code:sql}
time(expr)
{code}
h4. Arguments
* expr: Any expression that can be cast to TIMESTAMP.
h4. Returns
A TIME.
h4. Examples
{code:sql}
> SELECT time('12:25:13.45');
12:25:13.45
> SELECT time(timestamp'2020-04-30 12:25:13.45');
12:25:13.45
> SELECT time(123);
00:02:03
{code}
--
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