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

Wenchen Fan resolved SPARK-36567.
---------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

Issue resolved by pull request 33816
[https://github.com/apache/spark/pull/33816]

> Support foldable special datetime values in CAST
> ------------------------------------------------
>
>                 Key: SPARK-36567
>                 URL: https://issues.apache.org/jira/browse/SPARK-36567
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>             Fix For: 3.2.0
>
>
> The PR https://github.com/apache/spark/pull/32714 disallowed special datetime 
> values in the CAST expression, and allowed them only in typed literals. So, 
> the following code doesn't work anymore:
> {code:sql}
> spark-sql> select date('today');
> NULL
> spark-sql> select cast('today' as date);
> NULL
> {code}
> Though, users can replace them by:
> {code:sql}
> spark-sql> select date'today';
> 2021-08-23
> {code}
> but the changes can break users apps. The purpose of this ticket is to 
> support special datetime strings when the strings in casts are foldable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to