You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/08/23 20:06:00 UTC
[jira] [Assigned] (SPARK-36567) Support foldable special datetime
values in CAST
[ https://issues.apache.org/jira/browse/SPARK-36567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-36567:
------------------------------------
Assignee: Max Gekk (was: Apache Spark)
> 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
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org