Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-34246 New type coercion syntax rules in ANSI mode
  3. SPARK-36445

ANSI type coercion rule for date time operations

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • SQL
    • None

    Description

      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.

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: