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

Confused errors from the DATEADD function

    XMLWordPrintableJSON

Details

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

    Description

      The code example portraits the issue:

      spark-sql (default)> select dateadd('MONTH', 1, date'2023-05-11');
      [WRONG_NUM_ARGS.WITHOUT_SUGGESTION] The `dateadd` requires 2 parameters but the actual number is 3. Please, refer to 'https://spark.apache.org/docs/latest/sql-ref-functions.html' for a fix.; line 1 pos 7
      

      The error says about number of arguments passed to DATEADD but the issue is about the type of the first argument.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: