You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Gengliang Wang (Jira)" <ji...@apache.org> on 2021/08/06 09:11:00 UTC

[jira] [Created] (SPARK-36445) ANSI type coercion rule for date time operations

Gengliang Wang created SPARK-36445:
--------------------------------------

             Summary: ANSI type coercion rule for date time operations
                 Key: SPARK-36445
                 URL: https://issues.apache.org/jira/browse/SPARK-36445
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.2.0
            Reporter: Gengliang Wang
            Assignee: Gengliang Wang


Currently the type coercion rule `DateTimeOperations` doesn't match the design of the ANSI type coercion system:
1. For date_add/date_sub, if the input is timestamp type, Spark should not convert it into date type since date type is narrower than timestamp.
2. For date_add/date_sub/time_add, string value can be implicit cast to date/timestamp only when it is literal.

Thus, we need to have a new rule for the date time operations in ANSI type coercion system.



--
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