Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31415 builtin date-time functions/operations improvement
  3. SPARK-27898

Support 4 date operators(date + integer, integer + date, date - integer and date - date)

    XMLWordPrintableJSON

Details

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

    Description

      Support 4 date operators(date + integer, integer + date, date - integer and date - date):

      Operator Example Result
      + date '2001-09-28' + integer '7' date '2001-10-05'
      - date '2001-10-01' - integer '7' date '2001-09-24'
      - date '2001-10-01' - date '2001-09-28' integer '3' (days)

      https://www.postgresql.org/docs/12/functions-datetime.html

      Attachments

        Issue Links

          Activity

            People

              yumwang Yuming Wang
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: