[
https://issues.apache.org/jira/browse/SPARK-35937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494479#comment-17494479
]
Apache Spark commented on SPARK-35937:
--------------------------------------
User 'Ngone51' has created a pull request for this issue:
https://github.com/apache/spark/pull/35568
> Extracting date field from timestamp should work in ANSI mode
> -------------------------------------------------------------
>
> Key: SPARK-35937
> URL: https://issues.apache.org/jira/browse/SPARK-35937
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: Gengliang Wang
> Assignee: Gengliang Wang
> Priority: Major
> Fix For: 3.2.0
>
>
> Add a new ANSI type coercion rule: when getting a date field from a
> Timestamp column, cast the column as Date type.
> This is Spark's hack to make the implementation simple. In the default type
> coercion rules, the implicit cast rule does the work. However, The ANSI
> implicit cast rule doesn't allow converting Timestamp type as Date type, so
> we need to have this additional rule
> to make sure the date field extraction from Timestamp columns works.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]