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

Apache Spark reassigned SPARK-37714:
------------------------------------

    Assignee: Gengliang Wang  (was: Apache Spark)

> ANSI mode: allow casting between numeric type and datetime type by default
> --------------------------------------------------------------------------
>
>                 Key: SPARK-37714
>                 URL: https://issues.apache.org/jira/browse/SPARK-37714
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>            Priority: Major
>
> By default, allow casting between numeric type and datetime type under ANSI 
> mode 
> This is for better adoption of ANSI SQL mode:
>  * As we did some data science, we found that many Spark SQL users are 
> actually using {{Cast(Timestamp as Numeric)}} and {{{}Cast(Numeric as 
> Timestamp){}}}. There are also some usages of {{{}Cast(Date as Numeric){}}}.
>  * The Spark SQL connector for Tableau is using this feature for DateTime 
> math. e.g.
> {{CAST(FROM_UNIXTIME(CAST(CAST(%1 AS BIGINT) + (%2 * 86400) AS BIGINT)) AS 
> TIMESTAMP)}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to