[
https://issues.apache.org/jira/browse/SPARK-51562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17940141#comment-17940141
]
Senthil Kumar edited comment on SPARK-51562 at 4/3/25 6:52 PM:
---------------------------------------------------------------
PR raised : https://github.com/apache/spark/pull/50509
was (Author: senthh):
PR raised : https://github.com/apache/spark/pull/50479
> 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
> Priority: Major
> Labels: pull-request-available, starter
>
> 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: [email protected]
For additional commands, e-mail: [email protected]