Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-43492

Define the DATE_ADD and DATE_DIFF functions with 3-args

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • SQL
    • None

    Description

      Spark supports the DATE_ADD and DATE_DIFF functions with 2 arguments but when an user calls the same functions with 3 arguments, Spark SQL outputs the confusing error:

      spark-sql (default)> select date_add(MONTH, 1, date'2023-05-13');
      [UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column or function parameter with name `MONTH` cannot be resolved. ; line 1 pos 16;
      'Project [unresolvedalias('date_add('MONTH, 1, 2023-05-13), None)]
      +- OneRowRelation
      

      Attachments

        Activity

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: